Find Jobs
Hire Freelancers

Bank Semaphore project.

$10-30 USD

Ακυρώθηκε
Αναρτήθηκε περίπου 6 χρόνια πριν

$10-30 USD

Πληρωμή κατά την παράδοση
For this project, we will be simulating a bank, having some number of tellers. Each customer arrives at the bank, waits in a single line until a teller becomes free, and then goes to that teller to transact his/her business, leaving the bank when his/her business is done. In this case, a thread simulates each individual customer. The major parameters of this system are: the number of tellers, the rate at which new customers arrive (specified as an average interval between arrivals), and the average time it takes to service a customer. If (average inter-arrival time) = (average service time) / (# of tellers) then the system will eventually reach a steady state with a fairly constant waiting line length. The value for each of these three parameters supplied to the assignment’s program should be chosen to satisfy the above so the tellers are productive and the customers don’t become angry. Therefore, to test your program, choose values for two of the parameters in the equation of the above and then compute the value of the third parameter. You can generate several different sets of values for the three parameters to test your program. For this project, you write a program that simulates this system. At startup, your program will accept the three parameters mentioned above plus the length of time to run the simulation. All times will be entered in seconds. To avoid having to run the program for an entire day, we will simulate ten seconds of "simulated world" time by one second of actual program run time. The simulation will proceed as follows: 1. One thread will be responsible for creating new customers at random intervals, such that the average time between new customers is equal to the specified parameter. It will exist throughout the simulation. 2. Created when a customer arrives, a unique thread simulates each customer, works its way through the bank, and then terminates. 3. A general semaphore that uses a FIFO queue will simulate the waiting line. 4. The semaphore initializes to the number of tellers. If there are n tellers, then the first n customers doing an acquire() on this semaphore will be able to proceed without delay. 5. When each customer thread enters the bank, he/she will do a acquire() on this semaphore. When he/she finishes being served, he/she will do a release(), allowing another customer to pass the semaphore and use the teller.
Ταυτότητα εργασίας: 16952498

Σχετικά με την εργασία

3 προτάσεις
Απομακρυσμένη Εργασία
Ενεργός/ή 6 χρόνια πριν

Ψάχνεις τρόπο για να κερδίσεις μερικά χρήματα;

Πλεονεκτήματα πλειοδοσίας στο Freelancer

Καθόρισε τον προϋπολογισμό σου και το χρονοδιάγραμμα
Πληρώσου για τη δουλειά σου
Περίγραψε την πρόταση σου
Η εγγραφή και η πλειοδοσία σε εργασίες είναι δωρεάν
3 freelancers δίνουν μια μέση προσφορά $70 USD για αυτή τη δουλειά
Avatar Χρήστη
A proposal has not yet been provided
$105 USD σε 3 ημέρες
4,9 (315 αξιολογήσεις)
7,2
7,2
Avatar Χρήστη
Hi. bro I checked whole project. Im expert in Java. Im interested . so Ill do it in 3 days. Thanks.
$40 USD σε 3 ημέρες
4,9 (123 αξιολογήσεις)
6,1
6,1
Avatar Χρήστη
hey, I understood your project description. Could you please provide further details on input and output test data if you have? So that i can do test runs and code it for you and start asap.
$66 USD σε 2 ημέρες
5,0 (5 αξιολογήσεις)
2,6
2,6

Σχετικά με τον πελάτη

Σημαία της UNITED STATES
Jamaica, United States
4,9
8
Επαληθευμένη μέθοδος πληρωμής
Μέλος από Δεκ 2, 2017

Επαλήθευση Πελάτη

Ευχαριστούμε! Σου έχουμε στείλει ένα email με ένα σύνδεσμο για να διεκδικήσεις τη δωρεάν πίστωση σου.
Κάτι πήγε στραβά κατά την προσπάθεια αποστολής του email σου. Παρακαλούμε δοκίμασε ξανά.
Εγγεγραμμένοι Χρήστες Συνολικές Αναρτημένες Δουλειές
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Φόρτωση προεπισκόπησης
Δόθηκε πρόσβαση για Geolocation.
Η σύνδεση σου έχει λήξει και τώρα έχεις αποσυνδεθεί. Παρακαλούμε συνδέσου ξανά.