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

Hi Everybody; please, I need the answer for this question as soon as possible an

ID: 3666721 • Letter: H

Question

Hi Everybody;

please, I need the answer for this question as soon as possible

and I want it to be written to make it easy to copy for me, not being as a pictures.

Best Regards,

Deadlock and Starvation Deadlock- two or more processes are waiting indefinitely for an event that can be caused by only one of the waiting processes Let s and Q be two semaphores initialized to 1 P1 Po wait (S) wait () wait (Q) wait (S) signal (S) signal (2) signal (2) signal (S) Starvation-indefinite blocking A process may never be removed from the semaphore queue in which it is suspended Priority Inversion - Scheduling problem when lower-priority process holds a lock needed by higher-priority process Solved via priority-inheritance protocol Operating System Concapte-h Edition silberechatz, Galvin and Gagne 02013 5.30

Explanation / Answer

Public class my dead lock{

String1="java"

String2="unix"

Thread1 trd1=new thread{"mythread"}{

Public void run()

While(true){

Schyronized(str1){

Schyornized(str2){

Creare same thread seen above

Finally

Public void static main(stringA[])

My deadlock mdl= new mydead lock()

Mdl.trd.start()

Mdl.trd2.start()

{