Find Jobs
Hire Freelancers

Design and Implement

$30-5000 USD

Terminado
Publicado hace más de 20 años

$30-5000 USD

Pagado a la entrega
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.
ID del proyecto: 2950340

Información sobre el proyecto

6 propuestas
Proyecto remoto
Activo hace 21 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
See private message.
$21,25 USD en 14 días
4,9 (36 comentarios)
3,8
3,8
6 freelancers están ofertando un promedio de $20 USD por este trabajo
Avatar del usuario
See private message.
$25,50 USD en 14 días
4,9 (94 comentarios)
4,3
4,3
Avatar del usuario
See private message.
$17 USD en 14 días
4,9 (10 comentarios)
3,8
3,8
Avatar del usuario
See private message.
$25,50 USD en 14 días
4,9 (17 comentarios)
3,3
3,3
Avatar del usuario
See private message.
$8,50 USD en 14 días
4,5 (18 comentarios)
2,4
2,4
Avatar del usuario
See private message.
$21,25 USD en 14 días
5,0 (4 comentarios)
2,3
2,3

Sobre este cliente

Bandera de UNITED STATES
United States
4,7
16
Miembro desde abr 19, 2003

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.