-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

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

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 algorithm with a Time Quantum of 4ms and ignoring the context switch time, determine:

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 vector and need matrix

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?

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY