Question: Question 1: Consider three processes (P1, P2, and P3) and a dispatcher (DSP) having process trace given in Table 1. The assignments of the requested

 Question 1: Consider three processes (P1, P2, and P3) and adispatcher (DSP) having process trace given in Table 1. The assignments of

Question 1: Consider three processes (P1, P2, and P3) and a dispatcher (DSP) having process trace given in Table 1. The assignments of the requested resources (disk files and printer) by the processes are also mentioned. You are supposed to fill in the cells of Table 2 as instructed below, to draw the processor timeline. Note that it is uniprocessor computing environment. Also, remember that each instruction is executed in 1 timestamp: [5 Marks] Instructions: Fill cells with for running state, for blocked state, for ready state, and for exit state. Use dispatcher (DSP) for switching between the processes. Each time, the processor is assigned to a process for executing 3 instructions only. Use round-robin scheduling technique. Table 1: Process trace DSP 100 101 P1 5000 5001 5002 Read Filel 5003 5004 P2 1000 1001 1002 1003 1004 1005 1006 1007 P3 1301 1302 Write File2 1303 1304 1305 Print File2 1306 Table 2: Process execution timeline. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 PI P2 P3 DSP Question 2: Taking into consideration the solution of Question-1, answer the following questions: [5 Marks] a) At time stamp 6 and 16, what the state of P1? b) At time stamp 6 and 24, what the state of P2? c) At time stamp 13 and 34, what the state of P3? d) At time stamp 28, which process is executing? e) Which process contains critical section? In that process, which line of code uses critical resource? f) List any possible scenario that may cause deadlock. g) List any possible scenario that may cause starvation. h) What is mutual exclusion and how to implement to avoid deadlock and starvation situations

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!