Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

quickly please Process Burst Time Priority Arrival Time P1 8 2 0 P2 5 3 6 P3 1 1 8 P4 2 5 9 P5

image text in transcribed

quickly please

Process Burst Time Priority Arrival Time P1 8 2 0 P2 5 3 6 P3 1 1 8 P4 2 5 9 P5 6 4 10 Problem1 (40 pts) Consider the following set of processes, with the length of the CPU burst times given in milliseconds: a. Draw four Gantt charts illustrating the execution of the processes using FCFS, Preemptive SJF, a non-preemptive priority, and a RR (quantum=2) scheduling. (30 pts) Note: for the RR consider that the arriving time is 0 for all processes b. What is the average waiting time of each process for of the above scheduling algorithms? (10 pts) P1 P2 P3 P4 P5 Average FCFS SJF Priority RR Problem2 (40 pts) Given 3 concurrent processes P1, P2 and P3, we suppose that initially the share variable x =4. a) List all the possible values for x (15 pts) b) Use one or more semaphores (use primitives signal and wait) in order to get x=13 (15 pts) c) Can we use only one semaphore to get x=11? Explain your answer (10 pts) P1 P2 P3 x++; X =x*3; X=X - 2; Problem3 (20 pts) In the Dining-Philosophers Problem explained in the class, one possible solution to avoid the deadlock problem is to use an asymmetric solution (An odd philosopher picks up first her left chopsticks and even philosopher picks up her right chopstick and then right). Describe this solution using a pseudo-code algorithm. (RICE

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions