Find Jobs
Hire Freelancers

Design and Implement

$30-5000 USD

Ολοκληρώθηκε
Αναρτήθηκε πάνω από 20 χρόνια πριν

$30-5000 USD

Πληρωμή κατά την παράδοση
Design and implement a program to simulate processor scheduling. Theprogram will support round-robin scheduling. The program must maintain a ready queue and a list of waiting processes. The simulation will run in integer time steps. Input to the program will consist of the following information. No particular line fomat is [login to view URL] are to be separated by white space. int maxTimeSlice int snapshotInterval string processId int arrivalTime int cpuBurst int waitTime ... repeated cpu and wait pairs with final waitTime entry -1 Additional process descriptions follow until end of file Example (annotated): 10 50 P1 0 20 2 5 6 15 3 30 2 1 1 1 0 1 -1 P2 0 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 -1 P3 20 50 2 50 2 50 2 50 -1 P4 50 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 -1 P5 55 100 -1 Processor Scheduling Simulation Annotated Example Input (Annotation in parentheses): 10 (CPU Quantum) 50 (Snapshot Interval) P1 (Process Id) 0 (Arrival Time) 20 (CPU Burst 1) 2 (Wait Time 1) 5 (CPU 2) 6 (Wait 2) 15 (CPU 3) 3 (Wait 3) 30 (CPU 4) 2 (Wait 4) 1 (CPU 5) 1 (Wait 5) 1 (CPU 6) 0 (Wait 6) 1 (CPU 7) -1 (Sentinel) P2 0 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 -1 P3 20 50 2 50 2 50 2 50 -1 P4 50 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 -1 P5 55 100 -1 ## Deliverables Execution Example (corrected for time 30 on): Ready Processes are shown as ProcessId(RemainingCPUBurst) Running Processes are shown as ProcessId(EndOfCPUBurstTime;RemainingCPUBurst) EndOfCPUBurstTime = StartOfBurstTime + min(RemainingCPUBurst, CPUQuantum) Waiting Processes are shown as ProcessId(EndOfWaitTime) EndOfWaitTime = StartOfWaitTime + WaitTime Time Ready Running Waiting Comment 0 P2(5)->P1(20) Before dispatch 0 P2(5) P1(10;10) After dispatch 10 P1(10)->P2(5) Before dispatch 10 P1(10) P2(15;0) After dispatch 15 P1(25;0) P2(16) P2 waiting until 15+1 16 P2(5) P1(25;0) P2 done waiting 20 P3(50)->P2(5) P1(25;0) P3 arrives 25 P3(50) P2(30;0) P1(27) P1 waiting until 15+2 27 P1(5)->P3(50) P2(30;0) P1 done waiting 30 P1(5) P3(40;40) P2(31) P2 done running 31 P2(5)->P1(5) P3(40;40) P2 done waiting 40 P3(40)->P2(5) P1(45) 45 P3(40) P2(50;0) P1(51) 50 P4(5) P3(60;30) P2(51)->P1(51) P2 done, P4 arrives; Snapshot On each multiple of the snapshotInterval, the program will print a snapshot of the current state showing the time, the process in execution if any, the processes on the ready queue, in order, and the processes on the waiting list. When a process completes execution, the program will print the processId, the arrival time, start time (first time on CPU,) the completion time, the amount of CPU time used, and the amount of wait time for the process. Sample code: The program file, [login to view URL], is a schedule simulation for a multiprocessing batch system. It illustrates several techniques that may be useful in developing a solution to the assigned problem. The executable code, [login to view URL], and a test data file, [login to view URL], are available for you to run. To execute this program, download the exe file and the data file to your system and then enter the command [login to view URL] ## Platform Windows and Linux.
Ταυτότητα εργασίας: 2950340

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

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

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

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

Καθόρισε τον προϋπολογισμό σου και το χρονοδιάγραμμα
Πληρώσου για τη δουλειά σου
Περίγραψε την πρόταση σου
Η εγγραφή και η πλειοδοσία σε εργασίες είναι δωρεάν
Βραβεύτηκε στον/στην:
Avatar Χρήστη
See private message.
$21,25 USD σε 14 ημέρες
4,9 (36 αξιολογήσεις)
3,8
3,8
6 freelancers δίνουν μια μέση προσφορά $20 USD για αυτή τη δουλειά
Avatar Χρήστη
See private message.
$25,50 USD σε 14 ημέρες
4,9 (94 αξιολογήσεις)
4,3
4,3
Avatar Χρήστη
See private message.
$17 USD σε 14 ημέρες
4,9 (10 αξιολογήσεις)
3,8
3,8
Avatar Χρήστη
See private message.
$25,50 USD σε 14 ημέρες
4,9 (17 αξιολογήσεις)
3,3
3,3
Avatar Χρήστη
See private message.
$8,50 USD σε 14 ημέρες
4,5 (18 αξιολογήσεις)
2,4
2,4
Avatar Χρήστη
See private message.
$21,25 USD σε 14 ημέρες
5,0 (4 αξιολογήσεις)
2,3
2,3

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

Σημαία της UNITED STATES
United States
4,7
16
Μέλος από Απρ 19, 2003

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

Ευχαριστούμε! Σου έχουμε στείλει ένα 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.
Η σύνδεση σου έχει λήξει και τώρα έχεις αποσυνδεθεί. Παρακαλούμε συνδέσου ξανά.