Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I. True/False (16 pts-4 pts each) 1. Shortest job first and priority-based CPU s

ID: 3707003 • Letter: I

Question

I. True/False (16 pts-4 pts each) 1. Shortest job first and priority-based CPU scheduling algorithms could result in starvation. 2. Preemptive scheduling allows a process to be interrupted in the midst of its execution, taking 3. Response time means the amount of time a process has been waiting in the ready queu 4. Mutex Lock method protect a critical section by first release0 a lock then acquire the lock. (True, False) the CPU away and allocating it to another process. (True, False) False) (True, False) e. (True, II. Short Answers 5. Please define following terms used in CPU synchronization and scheduling problems. (24 pts) (a) Dispatch Latency (b) Deadlock (c) Starvation

Explanation / Answer

I. True/False

i) True (shortest job first and priority queue scheduling algorithm could result in starvation)

ii) True ( Preemptive scheduling algorithm allowed to process to interrupted during executions)

iii) False

iv) True

II.

a) Dispatch Latency The most significant element in scheduling behavior for real-time applications is the provision of a real-time scheduling class. The term dispatch latency describes the amount of time it takes for a system to respond to a request for a process to begin operation.

b) Deadlock is a situation where two are more process cannot complete their execution. If there are two single instance R and S. if process P hold resource R and if process Q hold resource S, Process P required resource S to complete execution and to Process Q required resource R to complete execution. In this situation process P and Q will wait for resource for indefinite time and this situation is called deadlock.

c) Starvation: Starvation is a problem when high priority is always executing and a low priority process is always waiting for processor. In this mechanism low priority process is waiting for indefinite time or it it is blocked for indefinite times this situation is called starvation. Solution of starvation is aging by increasing the priority of process.