![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 18.04.2021 03:10 monsterwins5001
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](/tpl/images/cats/User.png)
Answers: 2
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 11:00
Eva has many contacts on the professional networking site she uses which contacts are considered second degree
Answers: 3
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 21:00
Kirk found a local community college with a two-year program and he is comparing the cost with that of an out-of-state two-year school. what is the expected total cost for one year at the local community college if kirk lives at home? what is the expected total cost for one year at the out-of-state school if kirk lives on campus?
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 02:00
Which software would you use to create a print design? a. illustrator b. audacity c. reaper d. dreamweaver
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 07:30
Which option allows you to view slides on the full computer screen?
Answers: 1
You know the right answer?
The suspend and activate functions. The following pseudo code implements the suspend() and activate(...
Questions
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 20.10.2021 14:00
![question](/tpl/images/cats/fizika.png)
Physics, 20.10.2021 14:00
![question](/tpl/images/cats/mat.png)
Mathematics, 20.10.2021 14:00
![question](/tpl/images/cats/ap.png)
Advanced Placement (AP), 20.10.2021 14:00
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 20.10.2021 14:00
![question](/tpl/images/cats/himiya.png)
Chemistry, 20.10.2021 14:00
![question](/tpl/images/cats/User.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 20.10.2021 14:00
![question](/tpl/images/cats/es.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 20.10.2021 14:00
![question](/tpl/images/cats/en.png)
English, 20.10.2021 14:00
![question](/tpl/images/cats/mat.png)
Mathematics, 20.10.2021 14:00
![question](/tpl/images/cats/istoriya.png)
History, 20.10.2021 14:00
![question](/tpl/images/cats/fr.png)
French, 20.10.2021 14:00
![question](/tpl/images/cats/ekonomika.png)
Business, 20.10.2021 14:00
![question](/tpl/images/cats/istoriya.png)
History, 20.10.2021 14:00
![question](/tpl/images/cats/mat.png)
Mathematics, 20.10.2021 14:00
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 20.10.2021 14:00