Question

What is Process Suspension? What is Process Switching? Explain their purposes and difference.

What is Process Suspension? What is Process Switching? Explain their purposes and difference.

Homework Answers

Answer #1

Process suspension.

When all the processes in main memory are in the Blocked state, the operating system can suspended one process by putting it in the Suspended state and transferring it to disk. The space that is freed up in the memory can then be used to bring in another process

Many OS are built around (Ready, Running, Blocked) states. But there is one more state that may aid in the operation of an OS - suspended state.

When none of the processes occupying the main memory is in a Ready state, OS swaps one of the blocked processes out onto to the Suspend queue.

When a Suspended process is ready to run it moves into Ready, Suspend queue. Thus we have two more state: Blocked_Suspend, Ready_Suspend

purpose for process suspension.

  • Swapping
  • Timing
  • Interactive User request
  • Parent process request

----------------------------------------------------------------------------------------

Process switching.  

process switch may occur any time that the operating system has gained control from the currently running process.

Considering that the system interrupts, there are two types of system interrupts out of which one is simply referred to as an interrupt and the other as a trap.

when to switch process:

supervisor call: explicit request by program ex from file .

The process will probably will blocked .

trap : an error resulted from the last instructions .

It may caused the process to be moved to terminal state

interrupt :cause of external execution of current process.

steps to process switch :

  1. save cpu context (mode switch from user mode to kernal mode using mode bit.)
  2. Update pcb of current process .
  3. Move pcb of current process in appropriate queue.
  4. Select another process for execution .(by cpu scheduler)
  5. Update of selected process
  6. Update memory management structures
  7. Restore cpu context of new pcb(mode switch from kernel mode to user mode )

Purpose : process switch is a operating system scheduler change from one running program to another. This requires saving all of the state of the currently executing program, including its register state, associated kernel state, and all of its virtual memory configuration. All of the state of the new program is then loaded and execution continues.

Difference between process switching and process suspension are as follows :

process suspension:

  • Suspended process is not immediately available .
  • ​​​​Process may or may not be waiting on an event
  • Process may not be removed from suspended state until agents order dor the removal .

Process switching:

  • Process switch also called as context switch which involves in saving information .
  • Updating the control information .
  • And restore the cpu information.
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Thoroughly explain the difference between a compound, a mixture, a solution, and a suspension.
Thoroughly explain the difference between a compound, a mixture, a solution, and a suspension.
2)why suspension is not stable explain it in detail
2)why suspension is not stable explain it in detail
Explain the difference between using the nursing process in family nursing and using the nursing process...
Explain the difference between using the nursing process in family nursing and using the nursing process in working with individuals
what are the purposes and advantages of the intermediate sanctioning process including the types of resources...
what are the purposes and advantages of the intermediate sanctioning process including the types of resources that can be used as sanctioning tools? for cja 113
What are the advantages and disadvantages of suspension feeding?
What are the advantages and disadvantages of suspension feeding?
Explain switching of energy substrates for energy production during 30 minutes running.
Explain switching of energy substrates for energy production during 30 minutes running.
explain why it is possible to create a modulated signal mtcoswct using a switching modulator
explain why it is possible to create a modulated signal mtcoswct using a switching modulator
Describe how a reversible and irreversible process different at the molecular level? What is the difference,...
Describe how a reversible and irreversible process different at the molecular level? What is the difference, on a molecular level, between and isothermal and an adiabatic process? Using the maxwell construction, explain how the vapor pressure is chosen?
Explain what is meant by the stabilization effects which are one of the purposes of the...
Explain what is meant by the stabilization effects which are one of the purposes of the income tax?
What is the difference between a DBLC process and a SDLC process? Is one better than...
What is the difference between a DBLC process and a SDLC process? Is one better than the other?