Home » Operating System — Process, Process States, Process Life Cycle

Operating System

Chapter 1: Introduction to Operating System 

— Definition of Operating System.

— Evolution of operating systems – simple batch systems, multi-programmed batch systems, time sharing systems.

— Functions of an operating system

— Characteristics of Operating System

— Single user and multi-user operating systems

Open-source and closed-source operating systems.

Important Questions with their Answers of “Introduction to operating system”

— MCQs and Fill in Blanks

— Short term Questions

— Long Term Questions


Chapter 2: Process Overview

Definition of process, process states, process life cycle,

Process Control Block (PCB),

Process Scheduling – Scheduling queues,

Schedulers (short term, medium term and long term).

Dispatcher.

Context Switch.

Important Questions with their Answers of “Process Overview”

— MCQs and Fill in blanks

Short term Questions

Long Term Questions


Chapter 3: CPU Scheduling

  • CPU Scheduler,
  • Preemptive and non-preemptive scheduling.
  • Scheduling criteria – CPU utilization, Throughput, Turnaround time, Waiting time, Response time.
  • Scheduling Algorithms: First-Come-First-Serve, Shortest-Job-First, Priority Scheduling, Round-Robin.

Important Questions with their Answers of “CPU Scheduling”

  • MCQs and Fill in blanks
  • Short term Questions
  • Long Term Questions

Operating System — Process, Process States, Process Life Cycle


Process

A process is an instance of a program in execution. The execution of a process must progress in a sequential fashion.

To put it simply, we write our computer program in a text file and when we execute this program, it becomes a process that meets all the tasks mentioned in the program.
When a program is loaded into memory and it becomes a process, it can be divided into four segments- stack, heap, text and data. The following image shows a simplified layout of a process inside the main memory –

Sr. No.  Components  Description
1.  Stack  This contains the temporary data such as method/function parameters, local variables and return address.
2.  Heap  This is dynamically allocated memory to a process during its run time.
3.  Data  This includes the current activity represented by the value of Program Counter and the contents of the processor’s registers.
4.  Text  This contains the global and static variables.

Process State

Process state are those states which tells the status of of the process. Status of the process includes whether the Process has Executed or Whether the process is Waiting for Some input and output from the user and whether the Process is Waiting for the CPU to Run the Program after the Completion of the Process.

A Process has a five States:-

  1. New State
  2. Ready State
  3. Waiting State
  4. Running State
  5. Terminated State

Process Life Cycle

When a process is executed, it passes through different states. These steps may vary in different operating systems, and the names of these states are not standardized.

In general, a process can have one of the following five states at a time.

Sr. No.   Process States  Description
1.  Start  This is the initial state when a process is first started/created.
2.  Ready  When the Process is Ready to Execute but he is waiting for the CPU to Execute then this is called as the Ready State. After the Completion of the Input and outputs the Process will be on Ready State means the Process will Wait for the Processor to Execute.
3.  Running  When the Process is Running under the CPU, or When the Program is Executed by the CPU , then this is called as the Running process and when a process is Running then this will also provides us Some Outputs on the Screen.
4.  Waiting  Process moves into the waiting state if it needs to wait for a resource, such as waiting for user input, or waiting for a file to become available.
5.  Terminated  Once the process finishes its execution, or it is terminated by the operating system, it is moved to the terminated state where it waits to be removed from main memory.

 


Leave a comment

Your email address will not be published. Required fields are marked *

‘Operating System’ Practical

  1. To install and configure MS Windows 7/8/10 on a computer
  2. To get familiar with general Windows commands – ECHO, CLS, DIR, TREE, MD, CD, TYPE, RD, DEL, MOVE, COPY , REN, ATTRIB, COLOR, DATE, TIME, ERASE, FIND, FC, MORE, CMD, PATH, SYSTEMINFO, SHUTDOWN, TASKLIST, TASKKILL, VER, VOL, CHKDSK
  3. To use wildcard characters for copying, moving, renaming, and deleting files and directories in a given hierarchical directory structure under Windows’s command prompt.
  4. To get familiar with windows control panel components.
  5. To use Windows backup and restore features.
  6. To get familiar with commonly used Windows PowerShell cmdlets like Get-ChildItem, GetContent, Get-Command, Get-Help, Clear-Host, Copy-Item, Move-Item, Remove-Item, Rename-Item, Get-Location, Set-Location, Write-Output, Get-Process, Stop-Process.
  7. To write scripts in Windows PowerShell to automate tasks.