Giter Club home page Giter Club logo

proj1's Introduction

COP5615: DISTRIBUTED OPERATING SYSTEMS

Project-1

Submitted by:
Student Name: Yashwant Nagarjuna Kuppa
UFID: 7181-4301
No. of Group member(s): 1

Instructions for running the application from command-line

mix run lib/proj1.ex arg1 arg2

Command for calculating the run time

time mix run lib/proj1.ex

For running the file for multiple outputs run the command mix clean and then run for multiple outputs

============================================================

Size of the work unit.
I calculated the size of subproblem by trying various different values and I observed that optimal performance is obtained at sqrt(n) number of processes.

Files inside the project.

Three module were created.

  1. proj1.ex -> This module takes in the user input n, k and divides the work among sqrt(n) actors. These actors will be sent to the worker module to calculate the sum of the squares.
  2. worker.ex -> This module calculates the sum of the squares and determines if it is a perfect square. The result is sent as a message to the scheduler module.
  3. scheduler.ex -> This module takes the result from the worker module and kills the process after returning the result.

Work unit: Each actor gets sqrt(n) range of numbers to operate upon.

================================================

Output for elixir Project1 1000000 4

$ mix run lib/proj1.ex 1000000 4
Compiling three files (.ex)

$ time mix run lib/proj1.ex 1000000 4

real 0m2.572s
user 0m7.809s
sys  0m0.255s

CPU time = user time + sys time Hence, # cores used in the computation = CPU time/real time = 3.13

===========================================

The largest problem managed to solve

mix run lib/proj1.ex 100000000 4

The result is an empty list since there are no perfect squares for k = 4

===========================================

proj1's People

Contributors

yashwant-nagarjuna avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.