SlideShare a Scribd company logo
1 of 35
PROCESS MANAGEMENT INPROCESS MANAGEMENT IN
OPERATING SYSTEMSOPERATING SYSTEMS
V.V. SUBRAHMANYAMV.V. SUBRAHMANYAM
SOCIS, IGNOUSOCIS, IGNOU
DATE: 12-05-06DATE: 12-05-06
TIME: 2-30PM TO 3-15PMTIME: 2-30PM TO 3-15PM
ObjectivesObjectives
 Process ConceptProcess Concept
 Process StatesProcess States
 Operations on ProcessesOperations on Processes
 Scheduling AlgorithmsScheduling Algorithms
 Interprocess CommunicationInterprocess Communication
 Communication in Client-Server SystemsCommunication in Client-Server Systems
ProcessProcess
 The term “process” was first used by theThe term “process” was first used by the
operating system designers of theoperating system designers of the
MULTICS system way back in 1960s.MULTICS system way back in 1960s.
Contd..Contd..
 The CPU executes a large number ofThe CPU executes a large number of
programs. While its main concern is theprograms. While its main concern is the
execution of user programs, the CPU is alsoexecution of user programs, the CPU is also
needed for other system activities. Theseneeded for other system activities. These
activities are called processes.activities are called processes.
 A process isA process is
 a program in execution.a program in execution.
 A batch job is a process.A batch job is a process.
 A time-shared user programA time-shared user program
 A system task, such as spoolingA system task, such as spooling
Program Vs ProcessProgram Vs Process
 A program is a passive entity, while aA program is a passive entity, while a
process is an active entity.process is an active entity.
 It is known that two processes may beIt is known that two processes may be
associated with the same program; they areassociated with the same program; they are
nevertheless considered two separatenevertheless considered two separate
execution sequences.execution sequences.
Contd..Contd..
 In multiprogramming systems, processes areIn multiprogramming systems, processes are
performed in a pseudo-parallelism as if eachperformed in a pseudo-parallelism as if each
process has its own processor.process has its own processor.
 In fact, there is only one processor but itIn fact, there is only one processor but it
switches back and forth from process toswitches back and forth from process to
process.process.
 ExecutionExecution of a process. includes “of a process. includes “processorprocessor
(CPU) burst”(CPU) burst” andand “I/O burst”“I/O burst” respectively.respectively.
Processor bound and I/O boundProcessor bound and I/O bound
 Processes can be described as either:Processes can be described as either:
 I/O-I/O-bound processbound process – spends more time doing– spends more time doing
I/O than computations, many short CPUI/O than computations, many short CPU
bursts.bursts.
 CPUCPU--bound processbound process – spends more time doing– spends more time doing
computations; few very long CPU bursts.computations; few very long CPU bursts.
Process Mgmt by the OSProcess Mgmt by the OS
 Process creation; Termination of the processProcess creation; Termination of the process
 Controlling the progress of the processControlling the progress of the process
 Process SchedulingProcess Scheduling
 DispatchingDispatching
 Interrupt handling / Exceptional handlingInterrupt handling / Exceptional handling
 Switching between the processesSwitching between the processes
 Process synchronizationProcess synchronization
 Interprocess communication supportInterprocess communication support
 Management of Process Control BlocksManagement of Process Control Blocks
Process RelationshipProcess Relationship
 In the concurrent environment, basicallyIn the concurrent environment, basically
processes has two relationship, competitionprocesses has two relationship, competition
and cooperation. In the concurrentand cooperation. In the concurrent
environment, processes compete with eachenvironment, processes compete with each
other for allocation of system resources toother for allocation of system resources to
execute their instructions. In addition, aexecute their instructions. In addition, a
collection of related processes thatcollection of related processes that
collectively represent a single logicalcollectively represent a single logical
application cooperate to each other.application cooperate to each other.
Process StateProcess State
 As a process executes, it changesAs a process executes, it changes statestate
 NewNew: The process is being created.: The process is being created.
 RunningRunning: Instructions are being executed.: Instructions are being executed.
 WaitingWaiting: The process is waiting for some: The process is waiting for some
event to occur.event to occur.
 ReadyReady: The process is waiting to be: The process is waiting to be
assigned to a process.assigned to a process.
 TerminatedTerminated: The process has finished: The process has finished
execution.execution.
Diagram of Process StateDiagram of Process State
Process Table or PCBProcess Table or PCB
 To implement the process model, the operatingTo implement the process model, the operating
system maintains a table, an array of structures,system maintains a table, an array of structures,
called thecalled the process table or a process control blockprocess table or a process control block..
Each entry identifies a process with informationEach entry identifies a process with information
such as process state, its program counter, stacksuch as process state, its program counter, stack
pointer, memory allocation, the status of its openpointer, memory allocation, the status of its open
files, its accounting and scheduling information. Infiles, its accounting and scheduling information. In
another words, it must contain everything aboutanother words, it must contain everything about
the process that must be saved when the process isthe process that must be saved when the process is
switched from the running state to the ready stateswitched from the running state to the ready state
so that it can be restarted later as if it had neverso that it can be restarted later as if it had never
been stopped.been stopped.
Process Control Block (PCB)Process Control Block (PCB)
Context SwitchContext Switch
Process Scheduling QueuesProcess Scheduling Queues
 Job queue – set of all processes in theJob queue – set of all processes in the
system.system.
 Ready queue – set of all processes residingReady queue – set of all processes residing
in main memory, ready and waiting toin main memory, ready and waiting to
execute.execute.
 Device queues – set of processes waiting forDevice queues – set of processes waiting for
an I/O device.an I/O device.
 Process migration between the variousProcess migration between the various
queues.queues.
Ready Queue And Various I/O Device QueuesReady Queue And Various I/O Device Queues
Representation of ProcessRepresentation of Process
SchedulingScheduling
SchedulersSchedulers
 Long-term scheduler (or job scheduler) –Long-term scheduler (or job scheduler) –
selects which processes should be broughtselects which processes should be brought
into the ready queue.into the ready queue.
 Short-term scheduler (or CPU scheduler) –Short-term scheduler (or CPU scheduler) –
selects which process should be executedselects which process should be executed
next and allocates CPU.next and allocates CPU.
Addition of Medium TermAddition of Medium Term
SchedulingScheduling
Schedulers (Cont.)Schedulers (Cont.)
 Short-term scheduler is invoked veryShort-term scheduler is invoked very
frequently (milliseconds)frequently (milliseconds) ⇒⇒ (must be fast).(must be fast).
 Long-term scheduler is invoked veryLong-term scheduler is invoked very
infrequently (seconds, minutes)infrequently (seconds, minutes) ⇒⇒ (may be(may be
slow).slow).
 The long-term scheduler controls theThe long-term scheduler controls the degreedegree
of multiprogramming.of multiprogramming.
Scheduling AlgorithmsScheduling Algorithms
 The goal of scheduling algorithm is toThe goal of scheduling algorithm is to
identify the process whose selection willidentify the process whose selection will
result in the “best” possible systemresult in the “best” possible system
performance.performance.
 A major division among schedulingA major division among scheduling
algorithms is that whether they support pre-algorithms is that whether they support pre-
emptive or non-preemptive schedulingemptive or non-preemptive scheduling
discipline.discipline.
Preemptive SchedulingPreemptive Scheduling
 Preemption means the operating systemPreemption means the operating system
moves a process from running to readymoves a process from running to ready
without the process requesting it.without the process requesting it.
 Round Robin scheduling, priority basedRound Robin scheduling, priority based
scheduling or event driven scheduling arescheduling or event driven scheduling are
considered to the preemptive schedulingconsidered to the preemptive scheduling
algorithms.algorithms.
Non- Preemptive schedulingNon- Preemptive scheduling
 A scheduling discipline is non-preemptive ifA scheduling discipline is non-preemptive if
once a process has been allotted to the CPU,once a process has been allotted to the CPU,
the CPU cannot be taken away from thethe CPU cannot be taken away from the
process.process.
 First come first served (FCFS), Shortest jobFirst come first served (FCFS), Shortest job
first (SJF), Shortest Remaining time firstfirst (SJF), Shortest Remaining time first
(SRTF) are considered to be the non(SRTF) are considered to be the non
preemptive scheduling algorithms.preemptive scheduling algorithms.
Interprocess CommunicationInterprocess Communication
(IPC)(IPC)
 Mechanism for processes to communicateMechanism for processes to communicate
and to synchronize their actions.and to synchronize their actions.
 Message system – processes communicateMessage system – processes communicate
with each other without resorting to sharedwith each other without resorting to shared
variables.variables.
 IPC facility provides two operations:IPC facility provides two operations:
 send(send(messagemessage) – message size fixed or variable) – message size fixed or variable
 receive(receive(messagemessage))
Contd…Contd…
 IfIf PP andand QQ wish to communicate, they needwish to communicate, they need
to:to:
 establish aestablish a communicationcommunication linklink between thembetween them
 exchange messages via send/receiveexchange messages via send/receive
 Implementation of communication linkImplementation of communication link
 physical (e.g., shared memory, hardware bus)physical (e.g., shared memory, hardware bus)
 logical (e.g., logical properties)logical (e.g., logical properties)
Implementation QuestionsImplementation Questions
 How are links established?How are links established?
 Can a link be associated with more than twoCan a link be associated with more than two
processes?processes?
 How many links can there be between everyHow many links can there be between every
pair of communicating processes?pair of communicating processes?
 What is the capacity of a link?What is the capacity of a link?
 Is the size of a message that the link canIs the size of a message that the link can
accommodate fixed or variable?accommodate fixed or variable?
 Is a link unidirectional or bi-directional?Is a link unidirectional or bi-directional?
Direct CommunicationDirect Communication
 Processes must name each other explicitly:Processes must name each other explicitly:
 send (send (P, messageP, message) – send a message to process P) – send a message to process P
 receive(receive(Q, messageQ, message) – receive a message from) – receive a message from
process Qprocess Q
Contd…Contd…
 Properties of a communication linkProperties of a communication link
 Links are established automatically.Links are established automatically.
 A link is associated with exactly one pair ofA link is associated with exactly one pair of
communicating processes.communicating processes.
 Between each pair there exists exactly one link.Between each pair there exists exactly one link.
 The link may be unidirectional, but is usuallyThe link may be unidirectional, but is usually
bi-directional.bi-directional.
Indirect CommunicationIndirect Communication
 Messages are directed and receivedMessages are directed and received
from mailboxes (also referred to asfrom mailboxes (also referred to as
ports).ports).
 Each mailbox has a unique id.Each mailbox has a unique id.
 Processes can communicate only if theyProcesses can communicate only if they
share a mailbox.share a mailbox.
Contd…Contd…
 Properties of communication linkProperties of communication link
 Link established only if processes share aLink established only if processes share a
common mailboxcommon mailbox
 A link may be associated with many processes.A link may be associated with many processes.
 Each pair of processes may share severalEach pair of processes may share several
communication links.communication links.
 Link may be unidirectional or bi-directional.Link may be unidirectional or bi-directional.
Indirect CommunicationIndirect Communication
 OperationsOperations
 create a new mailboxcreate a new mailbox
 send and receive messages through mailboxsend and receive messages through mailbox
 destroy a mailboxdestroy a mailbox
 Primitives are defined as:Primitives are defined as:
send(send(A, messageA, message) – send a message to) – send a message to
mailbox Amailbox A
receive(receive(A, messageA, message) – receive a message) – receive a message
from mailbox Afrom mailbox A
Indirect CommunicationIndirect Communication
 Mailbox sharingMailbox sharing
 PP11, P, P22,, andand PP33 share mailbox A.share mailbox A.
 PP11, sends;, sends; PP22 andand PP33 receive.receive.
 Who gets the message?Who gets the message?
Contd…Contd…
 SolutionsSolutions
 Allow a link to be associated with at most twoAllow a link to be associated with at most two
processes.processes.
 Allow only one process at a time to execute aAllow only one process at a time to execute a
receive operation.receive operation.
 Allow the system to select arbitrarily theAllow the system to select arbitrarily the
receiver. Sender is notified who the receiverreceiver. Sender is notified who the receiver
was.was.
SynchronizationSynchronization
 Message passing may be either blocking orMessage passing may be either blocking or
non-blocking.non-blocking.
 Blocking is considered synchronousBlocking is considered synchronous
 Non-blocking is considered asynchronousNon-blocking is considered asynchronous
 send and receive primitives may be eithersend and receive primitives may be either
blocking or non-blocking.blocking or non-blocking.
BufferingBuffering
 Queue of messages attached to the link;Queue of messages attached to the link;
implemented in one of three ways.implemented in one of three ways.
1.1. Zero capacity – 0 messagesZero capacity – 0 messages
Sender must wait for receiver (rendezvous).Sender must wait for receiver (rendezvous).
2.2.Bounded capacity – finite length ofBounded capacity – finite length of nn messagesmessages
Sender must wait if link full.Sender must wait if link full.
3.3.Unbounded capacity – infinite lengthUnbounded capacity – infinite length
Sender never waits.Sender never waits.

More Related Content

What's hot

Linux System Programming - File I/O
Linux System Programming - File I/O Linux System Programming - File I/O
Linux System Programming - File I/O YourHelper1
 
Linux architecture
Linux architectureLinux architecture
Linux architecturemcganesh
 
Operating systems system structures
Operating systems   system structuresOperating systems   system structures
Operating systems system structuresMukesh Chinta
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process ConceptsMukesh Chinta
 
Unit II - 2 - Operating System - Threads
Unit II - 2 - Operating System - ThreadsUnit II - 2 - Operating System - Threads
Unit II - 2 - Operating System - Threadscscarcas
 
Distributed operating system
Distributed operating systemDistributed operating system
Distributed operating systemPrankit Mishra
 
Process management os concept
Process management os conceptProcess management os concept
Process management os conceptpriyadeosarkar91
 
Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Mukesh Chinta
 
Linux basic commands with examples
Linux basic commands with examplesLinux basic commands with examples
Linux basic commands with examplesabclearnn
 
Process management in operating system | process states | PCB | FORK() | Zomb...
Process management in operating system | process states | PCB | FORK() | Zomb...Process management in operating system | process states | PCB | FORK() | Zomb...
Process management in operating system | process states | PCB | FORK() | Zomb...Shivam Mitra
 
Process management in linux
Process management in linuxProcess management in linux
Process management in linuxMazenetsolution
 
Linux Basic Commands
Linux Basic CommandsLinux Basic Commands
Linux Basic CommandsHanan Nmr
 

What's hot (20)

Linux System Programming - File I/O
Linux System Programming - File I/O Linux System Programming - File I/O
Linux System Programming - File I/O
 
Linux architecture
Linux architectureLinux architecture
Linux architecture
 
kernels
 kernels kernels
kernels
 
Operating systems system structures
Operating systems   system structuresOperating systems   system structures
Operating systems system structures
 
Process scheduling linux
Process scheduling linuxProcess scheduling linux
Process scheduling linux
 
Storage Management
Storage ManagementStorage Management
Storage Management
 
Memory management
Memory managementMemory management
Memory management
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
 
Unit II - 2 - Operating System - Threads
Unit II - 2 - Operating System - ThreadsUnit II - 2 - Operating System - Threads
Unit II - 2 - Operating System - Threads
 
Distributed operating system
Distributed operating systemDistributed operating system
Distributed operating system
 
Process management os concept
Process management os conceptProcess management os concept
Process management os concept
 
Demand paging
Demand pagingDemand paging
Demand paging
 
Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)
 
Linux basic commands with examples
Linux basic commands with examplesLinux basic commands with examples
Linux basic commands with examples
 
System calls
System callsSystem calls
System calls
 
Deadlock Prevention
Deadlock PreventionDeadlock Prevention
Deadlock Prevention
 
Process management in operating system | process states | PCB | FORK() | Zomb...
Process management in operating system | process states | PCB | FORK() | Zomb...Process management in operating system | process states | PCB | FORK() | Zomb...
Process management in operating system | process states | PCB | FORK() | Zomb...
 
Process management in linux
Process management in linuxProcess management in linux
Process management in linux
 
Processes and threads
Processes and threadsProcesses and threads
Processes and threads
 
Linux Basic Commands
Linux Basic CommandsLinux Basic Commands
Linux Basic Commands
 

Similar to Processes

Similar to Processes (20)

Operating System
Operating SystemOperating System
Operating System
 
Process concept
Process conceptProcess concept
Process concept
 
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncationLM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
 
Chapter 3.pdf
Chapter 3.pdfChapter 3.pdf
Chapter 3.pdf
 
Lesson 7 Process Control Block
Lesson 7 Process Control BlockLesson 7 Process Control Block
Lesson 7 Process Control Block
 
Process
ProcessProcess
Process
 
Operating System-Concepts of Process
Operating System-Concepts of ProcessOperating System-Concepts of Process
Operating System-Concepts of Process
 
Operating system
Operating systemOperating system
Operating system
 
Operating Systems Unit Two - Fourth Semester - Engineering
Operating Systems Unit Two - Fourth Semester - EngineeringOperating Systems Unit Two - Fourth Semester - Engineering
Operating Systems Unit Two - Fourth Semester - Engineering
 
Ch03- PROCESSES.ppt
Ch03- PROCESSES.pptCh03- PROCESSES.ppt
Ch03- PROCESSES.ppt
 
UNIT - 3 PPT(Part- 1)_.pdf
UNIT - 3 PPT(Part- 1)_.pdfUNIT - 3 PPT(Part- 1)_.pdf
UNIT - 3 PPT(Part- 1)_.pdf
 
Processing management
Processing managementProcessing management
Processing management
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
 
Operating system
Operating systemOperating system
Operating system
 
Operating System
Operating SystemOperating System
Operating System
 
Operating Systems - Processor Management
Operating Systems - Processor ManagementOperating Systems - Processor Management
Operating Systems - Processor Management
 
OS-Process.pdf
OS-Process.pdfOS-Process.pdf
OS-Process.pdf
 
15. Computer Systems Basic Software 1
15. Computer Systems   Basic Software 115. Computer Systems   Basic Software 1
15. Computer Systems Basic Software 1
 
100-E
100-E100-E
100-E
 
Os
OsOs
Os
 

More from vampugani

Social media presentation
Social media presentationSocial media presentation
Social media presentationvampugani
 
Creating Quick Response(QR) Codes for the OER
Creating Quick Response(QR) Codes for the OERCreating Quick Response(QR) Codes for the OER
Creating Quick Response(QR) Codes for the OERvampugani
 
Arithmetic Computation using 2's Complement Notation
Arithmetic Computation using 2's Complement NotationArithmetic Computation using 2's Complement Notation
Arithmetic Computation using 2's Complement Notationvampugani
 
Post Graduate Diploma in Computer Applications (PGDCA)
Post Graduate Diploma in Computer Applications (PGDCA)Post Graduate Diploma in Computer Applications (PGDCA)
Post Graduate Diploma in Computer Applications (PGDCA)vampugani
 
Overview of Distributed Systems
Overview of Distributed SystemsOverview of Distributed Systems
Overview of Distributed Systemsvampugani
 
Protection and Security in Operating Systems
Protection and Security in Operating SystemsProtection and Security in Operating Systems
Protection and Security in Operating Systemsvampugani
 
Virtual Memory
Virtual MemoryVirtual Memory
Virtual Memoryvampugani
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OSvampugani
 
Process Scheduling
Process SchedulingProcess Scheduling
Process Schedulingvampugani
 
Introduction to OS
Introduction to OSIntroduction to OS
Introduction to OSvampugani
 
Operating Systems
Operating SystemsOperating Systems
Operating Systemsvampugani
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed Systemsvampugani
 
Multiprocessor Systems
Multiprocessor SystemsMultiprocessor Systems
Multiprocessor Systemsvampugani
 
File Management in Operating Systems
File Management in Operating SystemsFile Management in Operating Systems
File Management in Operating Systemsvampugani
 
Strings in c
Strings in cStrings in c
Strings in cvampugani
 
Control statements and functions in c
Control statements and functions in cControl statements and functions in c
Control statements and functions in cvampugani
 
Introduction to C Programming
Introduction to C Programming Introduction to C Programming
Introduction to C Programming vampugani
 
Introduction to C Programming - I
Introduction to C Programming - I Introduction to C Programming - I
Introduction to C Programming - I vampugani
 

More from vampugani (19)

Social media presentation
Social media presentationSocial media presentation
Social media presentation
 
Creating Quick Response(QR) Codes for the OER
Creating Quick Response(QR) Codes for the OERCreating Quick Response(QR) Codes for the OER
Creating Quick Response(QR) Codes for the OER
 
Arithmetic Computation using 2's Complement Notation
Arithmetic Computation using 2's Complement NotationArithmetic Computation using 2's Complement Notation
Arithmetic Computation using 2's Complement Notation
 
Post Graduate Diploma in Computer Applications (PGDCA)
Post Graduate Diploma in Computer Applications (PGDCA)Post Graduate Diploma in Computer Applications (PGDCA)
Post Graduate Diploma in Computer Applications (PGDCA)
 
Overview of Distributed Systems
Overview of Distributed SystemsOverview of Distributed Systems
Overview of Distributed Systems
 
Protection and Security in Operating Systems
Protection and Security in Operating SystemsProtection and Security in Operating Systems
Protection and Security in Operating Systems
 
Virtual Memory
Virtual MemoryVirtual Memory
Virtual Memory
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
Process Scheduling
Process SchedulingProcess Scheduling
Process Scheduling
 
Introduction to OS
Introduction to OSIntroduction to OS
Introduction to OS
 
Operating Systems
Operating SystemsOperating Systems
Operating Systems
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed Systems
 
Multiprocessor Systems
Multiprocessor SystemsMultiprocessor Systems
Multiprocessor Systems
 
File Management in Operating Systems
File Management in Operating SystemsFile Management in Operating Systems
File Management in Operating Systems
 
Strings in c
Strings in cStrings in c
Strings in c
 
Arrays in c
Arrays in cArrays in c
Arrays in c
 
Control statements and functions in c
Control statements and functions in cControl statements and functions in c
Control statements and functions in c
 
Introduction to C Programming
Introduction to C Programming Introduction to C Programming
Introduction to C Programming
 
Introduction to C Programming - I
Introduction to C Programming - I Introduction to C Programming - I
Introduction to C Programming - I
 

Recently uploaded

_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 

Recently uploaded (20)

_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 

Processes

  • 1. PROCESS MANAGEMENT INPROCESS MANAGEMENT IN OPERATING SYSTEMSOPERATING SYSTEMS V.V. SUBRAHMANYAMV.V. SUBRAHMANYAM SOCIS, IGNOUSOCIS, IGNOU DATE: 12-05-06DATE: 12-05-06 TIME: 2-30PM TO 3-15PMTIME: 2-30PM TO 3-15PM
  • 2. ObjectivesObjectives  Process ConceptProcess Concept  Process StatesProcess States  Operations on ProcessesOperations on Processes  Scheduling AlgorithmsScheduling Algorithms  Interprocess CommunicationInterprocess Communication  Communication in Client-Server SystemsCommunication in Client-Server Systems
  • 3. ProcessProcess  The term “process” was first used by theThe term “process” was first used by the operating system designers of theoperating system designers of the MULTICS system way back in 1960s.MULTICS system way back in 1960s.
  • 4. Contd..Contd..  The CPU executes a large number ofThe CPU executes a large number of programs. While its main concern is theprograms. While its main concern is the execution of user programs, the CPU is alsoexecution of user programs, the CPU is also needed for other system activities. Theseneeded for other system activities. These activities are called processes.activities are called processes.  A process isA process is  a program in execution.a program in execution.  A batch job is a process.A batch job is a process.  A time-shared user programA time-shared user program  A system task, such as spoolingA system task, such as spooling
  • 5. Program Vs ProcessProgram Vs Process  A program is a passive entity, while aA program is a passive entity, while a process is an active entity.process is an active entity.  It is known that two processes may beIt is known that two processes may be associated with the same program; they areassociated with the same program; they are nevertheless considered two separatenevertheless considered two separate execution sequences.execution sequences.
  • 6. Contd..Contd..  In multiprogramming systems, processes areIn multiprogramming systems, processes are performed in a pseudo-parallelism as if eachperformed in a pseudo-parallelism as if each process has its own processor.process has its own processor.  In fact, there is only one processor but itIn fact, there is only one processor but it switches back and forth from process toswitches back and forth from process to process.process.  ExecutionExecution of a process. includes “of a process. includes “processorprocessor (CPU) burst”(CPU) burst” andand “I/O burst”“I/O burst” respectively.respectively.
  • 7. Processor bound and I/O boundProcessor bound and I/O bound  Processes can be described as either:Processes can be described as either:  I/O-I/O-bound processbound process – spends more time doing– spends more time doing I/O than computations, many short CPUI/O than computations, many short CPU bursts.bursts.  CPUCPU--bound processbound process – spends more time doing– spends more time doing computations; few very long CPU bursts.computations; few very long CPU bursts.
  • 8. Process Mgmt by the OSProcess Mgmt by the OS  Process creation; Termination of the processProcess creation; Termination of the process  Controlling the progress of the processControlling the progress of the process  Process SchedulingProcess Scheduling  DispatchingDispatching  Interrupt handling / Exceptional handlingInterrupt handling / Exceptional handling  Switching between the processesSwitching between the processes  Process synchronizationProcess synchronization  Interprocess communication supportInterprocess communication support  Management of Process Control BlocksManagement of Process Control Blocks
  • 9. Process RelationshipProcess Relationship  In the concurrent environment, basicallyIn the concurrent environment, basically processes has two relationship, competitionprocesses has two relationship, competition and cooperation. In the concurrentand cooperation. In the concurrent environment, processes compete with eachenvironment, processes compete with each other for allocation of system resources toother for allocation of system resources to execute their instructions. In addition, aexecute their instructions. In addition, a collection of related processes thatcollection of related processes that collectively represent a single logicalcollectively represent a single logical application cooperate to each other.application cooperate to each other.
  • 10. Process StateProcess State  As a process executes, it changesAs a process executes, it changes statestate  NewNew: The process is being created.: The process is being created.  RunningRunning: Instructions are being executed.: Instructions are being executed.  WaitingWaiting: The process is waiting for some: The process is waiting for some event to occur.event to occur.  ReadyReady: The process is waiting to be: The process is waiting to be assigned to a process.assigned to a process.  TerminatedTerminated: The process has finished: The process has finished execution.execution.
  • 11. Diagram of Process StateDiagram of Process State
  • 12. Process Table or PCBProcess Table or PCB  To implement the process model, the operatingTo implement the process model, the operating system maintains a table, an array of structures,system maintains a table, an array of structures, called thecalled the process table or a process control blockprocess table or a process control block.. Each entry identifies a process with informationEach entry identifies a process with information such as process state, its program counter, stacksuch as process state, its program counter, stack pointer, memory allocation, the status of its openpointer, memory allocation, the status of its open files, its accounting and scheduling information. Infiles, its accounting and scheduling information. In another words, it must contain everything aboutanother words, it must contain everything about the process that must be saved when the process isthe process that must be saved when the process is switched from the running state to the ready stateswitched from the running state to the ready state so that it can be restarted later as if it had neverso that it can be restarted later as if it had never been stopped.been stopped.
  • 13. Process Control Block (PCB)Process Control Block (PCB)
  • 15. Process Scheduling QueuesProcess Scheduling Queues  Job queue – set of all processes in theJob queue – set of all processes in the system.system.  Ready queue – set of all processes residingReady queue – set of all processes residing in main memory, ready and waiting toin main memory, ready and waiting to execute.execute.  Device queues – set of processes waiting forDevice queues – set of processes waiting for an I/O device.an I/O device.  Process migration between the variousProcess migration between the various queues.queues.
  • 16. Ready Queue And Various I/O Device QueuesReady Queue And Various I/O Device Queues
  • 17. Representation of ProcessRepresentation of Process SchedulingScheduling
  • 18. SchedulersSchedulers  Long-term scheduler (or job scheduler) –Long-term scheduler (or job scheduler) – selects which processes should be broughtselects which processes should be brought into the ready queue.into the ready queue.  Short-term scheduler (or CPU scheduler) –Short-term scheduler (or CPU scheduler) – selects which process should be executedselects which process should be executed next and allocates CPU.next and allocates CPU.
  • 19. Addition of Medium TermAddition of Medium Term SchedulingScheduling
  • 20. Schedulers (Cont.)Schedulers (Cont.)  Short-term scheduler is invoked veryShort-term scheduler is invoked very frequently (milliseconds)frequently (milliseconds) ⇒⇒ (must be fast).(must be fast).  Long-term scheduler is invoked veryLong-term scheduler is invoked very infrequently (seconds, minutes)infrequently (seconds, minutes) ⇒⇒ (may be(may be slow).slow).  The long-term scheduler controls theThe long-term scheduler controls the degreedegree of multiprogramming.of multiprogramming.
  • 21. Scheduling AlgorithmsScheduling Algorithms  The goal of scheduling algorithm is toThe goal of scheduling algorithm is to identify the process whose selection willidentify the process whose selection will result in the “best” possible systemresult in the “best” possible system performance.performance.  A major division among schedulingA major division among scheduling algorithms is that whether they support pre-algorithms is that whether they support pre- emptive or non-preemptive schedulingemptive or non-preemptive scheduling discipline.discipline.
  • 22. Preemptive SchedulingPreemptive Scheduling  Preemption means the operating systemPreemption means the operating system moves a process from running to readymoves a process from running to ready without the process requesting it.without the process requesting it.  Round Robin scheduling, priority basedRound Robin scheduling, priority based scheduling or event driven scheduling arescheduling or event driven scheduling are considered to the preemptive schedulingconsidered to the preemptive scheduling algorithms.algorithms.
  • 23. Non- Preemptive schedulingNon- Preemptive scheduling  A scheduling discipline is non-preemptive ifA scheduling discipline is non-preemptive if once a process has been allotted to the CPU,once a process has been allotted to the CPU, the CPU cannot be taken away from thethe CPU cannot be taken away from the process.process.  First come first served (FCFS), Shortest jobFirst come first served (FCFS), Shortest job first (SJF), Shortest Remaining time firstfirst (SJF), Shortest Remaining time first (SRTF) are considered to be the non(SRTF) are considered to be the non preemptive scheduling algorithms.preemptive scheduling algorithms.
  • 24. Interprocess CommunicationInterprocess Communication (IPC)(IPC)  Mechanism for processes to communicateMechanism for processes to communicate and to synchronize their actions.and to synchronize their actions.  Message system – processes communicateMessage system – processes communicate with each other without resorting to sharedwith each other without resorting to shared variables.variables.  IPC facility provides two operations:IPC facility provides two operations:  send(send(messagemessage) – message size fixed or variable) – message size fixed or variable  receive(receive(messagemessage))
  • 25. Contd…Contd…  IfIf PP andand QQ wish to communicate, they needwish to communicate, they need to:to:  establish aestablish a communicationcommunication linklink between thembetween them  exchange messages via send/receiveexchange messages via send/receive  Implementation of communication linkImplementation of communication link  physical (e.g., shared memory, hardware bus)physical (e.g., shared memory, hardware bus)  logical (e.g., logical properties)logical (e.g., logical properties)
  • 26. Implementation QuestionsImplementation Questions  How are links established?How are links established?  Can a link be associated with more than twoCan a link be associated with more than two processes?processes?  How many links can there be between everyHow many links can there be between every pair of communicating processes?pair of communicating processes?  What is the capacity of a link?What is the capacity of a link?  Is the size of a message that the link canIs the size of a message that the link can accommodate fixed or variable?accommodate fixed or variable?  Is a link unidirectional or bi-directional?Is a link unidirectional or bi-directional?
  • 27. Direct CommunicationDirect Communication  Processes must name each other explicitly:Processes must name each other explicitly:  send (send (P, messageP, message) – send a message to process P) – send a message to process P  receive(receive(Q, messageQ, message) – receive a message from) – receive a message from process Qprocess Q
  • 28. Contd…Contd…  Properties of a communication linkProperties of a communication link  Links are established automatically.Links are established automatically.  A link is associated with exactly one pair ofA link is associated with exactly one pair of communicating processes.communicating processes.  Between each pair there exists exactly one link.Between each pair there exists exactly one link.  The link may be unidirectional, but is usuallyThe link may be unidirectional, but is usually bi-directional.bi-directional.
  • 29. Indirect CommunicationIndirect Communication  Messages are directed and receivedMessages are directed and received from mailboxes (also referred to asfrom mailboxes (also referred to as ports).ports).  Each mailbox has a unique id.Each mailbox has a unique id.  Processes can communicate only if theyProcesses can communicate only if they share a mailbox.share a mailbox.
  • 30. Contd…Contd…  Properties of communication linkProperties of communication link  Link established only if processes share aLink established only if processes share a common mailboxcommon mailbox  A link may be associated with many processes.A link may be associated with many processes.  Each pair of processes may share severalEach pair of processes may share several communication links.communication links.  Link may be unidirectional or bi-directional.Link may be unidirectional or bi-directional.
  • 31. Indirect CommunicationIndirect Communication  OperationsOperations  create a new mailboxcreate a new mailbox  send and receive messages through mailboxsend and receive messages through mailbox  destroy a mailboxdestroy a mailbox  Primitives are defined as:Primitives are defined as: send(send(A, messageA, message) – send a message to) – send a message to mailbox Amailbox A receive(receive(A, messageA, message) – receive a message) – receive a message from mailbox Afrom mailbox A
  • 32. Indirect CommunicationIndirect Communication  Mailbox sharingMailbox sharing  PP11, P, P22,, andand PP33 share mailbox A.share mailbox A.  PP11, sends;, sends; PP22 andand PP33 receive.receive.  Who gets the message?Who gets the message?
  • 33. Contd…Contd…  SolutionsSolutions  Allow a link to be associated with at most twoAllow a link to be associated with at most two processes.processes.  Allow only one process at a time to execute aAllow only one process at a time to execute a receive operation.receive operation.  Allow the system to select arbitrarily theAllow the system to select arbitrarily the receiver. Sender is notified who the receiverreceiver. Sender is notified who the receiver was.was.
  • 34. SynchronizationSynchronization  Message passing may be either blocking orMessage passing may be either blocking or non-blocking.non-blocking.  Blocking is considered synchronousBlocking is considered synchronous  Non-blocking is considered asynchronousNon-blocking is considered asynchronous  send and receive primitives may be eithersend and receive primitives may be either blocking or non-blocking.blocking or non-blocking.
  • 35. BufferingBuffering  Queue of messages attached to the link;Queue of messages attached to the link; implemented in one of three ways.implemented in one of three ways. 1.1. Zero capacity – 0 messagesZero capacity – 0 messages Sender must wait for receiver (rendezvous).Sender must wait for receiver (rendezvous). 2.2.Bounded capacity – finite length ofBounded capacity – finite length of nn messagesmessages Sender must wait if link full.Sender must wait if link full. 3.3.Unbounded capacity – infinite lengthUnbounded capacity – infinite length Sender never waits.Sender never waits.