In Progress

C Programming - Probabilistic Simulation of a Client-Server system

Write a program that does a probabilistic simulation of a client server system. The

clients generate job packages at random times and place them on the global queue. Every

package takes a random amount of time to execute and if the servers are busy the package

stays on the queue. At every time interval a the client and the server are woken up to simulate

work done during this interval.

The servers need one parameter, the completion rate μ (mu), also called death rate,

of the currently executing process. At every activation of the server, if there is a job executing,

the server generates a random number between zero and one and compares it to μ.

If the random number is smaller than μ the job execution is terminated. If there is no job

executing, the server gets a job from the global queue if available. The state of the server

can be either busy or not-busy.

The clients need one parameter as well, the birth rate l (lambda) of the jobs. Again,

at every activation (if it is not waiting for a previous job to complete) the client generates

a random number between zero and one and compares it to l . If the random number is

smaller than l a new job is generated and placed on the global queue.

The program has to have a simple queue (really simple, it just keeps track of the

number of items in it and nothing else since all the jobs are really the same). It also needs

to keep a few statistics (like number of jobs generated, total number of jobs in the queue,

number of clock ticks so far, etc) from which to compute useful statistics.

1

The program prints the following job statistics, one per line, properly annotated:

(1) Average waiting time (AWT)

(2) Average execution time (AXT)

(3) Average turnaround time (ATA)

(4) Average queue length (AQL)

(5) Average interarrival time. (AIA)

The command line options to the program are the --lambda [0.005], --mu [0.01],

--servers[2], --clients[2], --ticks[1000].

Your program will use pthreads. Every server, and every client will be separate

threads. In addition there is one thread for the clock and this can be the original thread. At

every tick of the clock thread, all other threads get activated, do whatever they need to do

and then wait for the next tick. Whenever the clock sees that all the threads have completed

their work for the current tick, it emits the next tick. The program runs for the

number of ticks specified

Skills: C Programming

See more: client server sms socket programming midlet example, write client server game, client server programming jsp, client server socket programming project, client server atm java socket programming, client server socket programming window platform, socket programming client server work, projects socket programming based multi client server architecture, write a C application to support a client/server, socket programming in c# example client server, client server socket programming in c, client server socket programming in c++ example, client server socket programming in c linux, client server socket programming in c example, socket programming in c example client server windows, multiple client server socket programming in c, client server programming c#, multiple client server socket programming in c windows, multiple client server socket programming in c++

About the Employer:
( 0 reviews ) Brampton, Canada

Project ID: #30645791

Awarded to:

dominicnzioka197

EXPERT IN NAMED SKILLS, OVER 18 YEARS OF EXPERIENCE, DEAR EMPLOYER, After KEENLY reading your description and being in possession of all CLEARLY STATED REQUIRED SKILLS as this is my area of PROFESSIONAL SPECIALIZATION More

$30 CAD in 1 day
(0 Reviews)
0.0

3 freelancers are bidding on average $69 for this job

idleswell

Thanks for your project. I have 30 years experience programming in C. I will create this simulation using pthreads as described in the attachment. A milestone payment for the full budget for this project must be dep More

$158 CAD in 7 days
(63 Reviews)
5.0
shurarysmendiyev

--------------------------------------- Hello! I have checked the project description and I think that I can help you to do this project. I am fully feeling comfortable working with C++, Algorithm Hope to discuss furt More

$20 CAD in 7 days
(1 Review)
1.7