Computers and Technology

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?

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 22:30, ayoismeisjuam
What are compression artifacts? 1) visible defects in the picture caused by the nature of the compression algorithm. 2) numbers that tell a web server how much to compress a picture for faster transmission. 3) invisible defects in the picture preserved by lossless compression. 4) numbers that tell a photo editing program how much to compress a picture for faster transmission.
Answers: 3
image
Computers and Technology, 23.06.2019 07:30, barkonatree
What is the penalty for violating section 1201 of title 17 chapter 21 of the us code
Answers: 1
image
Computers and Technology, 25.06.2019 01:00, vane9317
Why was it important for the date format to be standardized by the international organization for standardization
Answers: 1
image
Computers and Technology, 25.06.2019 05:00, tshegofatso92
7. the cullerton park district holds a mini-olympics each summer. create a class named participant with fields for a name, age, and street address. include a constructor that assigns parameter values to each field and a tostring() method that returns a string containing all the values. also include an equals() method that determines two participants are equal if they have the same values in all three fields. create an application with two arrays of at least eight participants eachโ€”one holds participants in the mini-marathon, and the other holds participants in the diving competition. prompt the user for participant values. after the data values are entered, display values for participants who are in both events. save the files as participant. java and twoeventparticipants. java.
Answers: 2
Do you know the correct answer?
The following pseudo code implements the suspend() and activate() functions. Two new states are intr...

Questions in other subjects:

Konu
English, 02.11.2019 03:31
Konu
Mathematics, 02.11.2019 03:31