![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 25.02.2021 18:20 toricepeda82
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](/tpl/images/cats/User.png)
Answers: 3
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 13:30
Spoons are designed to be used for: spring hammering. applying body filler. identifying high and low spots. sanding highly formed areas.
Answers: 3
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 23:30
What are "open-loop" and "closed-loop" systems
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 03:00
With editing, word automatically displays a paste options button near the pasted or moved text. a. cut-and-paste b. drag-and-drop c. inline d. copy-and-carry
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 04:30
The ieee 802.11: defines standards for wireless local area network (wlan) communication protocols. identifies various computers or devices connected to a network. verifies any resource attached to another computer on a network that is different from the computer to which the user is logged on. connects multiple local area networks (lans) and wide area networks (wans).
Answers: 2
You know the right answer?
The following pseudo code implements the suspend() and activate() functions. Two new states are intr...
Questions
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 23.12.2019 02:31
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/en.png)
English, 23.12.2019 02:31
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/geografiya.png)
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.12.2019 02:31
![question](/tpl/images/cats/himiya.png)
Chemistry, 23.12.2019 02:31
![question](/tpl/images/cats/biologiya.png)
Biology, 23.12.2019 02:31
![question](/tpl/images/cats/himiya.png)
Chemistry, 23.12.2019 02:31
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/biologiya.png)
Biology, 23.12.2019 02:31
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 23.12.2019 02:31
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 23.12.2019 02:31
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.12.2019 02:31