subject

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: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:30
Exchanging which type of data uses the least bandwidth? music photographs video voice bandwidth- the amount of data that can be moved between two points in a set time period
Answers: 1
question
Computers and Technology, 22.06.2019 14:30
Create a pseudocode design to prompt a student for their student id and the titles of the three classes they want to add. the solution should display the student’s id and a total bill. • bill a student using the following rules: o students can only add up to 3 classes at a time.
Answers: 3
question
Computers and Technology, 22.06.2019 21:00
Which of these is most responsible for differences between the twentieth century to the twenty-first century?
Answers: 2
question
Computers and Technology, 23.06.2019 15:00
Visually impaired individuals generally rely on the for navigation. thus, designers need to ensure that mouse-specific inputs, such as pointing, clicking, and hovering, can be done without a mouse.
Answers: 1
You know the right answer?
The following pseudo code implements the suspend() and activate() functions. Two new states are intr...
Questions
question
Chemistry, 12.11.2019 05:31
question
Mathematics, 12.11.2019 05:31
question
Mathematics, 12.11.2019 05:31