# M298 final mock 5 7 q7 what is a race condition give

• Test Prep
• 7

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 5 - 7 out of 7 pages.

Q7.What is a race condition? Give an example.[5 Marks]
Q8.Describe a scenario in which first-in-first-out FIFO page replacement results inhigh paging overhead, but least recently used LRU does better.[5 Marks]
Part III: Problem Solving Questions (40 Marks)This part consists of TWO questions. Attempt all questions. You are advisednot to spend more than 50 minutes on this part.Q1.Write a java program that implement a client program requesting current datefromserver.Thefollowingobjectscouldbehelpful;BufferedReader(),getInputStream(), readLine(), println().[16 Marks]
M298 Final Mock5/7
Q2.Solve the following scheduling problems:[24 Marks]A.Suppose the following five processes P1, P2, P3, P4 and P5 are given theburst times 10, 1, 2, 1 and 5 and with priorities 3, 1, 4, 5 and 2consecutively. Using thePriorityscheduling, draw the Gantt chart for theschedule and compute the average waiting time if the fourprocesses.[8 Marks]Answer:B.Suppose the following four processes P1, P2, P3 and P4 are given the bursttimes 8, 4, 9 and 5 and with arrival times 0, 1, 2 and 3 consecutively. UsingthePreemtive Shortest-Job-First (SJF)scheduling, draw the Gantt chart forthe schedule and compute the average waiting time if the four processes.[8 Marks]Answer:C.Suppose the following three processes P1, P2 and P3 are given the bursttimes 24, 3 and 3 consecutively. Draw the Gantt chart for theRound RobinScheduling.[8 Marks]
M298 Final Mock6/7
M298 Final Mock7/7- End of Exam -
End of preview. Want to read all 7 pages?