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

qestion c Midterm test 2, July 2015 You have 1 hour and 45 minutes to complete t

ID: 3919717 • Letter: Q

Question

   qestion c

Midterm test 2, July 2015 You have 1 hour and 45 minutes to complete this test. State your answers clearly 1. (20 points) a) Two concurrently running processes: P1 with a statement S1 and P2 with a statement S2. Use t after S2 has completed. State the initial value of the semaphore. he semaphore io synichronize both processes that make SI executed only maphart to?tahn" P20?3malkS2) // s2 run shght away my??to b) What will happen when a process implements semaphore as signal... wait instead of So SI was +7s2) //e. S2rctore wait signal? c) What will happen when a process implements semaphore as waits...wait's) instead of wait(s) .. signal (s)? 2. 130 points DOLL

Explanation / Answer

Question C)

When a process implements semaphore as wait(s)... wait(s), instead of wait(s)... signal(s), there is a very high possibility of starvation.

The possibility of startvation is caused by the process or thread will hold the common shared semaphore or say statement as by wait(s), and then will never be able to send a signal, such that the other processes will acknowledge the availability of the semaphore.