Chat with us, powered by LiveChat Assignment problem Sloving | All Paper
+1(978)310-4246 credencewriters@gmail.com
  

Assignment-2problem solvingQ 3.2: Assume at time 5, no system resources are being usedexcept for the processor and memory. Now consider the following events:At time 5: P1 executes a command to read from disk unit 3.At time 15: P5’s time slice expires.At time 18: P7 executes a command to write to disk unit 3.At time 20: P3 executes a command to read from disk unit 2.At time 24: P5 executes a command to write to disk unit 3.At time 28: P5 is swapped out.At time 33: An interrupt occurs from disk unit 2: P3’s read iscomplete.At time 36: An interrupt occurs from disk unit 3: P1’s read iscomplete.At time 38: P8 terminates.At time 40: An interrupt occurs from disk unit 3: P5’s write iscomplete.At time 44: P5 is swapped back in.At time 48: An interrupt occurs from disk unit 3: P7’s write iscomplete.For each time 22, 37, and 47, identify which state each process isin. If a process is blocked, further identify the event on which it isblocked.Q 3.4: For the seven-state process model of Figure 3.9b , draw aqueuing diagram similar to that of Figure 3.8b .Q.4.4. Consider an environment in which there is a one-to-onemapping between user-level threads and kernel-level threads thatallows one or more threads within a process to issue blockingsystem calls while other threads continue to run. Explain why thismodel can make multithreaded programs run faster than theirsingle-threaded counterparts on a uniprocessor computer.Q4.5. If a process exits and there are still threads of that process running, will they continue to run?Q6.5) Given the following state for the Banker’s Algorithm. 6 processes P0 through P5 4 resource types: A (15 instances); B (6 instances) C (9 instances); D (10 instances) Snapshot at time T0:Available ABCD6354Current allocationMaximum demandProcess ABCDABCDP020219555P101112233P241027544P310013332P411005221P510114444a. Verify that the Available array has been calculated correctly. b. Calculate the Need matrix. c. Show that the current state is safe, that is, show a safe sequence of processes. In addition, to the sequence show how the Available (working array) changes as each process terminates.d. Given the request (3,2,3,3) from Process P5. Should this request be granted? Why or why not?Q 6.11 )6Consider a system with a total of 150 units of memory, allocated to three processes as shown: Process Max Hold 170452604036015Apply the banker’s algorithm to determine whether it would be safe to grant each of the following requests. If yes, indicate a sequence of terminations that could be guaranteed possible. If no, show the reduction of the resulting allocation table. a. A fourth process arrives, with a maximum memory need of 60 and an initial need of 25 units. b. A fourth process arrives, with a maximum memory need of 60 and an initial need of 35 units.Q 6.15. Consider a system consisting of four processes and a single resource. The current state of the claim and allocation matrices are: C =3 2 9 7 -A =1 1 3 2What is the minimum number of units of the resource needed to be available for this state to be safe?