7 thoughts on “Final Exam Paper

  1. Q.12 (c) I got a solution without having to change the value of the semaphores. Is this correct?

    Romeo:
    while(true) {
    down(romeo)
    down(s)
    eat()
    up(s)
    up(juliet)
    }

    Juliet:
    while(true) {
    down(s)
    eat()
    up(s)
    up(juliet)
    down(romeo)
    }

      • I think question 3 should be X, if they all have to take R before taking any resource, there will never be any deadlock because the one that takes R will always get all the resources he wants

Comments are closed.