Chapter3 OS Essentials

Topics: Process, Parent process, Term Pages: 3 (619 words) Published: February 3, 2014


3.6 What are the differences among short-term, medium term, and long-term scheduling?


The short-term scheduler selects from the ready processes the next process to run and gives it the CPU. The long-term scheduler selects from the pool of processes that are waiting on disk and loads the selected processes into memory. These processes have not yet begun their execution. The medium-term scheduler takes processes that are currently in memory and selects those to be swapped out to disk. These processes will be swapped back in at a later point. This is done to improve process mix or because of memory requirements like overcommitted and needs to free up memory.

A primary difference is in the frequency of their execution. The short-term scheduler must select a new process quite often. Long-term is used much less often since it handles placing jobs in the system and may wait a while for a job to finish before it admits another one.

3.7. Describe the actions taken by a kernel to context-switch between processes.

The kernel saves the state of the currently executing process into its Process Control Block (PCB ). The state includes the values of all registers, process ID, memory information, list of open files, and so forth. It then reloads the context of a previously suspended process and sets the instruction counter to the restored processes next instruction.

3.8 Construct a process tree similar to Figure 3.9. To obtain process information for the UNIX or Linux system, use the command ps -ael. Use the command man ps to get more information about the ps command. On Windows systems, you will have to use the task manager.


3.9 Including the initial parent process, how many processes are created by the program shown in Figure 3.28?

8 processes are created. The program online includes printf() statements to better understand how many processes have been created.

3.10 Using...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • Essay about Chapter3
  • Chapter3 Essay
  • Essay on Arrakis OS
  • Chrome Os Essay
  • Gatsby Chapter3 Essay
  • It Essentials Essay
  • Essay on Chapter3 Homework
  • Ranwang Chapter3 Essay

Become a StudyMode Member

Sign Up - It's Free