SlideShare a Scribd company logo
5
Most read
13
Most read
Operating System 17
Process Management
Prof Neeraj Bhargava
Vaibhav Khanna
Department of Computer Science
School of Engineering and Systems Sciences
Maharshi Dayanand Saraswati University Ajmer
Multiprogramming and Multitasking
• Multiprogramming needed for efficiency
– Single user cannot keep CPU and I/O devices busy at all
times
– Multiprogramming organizes jobs (code and data) so
CPU always has one to execute
– A subset of total jobs in system is kept in memory
– One job selected and run via job scheduling
– When it has to wait (for I/O for example), OS switches
to another job
Multiprogramming and Multitasking
• Timesharing (multitasking) is logical extension in which
CPU switches jobs so frequently that users can interact
with each job while it is running, creating interactive
computing
– Response time should be < 1 second
– Each user has at least one program executing in
memory process
– If several jobs ready to run at the same time  CPU
scheduling
– If processes don’t fit in memory, swapping moves
them in and out to run
– Virtual memory allows execution of processes not
completely in memory
Memory Layout for Multiprogrammed System
Process Management
• A process is a program in execution. It is a unit of work within the
system. Program is a passive entity, process is an active entity.
• Process needs resources to accomplish its task
– CPU, memory, I/O, files
– Initialization data
• Process termination requires reclaim of any reusable resources
• Single-threaded process has one program counter specifying location
of next instruction to execute
– Process executes instructions sequentially, one at a time, until
completion
• Multi-threaded process has one program counter per thread
• Typically system has many processes, some user, some operating
system running concurrently on one or more CPUs
– Concurrency by multiplexing the CPUs among the processes /
threads
Process Management Activities
• Creating and deleting both user and system processes
• Suspending and resuming processes
• Providing mechanisms for process synchronization
• Providing mechanisms for process communication
• Providing mechanisms for deadlock handling
The operating system is responsible for the following
activities in connection with process management:
Process Concept
• An operating system executes a variety of programs:
– Batch system – jobs
– Time-shared systems – user programs or tasks
• Textbook uses the terms job and process almost
interchangeably
• Process – a program in execution; process execution must
progress in sequential fashion
• Multiple parts
– The program code, also called text section
– Current activity including program counter, processor
registers
– Stack containing temporary data
• Function parameters, return addresses, local variables
– Data section containing global variables
– Heap containing memory dynamically allocated during run
time
Process Concept (Cont.)
• Program is passive entity stored on disk
(executable file), process is active
– Program becomes process when
executable file loaded into memory
• Execution of program started via GUI
mouse clicks, command line entry of its
name, etc
• One program can be several processes
– Consider multiple users executing the
same program
Process in Memory
Process State
• As a process executes, it changes state
– new: The process is being created
– running: Instructions are being executed
– waiting: The process is waiting for some event
to occur
– ready: The process is waiting to be assigned to
a processor
– terminated: The process has finished execution
Diagram of Process State
Process Control Block (PCB)
Information associated with each process
(also called task control block)
• Process state – running, waiting, etc
• Program counter – location of
instruction to next execute
• CPU registers – contents of all process-
centric registers
• CPU scheduling information- priorities,
scheduling queue pointers
• Memory-management information –
memory allocated to the process
• Accounting information – CPU used,
clock time elapsed since start, time
limits
• I/O status information – I/O devices
allocated to process, list of open files
CPU Switch From Process to Process
Threads
• So far, process has a single thread of
execution
• Consider having multiple program
counters per process
– Multiple locations can execute at once
• Multiple threads of control -> threads
• Must then have storage for thread
details, multiple program counters in PCB
• See next chapter
Assignment
1. What is process concept? Explain Process Management in
OS
2. Draw and describe the process states

More Related Content

PPT
PPTX
Os concepts 4 functions of os
PPTX
Operating system 05 functions of os
PPTX
Processes
PDF
Ch3 processes
PPTX
Operating system concepts
PPTX
Operating System
PPTX
Processes and operating systems
Os concepts 4 functions of os
Operating system 05 functions of os
Processes
Ch3 processes
Operating system concepts
Operating System
Processes and operating systems

What's hot (20)

PPTX
Operating system 31 multiple processor scheduling
PPTX
Os unit 2
PPTX
Cpu and its execution of statements
PDF
ITFT_Device management in Operating System
PDF
CSI-503 - 2. Processor Management
PPT
08 operating system support
PPT
08 operating system support
PPTX
Parallel Processing
PPTX
Unit 1 operating system
PPTX
Process Management
PPT
Process management
PPTX
MULTILEVEL QUEUE SCHEDULING
PDF
6multiprogrammingtimesharing 130112050125-phpapp01
PPTX
Operating system 06 operating system classification
PPTX
Operating system 08 time sharing and multitasking operating system
PPT
Lecture5
PPT
Computer system
Operating system 31 multiple processor scheduling
Os unit 2
Cpu and its execution of statements
ITFT_Device management in Operating System
CSI-503 - 2. Processor Management
08 operating system support
08 operating system support
Parallel Processing
Unit 1 operating system
Process Management
Process management
MULTILEVEL QUEUE SCHEDULING
6multiprogrammingtimesharing 130112050125-phpapp01
Operating system 06 operating system classification
Operating system 08 time sharing and multitasking operating system
Lecture5
Computer system
Ad

Similar to Operating system 17 process management (20)

PPTX
Operating Systems Process Management.pptx
PDF
Unit 1.1.pdfOperating_SystemOperating_System
PPT
23565104 process-management(2)
PPTX
Operating System Process Management.pptx
PPTX
Process management1
PDF
UNIT - 3 PPT(Part- 1)_.pdf
PPTX
Unit 1 process management operating system.pptx
PDF
Process Management
PDF
Process Management.pdf
PDF
Process And Scheduling Algorithms in os
PDF
operating systems classification university lec 2
PPTX
ch2nvbjdvsbjbjfjjfjf j Process Mangement.pptx
PDF
Lecture - 1_Process Management.pdf
PPT
Process Basics.ppt
PPTX
OS-Unit-2-Part-1.pptx
PPTX
3. Process Concept in operating system.pptx
PPTX
operating system module 2 presentation notes
PPTX
CSC204 - Chapter 3.1.pptx
PPTX
52bf066dbfcc4d739fa99d255dba287a.pptx
PPT
Processes Control Block (Operating System)
Operating Systems Process Management.pptx
Unit 1.1.pdfOperating_SystemOperating_System
23565104 process-management(2)
Operating System Process Management.pptx
Process management1
UNIT - 3 PPT(Part- 1)_.pdf
Unit 1 process management operating system.pptx
Process Management
Process Management.pdf
Process And Scheduling Algorithms in os
operating systems classification university lec 2
ch2nvbjdvsbjbjfjjfjf j Process Mangement.pptx
Lecture - 1_Process Management.pdf
Process Basics.ppt
OS-Unit-2-Part-1.pptx
3. Process Concept in operating system.pptx
operating system module 2 presentation notes
CSC204 - Chapter 3.1.pptx
52bf066dbfcc4d739fa99d255dba287a.pptx
Processes Control Block (Operating System)
Ad

More from Vaibhav Khanna (20)

PPTX
Information and network security 47 authentication applications
PPTX
Information and network security 46 digital signature algorithm
PPTX
Information and network security 45 digital signature standard
PPTX
Information and network security 44 direct digital signatures
PPTX
Information and network security 43 digital signatures
PPTX
Information and network security 42 security of message authentication code
PPTX
Information and network security 41 message authentication code
PPTX
Information and network security 40 sha3 secure hash algorithm
PPTX
Information and network security 39 secure hash algorithm
PPTX
Information and network security 38 birthday attacks and security of hash fun...
PPTX
Information and network security 37 hash functions and message authentication
PPTX
Information and network security 35 the chinese remainder theorem
PPTX
Information and network security 34 primality
PPTX
Information and network security 33 rsa algorithm
PPTX
Information and network security 32 principles of public key cryptosystems
PPTX
Information and network security 31 public key cryptography
PPTX
Information and network security 30 random numbers
PPTX
Information and network security 29 international data encryption algorithm
PPTX
Information and network security 28 blowfish
PPTX
Information and network security 27 triple des
Information and network security 47 authentication applications
Information and network security 46 digital signature algorithm
Information and network security 45 digital signature standard
Information and network security 44 direct digital signatures
Information and network security 43 digital signatures
Information and network security 42 security of message authentication code
Information and network security 41 message authentication code
Information and network security 40 sha3 secure hash algorithm
Information and network security 39 secure hash algorithm
Information and network security 38 birthday attacks and security of hash fun...
Information and network security 37 hash functions and message authentication
Information and network security 35 the chinese remainder theorem
Information and network security 34 primality
Information and network security 33 rsa algorithm
Information and network security 32 principles of public key cryptosystems
Information and network security 31 public key cryptography
Information and network security 30 random numbers
Information and network security 29 international data encryption algorithm
Information and network security 28 blowfish
Information and network security 27 triple des

Recently uploaded (20)

PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
Digital Systems & Binary Numbers (comprehensive )
PPTX
Computer Software and OS of computer science of grade 11.pptx
PPTX
assetexplorer- product-overview - presentation
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
top salesforce developer skills in 2025.pdf
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Nekopoi APK 2025 free lastest update
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
Transform Your Business with a Software ERP System
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
Introduction to Artificial Intelligence
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
Which alternative to Crystal Reports is best for small or large businesses.pdf
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Digital Systems & Binary Numbers (comprehensive )
Computer Software and OS of computer science of grade 11.pptx
assetexplorer- product-overview - presentation
Adobe Illustrator 28.6 Crack My Vision of Vector Design
top salesforce developer skills in 2025.pdf
Reimagine Home Health with the Power of Agentic AI​
Nekopoi APK 2025 free lastest update
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Transform Your Business with a Software ERP System
2025 Textile ERP Trends: SAP, Odoo & Oracle
Introduction to Artificial Intelligence
VVF-Customer-Presentation2025-Ver1.9.pptx
Design an Analysis of Algorithms I-SECS-1021-03
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Odoo Companies in India – Driving Business Transformation.pdf
Design an Analysis of Algorithms II-SECS-1021-03

Operating system 17 process management

  • 1. Operating System 17 Process Management Prof Neeraj Bhargava Vaibhav Khanna Department of Computer Science School of Engineering and Systems Sciences Maharshi Dayanand Saraswati University Ajmer
  • 2. Multiprogramming and Multitasking • Multiprogramming needed for efficiency – Single user cannot keep CPU and I/O devices busy at all times – Multiprogramming organizes jobs (code and data) so CPU always has one to execute – A subset of total jobs in system is kept in memory – One job selected and run via job scheduling – When it has to wait (for I/O for example), OS switches to another job
  • 3. Multiprogramming and Multitasking • Timesharing (multitasking) is logical extension in which CPU switches jobs so frequently that users can interact with each job while it is running, creating interactive computing – Response time should be < 1 second – Each user has at least one program executing in memory process – If several jobs ready to run at the same time  CPU scheduling – If processes don’t fit in memory, swapping moves them in and out to run – Virtual memory allows execution of processes not completely in memory
  • 4. Memory Layout for Multiprogrammed System
  • 5. Process Management • A process is a program in execution. It is a unit of work within the system. Program is a passive entity, process is an active entity. • Process needs resources to accomplish its task – CPU, memory, I/O, files – Initialization data • Process termination requires reclaim of any reusable resources • Single-threaded process has one program counter specifying location of next instruction to execute – Process executes instructions sequentially, one at a time, until completion • Multi-threaded process has one program counter per thread • Typically system has many processes, some user, some operating system running concurrently on one or more CPUs – Concurrency by multiplexing the CPUs among the processes / threads
  • 6. Process Management Activities • Creating and deleting both user and system processes • Suspending and resuming processes • Providing mechanisms for process synchronization • Providing mechanisms for process communication • Providing mechanisms for deadlock handling The operating system is responsible for the following activities in connection with process management:
  • 7. Process Concept • An operating system executes a variety of programs: – Batch system – jobs – Time-shared systems – user programs or tasks • Textbook uses the terms job and process almost interchangeably • Process – a program in execution; process execution must progress in sequential fashion • Multiple parts – The program code, also called text section – Current activity including program counter, processor registers – Stack containing temporary data • Function parameters, return addresses, local variables – Data section containing global variables – Heap containing memory dynamically allocated during run time
  • 8. Process Concept (Cont.) • Program is passive entity stored on disk (executable file), process is active – Program becomes process when executable file loaded into memory • Execution of program started via GUI mouse clicks, command line entry of its name, etc • One program can be several processes – Consider multiple users executing the same program
  • 10. Process State • As a process executes, it changes state – new: The process is being created – running: Instructions are being executed – waiting: The process is waiting for some event to occur – ready: The process is waiting to be assigned to a processor – terminated: The process has finished execution
  • 12. Process Control Block (PCB) Information associated with each process (also called task control block) • Process state – running, waiting, etc • Program counter – location of instruction to next execute • CPU registers – contents of all process- centric registers • CPU scheduling information- priorities, scheduling queue pointers • Memory-management information – memory allocated to the process • Accounting information – CPU used, clock time elapsed since start, time limits • I/O status information – I/O devices allocated to process, list of open files
  • 13. CPU Switch From Process to Process
  • 14. Threads • So far, process has a single thread of execution • Consider having multiple program counters per process – Multiple locations can execute at once • Multiple threads of control -> threads • Must then have storage for thread details, multiple program counters in PCB • See next chapter
  • 15. Assignment 1. What is process concept? Explain Process Management in OS 2. Draw and describe the process states