subject

The suspend and activate functions. The following pseudo code implements the suspend() and activate() functions. Two new states are introduced, suspended_ready and suspended_blocked, to keep track of the state in which a process was suspended. That is, a ready process moves to the suspended_ready state by the suspend function. Similarly, a blocked process moves to the suspended_blocked state by the suspend function. The activate function reverses the transitions. suspend() { if (p. process_state == blocked) p. process_state = suspended_blocked else p. process_state = suspended_ready activate() { if (p. process_state == suspended_ready) p. process_state = ready else p. process_state = blocked scheduler) } (a) What changes must be made to the scheduler or other functions to make suspend/activate work correctly?
(b) Why is the scheduler called only in activate but not in suspend?
(c) A process must be prevented from calling suspend() or activate() on itself. Why?
(d) A process must be prevented from calling suspend) on an already suspended process, or calling activate() on a currently active (ready) process. Why?

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:30
How can a user open a blank presentation? 1.on the file menu, click new, and then click recent templates 2.on the file menu, click new, and then click blank presentation 3. on the view menu, click templates, and then click recent templates 4. on the view menu, click samples, and then click blank presentation
Answers: 1
question
Computers and Technology, 22.06.2019 21:30
This graph compares the total cost of attending educational institutions in texas. the graph demonstrates that the cost at private and public technical schools greatly varies.
Answers: 2
question
Computers and Technology, 23.06.2019 06:20
What is a point-in-time measurement of system performance?
Answers: 3
question
Computers and Technology, 25.06.2019 02:30
On the pie chart below, which “slice” represents 30% of the budget?
Answers: 2
You know the right answer?
The suspend and activate functions. The following pseudo code implements the suspend() and activate(...
Questions
question
Mathematics, 28.01.2020 21:42
question
Mathematics, 28.01.2020 21:42
Questions on the website: 13722362