Question
Computer Science help C++ Input text file below: NCORES 1 START 0 PID 3 CORE 100 SSD 0 CORE 80 SSD 0 CORE 40 SSD
Computer Science help C++
Input text file below:
NCORES 1
START 0
PID 3
CORE 100
SSD 0
CORE 80
SSD 0
CORE 40
SSD 0
CORE 80
SSD 0
CORE 40
SSD 0
CORE 90
SSD 1
CORE 100
TTY 5000
CORE 20
TTY 5000
CORE 80
SSD 1
CORE 30
SSD 0
CORE 90
SSD 1
CORE 30
SSD 1
CORE 20
SSD 1
CORE 30
SSD 1
CORE 20
SSD 1
CORE 30
SSD 1
CORE 20
SSD 1
CORE 30
SSD 1
CORE 20
START 3
PID 5
CORE 120
SSD 0
CORE 60
SSD 0
CORE 20
SSD 0
CORE 30
SSD 0
CORE 80
SSD 0
CORE 80
SSD 0
CORE 40
SSD 0
CORE 80
SSD 0
CORE 40
SSD 0
CORE 90
SSD 0
CORE 80
SSD 0
CORE 40
SSD 0
CORE 90
SSD 1
CORE 100
TTY 5000
CORE 80
SSD 0
CORE 80
SSD 0
CORE 40
SSD 0
CORE 90
SSD 1
CORE 30
SSD 1
CORE 20
SSD 1
CORE 30
SSD 1
CORE 20
SSD 1
CORE 30
SSD 1
CORE 20
START 5
PID 7
CORE 120
SSD 0
CORE 60
SSD 0
CORE 20
SSD 0
CORE 30
START 8
PID 9
CORE 100
SSD 0
CORE 80
SSD 0
CORE 40
SSD 0
CORE 70
SSD 0
CORE 80
SSD 0
CORE 40
SSD 0
CORE 90
SSD 0
CORE 80
SSD 0
CORE 40
SSD 0
CORE 90
SSD 1
CORE 110
SSD 0
CORE 40
SSD 0
CORE 90
SSD 1
CORE 100
TTY 3000
CORE 120
TTY 2000
CORE 80
SSD 1
CORE 30
SSD 1
CORE 20
SSD 1
CORE 30
SSD 1
CORE 20
SSD 1
CORE 30
SSD 1
CORE 20
START 13
PID 11
CORE 120
SSD 0
CORE 60
SSD 0
CORE 20
SSD 0
CORE 30
SSD 0
CORE 80
SSD 0
CORE 60
SSD 0
CORE 20
SSD 0
CORE 30
SSD 0
CORE 80
SSD 0
CORE 80
SSD 0
CORE 40
SSD 0
CORE 80
SSD 0
CORE 40
SSD 0
CORE 90
SSD 0
CORE 80
SSD 0
CORE 40
SSD 0
CORE 90
SSD 1
CORE 100
TTY 5000
CORE 80
SSD 0
CORE 80
SSD 0
CORE 40
SSD 0
CORE 90
SSD 1
CORE 30
SSD 1
CORE 20
SSD 1
CORE 30
SSD 0
CORE 90
SSD 1
CORE 30
SSD 1
CORE 20
SSD 1
CORE 30
SSD 1
CORE 20
SSD 1
CORE 30
SSD 1
CORE 20
END
Output Text File below:
-- ARRIVAL event for process 3 at time 0 ms
Process 3 starts at time 0 ms
Process Table:
There are no active processes.
-- ARRIVAL event for process 5 at time 3 ms
Process 5 starts at time 3 ms
Process Table:
Process 3 is RUNNING.
-- ARRIVAL event for process 7 at time 5 ms
Process 7 starts at time 5 ms
Process Table:
Process 3 is RUNNING.
Process 5 is READY.
-- ARRIVAL event for process 9 at time 8 ms
Process 9 starts at time 8 ms
Process Table:
Process 3 is RUNNING.
Process 5 is READY.
Process 7 is READY.
-- ARRIVAL event for process 11 at time 13 ms
Process 11 starts at time 13 ms
Process Table:
Process 3 is RUNNING.
Process 5 is READY.
Process 7 is READY.
Process 9 is READY.
Process 7 terminates at time 1180 ms.
Process Table:
Process 3 is READY.
Process 5 is READY.
Process 7 is TERMINATED.
Process 9 is RUNNING.
Process 11 is READY.
Process 5 terminates at time 9250 ms.
Process Table:
Process 3 is BLOCKED.
Process 5 is TERMINATED.
Process 9 is RUNNING.
Process 11 is READY.
Process 9 terminates at time 9270 ms.
Process Table:
Process 3 is BLOCKED.
Process 9 is TERMINATED.
Process 11 is RUNNING.
Process 11 terminates at time 9689 ms.
Process Table:
Process 3 is BLOCKED.
Process 11 is TERMINATED.
Process 3 terminates at time 12359 ms.
Process Table:
Process 3 is TERMINATED.
SUMMARY:
Total elapsed time: 12359 ms
Number of processes that completed: 5
Total number of SSD accesses: 90
Average number of busy cores: 0.463
SSD utilization: 0.0028
Total core time: 5720
Total SSD time:35
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started