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

Virtual Machine Architecture

  Virtual Machine Architecture A virtual machine can exist as a standalone machine or it can exist within a vApp. A virtual machine is a software computer that, like a physical computer, runs an operating system and applications. The virtual machine consists of a set of specification and configuration files and is backed by the physical resources of a host. Every virtual machine has virtual devices that provide the same functionality as physical hardware are more portable, more secure, and easier to manage. Virtual machines can be standalone, or they can exist within a vApp. A vApp is compound object composed of one or more virtual machines as well as one or more networks. 1.    Monolithic architecture 2.     Layerd archtecture . 3.     Virtual machine architecture 4.       Exokernel architecture 5.      Client server architecture   6.       Micro kernel architecture The following figure ...

Micro kernel architecture

  Micro kernel  architecture What is Kernel? A kernel is an important part of an OS that manages system resources. It also acts as a bridge between the software and hardware of the computer. It is one of the first program which is loaded on start-up after the bootloader. The Kernel is also responsible for offering secure access to the machine's hardware for various programs. It also decides when and how long a certain application uses specific hardware. What is Microkernel? Microkernel  is a software or code which contains the required minimum amount of functions, data, and features to implement an operating system. It provides a minimal number of mechanisms, which is good enough to run the most basic functions of an operating system. It allows other parts of the operating system to be implemented as it does not impose a lot of policies. Microkernels and their user environments are usually implemented in the C++ or C programming languages with a little bit of assembly. Ho...

Monolithic Architecture

  Monolithic Architecture Monolith means composed all in one piece. The  Monolithic  application describes a single-tiered  software  application in which different components combined into a single program from a single platform. Components can be: Authorization — responsible for authorizing a user Presentation — responsible for handling HTTP requests and responding with either HTML or JSON/XML (for web services APIs). Business logic — the application’s business logic. Database layer — data access objects responsible for accessing the database. Application integration — integration with other services (e.g. via messaging or REST API). Or integration with any other Data sources. Notification module — responsible for sending email notifications whenever needed. Example for Monolithic Approach Consider an example of Ecommerce application, that authorizes customer, takes an order, check products inventory, authorize payment and ships ordered products. This applicat...

Real-time system

  R eal-time system ·           In a real time operating system, a job is to be completed within the    rigid time constraints otherwise job loses its meaning. ·           A real time system function correctly only if it returns the correct result within its time constraints ·           Thus, in a    real-time system, the correctness of the    computation not only depends upon the logical correctness of the computation but also upon the time at which the result is produced. R eal-time system In a real time system various functions like process scheduling, memory management, I/O management and file  management are performed as follows : 1.         Process scheduling  . the real time system uses priority based pre-emptive scheduling. each process is assigned a certain level of ...

Client server architecture

  Client server architecture Client - server architecture  is distributed  model  representing dispersed responsibilities among independent computers integrated across a network. Therefore,  it's  easy to replace, repair, upgrade and relocate a  server  while  client  remains unaffected. Advantages of Client-Server Architecture: Organizations often seek  opportunities to maintain services and quality competition to sustain its market position with the help of technologies. Deployment of client-server computing in an organization will effectively increase its productivity through the usage of  cost-effective user interface, enhanced data storage, vast connectivity and reliable application services Improved Data Sharing:   Data is retained by usual business processes and manipulated on a server is available for designated users (clients) over an authorized access. Integration of Services:   Every client is given the opp...