A single-CPU system has four processes, P1, P2, P3 and P4 in the ready queue. The execution times and I/O needs for these processes are given below. All times are in ms. (hint: when a process starts an IO operation, it is removed from the ready queue and put back at the end of the queue only when it completes its IO).
Process P1: Arrives at 0ms, needs 23ms of CPU time. Performs I/O for 5ms after 10ms of its execution time, then another 5ms after 20ms of its execution time.
Process P2: Arrives at 3ms, needs 12ms of CPU time. Performs I/O for 10ms after 5ms of its execution time.
Process P3: Arrives at 1ms, needs 15ms of CPU time. Performs I/O for 1ms after 7ms of its execution time.
Process P4: Arrives at 2ms, needs 8ms of CPU time. Performs I/O for 5ms after 4ms of its execution time.
We assume that the CPU is idle if no one of these four processes is using it.
Using Round Robin scheduling
a) The order of execution of the processes (preferably as a Gantt chart), clearly indicating the CPU times as well as I/O times for each process. I/O requests are performed using FCFS strategy and only one process can be served by I/O at a time.
b)The waiting time and the turnaround times for each process.
c) The average waiting time, the average turnaround time and the percentage CPU utilization
Now, suppose that the IO system consists of 3 types of resources R1 (7 instances), R2 (9 instances) and R3 (12 instances). The allocated and maximum required (requested) resources for each process are given below:
Process |
Requested/Allocated |
||
|
R1 |
R2 |
R3 |
P1 |
3/2 |
0/0 |
10/4 |
P2 |
3/1 |
6/1 |
4/2 |
P3 |
0/0 |
4/1 |
8/4 |
P4 |
4/3 |
7/5 |
0/0 |
d)Determine the available
e) Is the system in a safe mode? If yes, give the sequence(s) that result(s) in a safe, if no (the system in a deadlock), what do you suggest to recover from it?
Step by stepSolved in 2 steps with 1 images
- When a program is adapted to run on multiple processors in a multiprocessor system, the execution time on each processor is comprised of computing time and the overhead time required for locked critical sections and/or to send data from one processor to another. Assume a program requires t = 100 s of execution time on one processor. When run p processors, each processor requires t/p s, as well as an additional 4 s of overhead, irrespective of the number of processors. Compute the per-processor execution time for 2, 4, 8, 16, 32, 64, and 128 processors. For each case, list the corresponding speedup relative to a single processor and the ratio between actual speedup versus ideal speedup (speedup if there was no overhead).arrow_forwardPre-emptive vs noND-pre-emptive scheduling should be distinguished.arrow_forwardin round robin when three processes have to enter the ready queue at the instant , if one process has just finished I/O the other has preempted from CPU due to expiration of its quantum and third (C) has just started. which one will be inserted last (ie lowest priority ) ? a) the process that has just finished I/O b) One of the three will be random be selected c) The process that has been pre-empted from CPU due to expiration of its quantum time. d) The process that has just startedarrow_forward
- assuming that there are two processes in secondary memory that are prepared to run. The first process is the most crucial, whilst the second is the least crucial, in terms of the processes. One process can only be active at once in the main memory. Describe how the CPU carries it out. You have the choice to describe the procedure utilizing any part of the CPU.arrow_forwardWhich of the following are true with respect to a mutiprogrammed, time-shared (multi-tasking) environments? (Select all that apply.) Context-switching provides optimal use of the CPU by scheduling ready processes as soon as the CPU is available. Context switching is a zero cost operation. There is better performance when the multiprogramming level is very low. Critical sections and race conditions are a direct result of context switching and programs sharing memory.arrow_forwardQuestion 4 Execute SRT for the following group of processes and complete the following table: Process A B C D E TArrival 0 2 4 6 8 Ts 2 3 5 1 4 TFinish Answer Answer Answer Answer Answer TR Answer  Answer  Answer  Answer  Answer  1. If the process arriving has the same remaining execution time as the process in the CPU, then the process that is using the CPU will have the highest priority. 2. If there is no process in the execution state and two or more processes have the shortest remaining time, then you will use the lowest PID criterion (using lexicographical order). Question 5 Execute HRRN for the following group of processes and complete the following table: Process A B C D TArrival 0 2 4 6 Ts 3 5 4 1 TFinish Answer Answer Answer Answer TR Answer  Answer Answer Answer  If two or more processes in the ready queue…arrow_forward
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY