Computers and Technology

Exercise 4.4.6: wait/signal vs wait/notify. info about a different version of a monitor, developed for the programming language mesa, replaces the primitive "signal" with "notify", which does not block the invoking process on the urgent queue but allows the process to finish the current function. as a result, a process is able to execute multiple "notify" statements before exiting a function. two processes, p1 and p2, call the function f() in the following monitor and since x < 0, both become blocked on c. a process p3 calls g() and notifies both p1 and p2 that x is now greater than 0. monitor m { x = -1 f() { if (x < 0) c. wait x = h(x) } g() { x = 1 c. notify c. notify } (a) what could go wrong with this code and yield incorrect results? (b) how could the program be modified to avoid the problem?

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 05:00, 420420blazee
Are special characters that allow you to search for multiple words at the same time.
Answers: 2
image
Computers and Technology, 23.06.2019 15:20, yeahmaneee
What does a bonus object do? a. subtracts lives b. keeps track of a player's health c. gives a player an advantage d. makes text appear
Answers: 1
image
Computers and Technology, 24.06.2019 07:00, jordaaan101
Guys do you know sh27 cause he hacked me : ( pidgegunderson my old user
Answers: 2
image
Computers and Technology, 24.06.2019 11:20, isabelperez063
Every telecommunication setup uses two devices: one device to transmit data and one device to receive data. which device transmits frequencies to mobile phones? towers transmit frequencies to mobile phones.
Answers: 1
Do you know the correct answer?
Exercise 4.4.6: wait/signal vs wait/notify. info about a different version of a monitor, developed...

Questions in other subjects:

Konu
English, 25.11.2021 16:00
Konu
Mathematics, 25.11.2021 16:00
Konu
Chemistry, 25.11.2021 16:00