Skip to main content

Suspend a process

 

Suspend a process


A process is an active program. It can also be said as a program that is under execution. It is more than the program code as it includes the program counter, process stack, registers, program code etc. Compared to this, the program code is only the text section.

A process passes through different states as it executes. These states may be different in different operating systems. However, the common process states are explained below with the help of a diagram −

OS States

New

This is the state when the process has just been created. It is the initial state in the process life cycle.

Ready

In the ready state, the process is waiting to be assigned the processor by the short term scheduler, so it can run. This state is immediately after the new state for the process.

Ready Suspended

The processes in ready suspended state are in secondary memory. They were initially in the ready state in main memory but lack of memory forced them to be suspended and gets placed in the secondary memory.

Running

The process is said to be in running state when the process instructions are being executed by the processor. This is done once the process is assigned to the processor using the short-term scheduler.

Blocked

The process is in blocked state if it is waiting for some event to occur. This event may be I/O as the I/O events are executed in the main memory and don't require the processor. After the event is complete, the process again goes to ready state.

Blocked Suspended

This is similar to ready suspended. The processes in blocked suspended state are in secondary memory. They were initially in the blocked state in main memory waiting for some event but lack of memory forced them to be suspended and gets placed in the secondary memory. A process may go from blocked suspended to ready suspended if its work is done.

Terminated

The process is terminated once it finishes its execution. In the terminated state, the process is removed from main memory and its process control block is also deleted.



Reasons For Process Suspension

Swapping

The OS needs to release sufficient main memory to bring in a  process that is ready to execute.

Other OS reason

The OS may suspend a backgrounds or utility process or  a process that is suspected of causing a problem

 

Interactive user request

A user may wish to suspend the execution of a program for purpose of debugging or in connection with the use of a resource.

Timing

A process may be executed periodically and may be suspended while waiting for the next time interval

Parent process request

A parent process may wish to suspend the execution of a  descendant to examine or modify the suspended process or to coordinate the activity of descendants

 

 

 

 

 

 

 

 

 

 

Resuming A Process

·         Resuming a process means restarting it from the point at which it was suspended.

·         A suspended process needs another process for its restoration as it cannot resume itself.

·         The resume service is also called wakeup in some system

·         Whenever a process resumes any suspended process the OS inserts the target process PCB in the ready list and update its state from suspended to ready .

 

 

 

Changing The Priority Of A Process

·         The priority of a process can be  changed in run time

·         The process priority may be changed so as to increase or decrease the process ability to compete for system resources

 


Comments

Popular posts from this blog

Message Delivery Protocol

  Message Delivery Protocol ·          A protocol is a set of rules and conventions shared by communicating entities . ·          Message passing can be blocking or non blocking . ·          In blocking protocol , a sender process is blocked till the message selivered to the . in this case , sender process has guarantee that the message sent by it ie delivered before it continues its execution . A blocking protocol normally includes: 1.        Blocking send : the sender process is blocked until the message is received by the receiving process or by the mailbox. 2.        Blocking receive : the receiver nlocks until a message is available thus when both sender as well as receiver is blocked ,it is known as rebdevezevous . this combination allows for tight sysnchronization between process. ·...

Multitasking System

  Multitasking system ·           Technically , multitasking is same as multi programming ·           In a multitasking operating system, s single user can execute multiple programs at the same time ·           We can also say, multitasking is the system capability to work on more than one job or process at the same time. ·           It means that whenever a job needs to perform I/O operation, the cpu can be used for execting some other job                                                        diagram of multi tasking     ·           There are two type of multitasking : 1.       ...

Service provided By An Operating System.

  List of five service provided by an operating system. Explain how  each provides convenience to users?     The main purpose of operating system is to provide environment for the execution of programs. Thus an operating system provides certain services to program and the users of those programs. However , different operating system can provide different set of service. Some of the basis services provided by operating system are: 1.         Program execution ·          Operating system provides a convenient environment where users can run their programs ·          The operating system performs memory allocation to programs, load them into appropriate location so that they can execute. The users need not to worry about all these tasks.   2.         I/O Operation ·        ...

Multi user Operating System

  Multi user operating system ·           In a multi-user operating system, multiple number of user can access different resources of a computer at a same time. ·           The access is provided using a network that consists of various personal computer attached to a mainframe computer system.                                                              diagram of multi -user operating system       ·           The various personal computer can send and receive information to mainframe computer system. ·           The example    of multi-user OS are UNIX, windows 2000,novell netware.            sing...

Easytolearn E-book 2

                                                                                                                                                                          Description:here we give you pdf. about classification of operating system in which  we provide all information of classification in detail.