SlideShare a Scribd company logo
1 of 37
JIT BarabankiMr Satyendra Mohan Srivastava
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 2
Process
 A process is a program in execution
 A process can also be defined as the unit of work in a time sharing system
 A system consist of bunch or collection of processes
 Operating system processes execute system codes and various user
processes executing various user codes
 The various processes can execute concurrently via CPU multiplexing
mechanism
 The CPU switches between various processes which make computer system
more productive
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 3
Process (conti..)
 Most of the text books of operating system uses job and processes interchangeably
 Program can be passive entity stored on disk (executable file) but process is active
entity
 Program becomes process when executable file loaded into memory
 A program can be divided into several processes
 A process can be larger than program code (text selection)
 Process can also includes various activities which is represented by the value of the
program counter and contents of processors registers
 A process includes the process stack (temporary data) and a data section (global
variables)
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 4
When the process executes, it may changes its state
 new: The process is created in this state
 running: The various instructions are being executed
 waiting: The various process are waiting for some event to occur
 ready: The various process are waiting to be assigned to a processor
 terminated: The execution of process has finished
Process State
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 5
Diagrammatic Representation of
Process State
Interrupt
New Terminated
Ready Running
Waiting
Scheduler dispatch
Admitted Exit
I/O or Event waitI/O or Event Completion
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 6
Process Control Block (PCB)
Pointer
Process
State
Process Number
Program Counters
Registers
Memory Limits
List of open files
.
.
.
 Each process in the operating system is
represented by a PCB
 PCB is also known as a task control block
 PCB contains pieces of information
associated with a specific process. The
various block along with the description
are listed below:
 Process state : The states like new, ready,
running, waiting, terminated and so on PCB
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 7
Process Control Block (PCB)
Pointer
Process
State
Process Number
Program Counters
Registers
Memory Limits
List of open files
.
.
.
 Program Counter : It indicates the next
instruction address which is to be
executed
 Registers : It include accumulators, stack
pointers, index registers, general purpose
registers and any conditional code
information
PCB
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 8
CPU Switching from Process to
Process
Process P(i) Operating System Process P(i+1)
Interrupt or system call
Save state into PCB
Save state into PCB
Save state into PCB
Save state into PCB
Executing
Executing
Executing
idle
idle
idle
Interrupt or system call
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 9
Threads
 A process is a program that performs a single thread of execution
 A single thread of instructions allows the process to perform one task
at one time
 Various modern operating system have extended the basic process
concept to have multiple thread of execution
 The process can perform more than one task at a time
 A thread is also known as light weight process
 A thread can be define as primary unit of CPU utilization
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 10
Threads
Advantages:
 Resource sharing
 Responsiveness
 Economy
 Utilization of multiprocessor architecture
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 11
Process Scheduling
 The objective of Multiprogramming is to maximize the number of process
running at all time. This leads to maximize CPU utilization.
 The objective of Time-sharing is to maximize the CPU switching among
the process so that users can interact with each process or program while
it is running
 Only one process is running on uniprocessor system all the time
 If more than one processes exit, the rest process may wait until CPU is
free or scheduled on the CPU
 The various processes in the system are put into job queue
 The job queue contain all the processes in the system
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 12
 In Main Memory, the processes are ready and waiting to execute. Such
state in the list are known as the ready queue
 The processes in the list are stored as a linked list format
 A ready queue header in the list contain the pointer which points to the
first and the final Process Control block in the list
 The operating system may also contain other queues
 The various processes are going to provide the CPU then processes may
execute, gets interrupted and wait for a particular event (I/O request)
 The various request of processes can be depicted on the tape drive or on
the disk
Process Scheduling
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 13
Process Scheduling
 On the disk, system may be busy with the I/O request of some other
processes hence processes on the disk have to wait for its number to
acquire CPU
 The waiting processes of the list for a particular I/O device are known as
device queue
 Each individual device has its own device queue
 The diagrammatic representation of device which represent process
scheduling is known as queueing diagram
 Two type of Queue are present in the operating system
 The ready queue
 A set of device queue
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 14
Process Scheduling
 When the CPU is assigned to the process and process start its execution,
following are the possibilities:
 The process may issue an I/O request and placed on an I/O queue
 The process may create new sub-processes and wait for its completion
 Due to interrupt, the process may removed from CPU and put on the
ready queue
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 15
Process Scheduling
Ready Queue CPU
I/O I/O queue I/O request
Time slice expired
Child executes
Interrupt occurs
Fork a child
Wait for an
interrupt
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 16
Schedulers
 The operating system select processes from various scheduling queue
 The selection of process is purely dependent on appropriate scheduler
 The processes are spooled to a disk(mass storage device) for some later
execution
 CPU scheduler or Short-term scheduler
 Select next process to be executed and provide the CPU
 Sometimes, the only available scheduler in a particular system
 CPU scheduler is invoked so frequently that it is considered as the fast
one
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 17
Schedulers
 Job scheduler or Long-term scheduler
 It select the various processes on the ready queue
 Job scheduler is comparatively less frequently invoked than CPU
scheduler
 It controls the degree of multiprogramming
 Processes can be
CPU-bound process: It spends large time doing computations; few long
CPU bursts
I/O-bound process: It spends large time doing I/O than computations, few
short CPU bursts
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 18
Schedulers
Partially executed
swapped-out processes
Ready queue CPU
I/O I/O waiting queues
swap in swap out
In Queuing diagram, addition of Medium Term Scheduler
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 19
Context Switch
 Context Switching is the mechanism which allows switching of processes or from
one state to another state
 While CPU switches from one process to another process, the system should save
the state of old process and load the new state (saved state) for the new process
 The Context of a process can be represented via the PCB block diagram
 The system perform no useful task while switching from one process to another.
Such state is known as Context-switch time overhead
 the context switch is directly proportional to the complex OS and the PCB
 Multiple contexts can be loaded at once when multiple sets of registers per CPU
will be provided by the hardware
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 20
Operations on Processes
The processes in the system may execute concurrently. They may
create and delete process dynamically. It provide mechanisms
for:
 Process creation
 Process termination
 Process creation
 A process can create new processes with the help of create
process system
 The various creating process is known as a Parent process
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 21
Operations on Processes
 Process creation
 The new created process is known as the Children process
 The newly created process may create various sub processes forming
a tree of processes
 A process need certain resource to complete its task
 Such resources are CPU time, files, memory and I/O devices
 The parent also partition its resource to its children
 Restricting a child process leads to the restriction of process
overloading in the system
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 22
Operations on Processes
 Process creation
 The information or data to the child process is passed via parent
process
 Creation of process leads to two possibilities, Such as
 The child along with the parent continue to execute concurrently
 The parent with the child may wait to complete its execution or
its termination
 Creation of process along with the address space leads to two
possibilities
 Duplication of parent process leads to child process
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 23
Producer - Consumer Problem
 A producer process produces data or information that is ultimately
consumed by consumer process
 For concurrent execution of various process, a buffer is required
 A producer process can produce information and consumer process
consume the information produced by consumer process
 A synchronization between producer process and consumer process
is required to overcome various unwanted situation like,
 Consumer may try to consume the information which yet to be
produced. This leads to waiting of consumer process
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 24
Producer - Consumer Problem
 Producer may try to produce the information when buffer is full. This
leads to waiting of producer process to consume some information
by consumer process
 The buffer can be provided by the operating system or the application
program
 The buffer can be categorized into two types:
 The Bounded-Buffer
 Assumes unbounded buffer size
 The Unbounded-Buffer
 Assumes a fixed buffer size
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 25
Critical Section Problem
 A system consisting of processes has a code segment called a critical section
 At a particular instant of time, Only one process is allowed to perform its
execution in the critical section
 No two processes at any instant of time are allowed in the critical section
 The execution of processes in the Critical Section must be mutually exclusive
 Each process may request permission to enter into critical section
 Critical Section has entry level and exit level section
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 26
Critical Section Problem
 A solution to Critical Section problem may satisfy the three requirements:
 Mutual Exclusion
 Progress
 Bounded Waiting
 Mutual Exclusion: When a process reside in the critical section then no two
process is allowed in the critical section
 Progress: The non executing processes in the remainder section can
participate in the decision regarding the next process entry in the critical
section
 Boundary Waiting: There is a maximum limit of request to be made by a
process to enter in the critical section
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 27
The Dining Philosophers Problem
Rice
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 28
The Dining Philosophers Problem
 The five Philosophers are sitting on five chairs sharing a common table
 In the center of the table, some rice in a bowl is placed with the five
chopsticks
 The philosophers may exist in either thinking or eating phase
 In thinking phase, a philosopher doesn’t interact with her colleagues
 When a philosopher is hungry then the philosopher tries to pick up the two
chopsticks that are closer to them
 A philosopher can pick only one chopsticks at a time
 A philosopher is in eating phase when he pick two chopsticks
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 29
The Dining Philosophers Problem
 After eating, the Philosopher releases two chopsticks
 A philosopher is in eating phase when he pick two chopsticks
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 30
Deadlock
 A deadlock is a situation in which waiting process is requesting for the
resources which is hold by another process thus resulting in a situation
known as a Deadlock
 A resource can be memory space, files, CPU cycles and I/O devices
 A resource may be granted to a process when process request for it
 In any situation, a requesting resource can be exceed over the number of
available resources
 In the normal situation, a resource can be granted via following sequence:
 Requesting for resource
 Use of resource
 Release of resource
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 31
Deadlock
Note: Release and request for resources are system calls
 A resource can be:
 logical resource
 Physical resource
 Logical Resource
 Semaphores
 Files
 Physical Resource
 Printer
 Memory Space
 CPU cycle
 Tape drives
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 32
Deadlock Characterization
 Necessary Conditions: A deadlock may occur if following four conditions
satisfied simultaneously in a system
 Mutual exclusion
 Hold and wait
 No preemption
 Circular wait
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 33
Resource Allocation Graph
 A directed graph representation of graph is known as resource
allocation graph
 In resource allocation graph, Following are the representation:
 Process is represented by . in the graph
 Process to resource directed allow head is known as a requesting edge
 Resource to process directed arrow head is known as assignment edge
 A sample resource allocation graph is represented on next slide
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 34
A sample Resource Allocation Graph
R1 R3
P1 P2 P3 P4
R2 R4
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 35
Deadlock Prevention
Deadlock is the state, we can avoid this state of processes by ensuring that
that atleast one condition can’t hold so by elaborating the necessary four
condition with this approach. The four condition are
 Mutual exclusion
 Hold and wait
 No preemption
 Circular wait
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 36
Recovery from Deadlock
 Process termination
 Deadlock elimination via sequential elimination of process
 Elimination of all deadlocked processes
 Resource preemption
 Rollback
 Selecting a victim
 Starvation
1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 37

More Related Content

What's hot

Chapter 2 part 1
Chapter 2 part 1Chapter 2 part 1
Chapter 2 part 1rohassanie
 
os assignment -individual presenation.pptx
os assignment -individual presenation.pptxos assignment -individual presenation.pptx
os assignment -individual presenation.pptxEngrAliSarfrazSiddiq
 
CSI-503 - 2. Processor Management
CSI-503 - 2. Processor ManagementCSI-503 - 2. Processor Management
CSI-503 - 2. Processor Managementghayour abbas
 
Operating System 3
Operating System 3Operating System 3
Operating System 3tech2click
 
Understanding memory management
Understanding memory managementUnderstanding memory management
Understanding memory managementGokul Vasan
 
Ch17 introduction to transaction processing concepts and theory
Ch17 introduction to transaction processing concepts and theoryCh17 introduction to transaction processing concepts and theory
Ch17 introduction to transaction processing concepts and theorymeenatchi selvaraj
 
Operating Systems - memory management
Operating Systems - memory managementOperating Systems - memory management
Operating Systems - memory managementMukesh Chinta
 
Unit 2 part 1(Process)
Unit 2 part 1(Process)Unit 2 part 1(Process)
Unit 2 part 1(Process)WajeehaBaig
 
Process Control Block & Threads and Their Management
Process Control Block & Threads and Their ManagementProcess Control Block & Threads and Their Management
Process Control Block & Threads and Their ManagementUjjwal Kumar
 
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 - EngineeringYogesh Santhan
 
Process in operating system
Process in operating systemProcess in operating system
Process in operating systemChetan Mahawar
 
Unit v: Device Management
Unit v: Device ManagementUnit v: Device Management
Unit v: Device ManagementArnav Chowdhury
 
Operating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - ProcessesOperating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - ProcessesPeter Tröger
 
Os unit 3 , process management
Os unit 3 , process managementOs unit 3 , process management
Os unit 3 , process managementArnav Chowdhury
 
Unit II - 1 - Operating System Process
Unit II - 1 - Operating System ProcessUnit II - 1 - Operating System Process
Unit II - 1 - Operating System Processcscarcas
 

What's hot (19)

Chapter 2 part 1
Chapter 2 part 1Chapter 2 part 1
Chapter 2 part 1
 
os assignment -individual presenation.pptx
os assignment -individual presenation.pptxos assignment -individual presenation.pptx
os assignment -individual presenation.pptx
 
Process
ProcessProcess
Process
 
CSI-503 - 2. Processor Management
CSI-503 - 2. Processor ManagementCSI-503 - 2. Processor Management
CSI-503 - 2. Processor Management
 
Operating System 3
Operating System 3Operating System 3
Operating System 3
 
Understanding memory management
Understanding memory managementUnderstanding memory management
Understanding memory management
 
Ch17 introduction to transaction processing concepts and theory
Ch17 introduction to transaction processing concepts and theoryCh17 introduction to transaction processing concepts and theory
Ch17 introduction to transaction processing concepts and theory
 
Operating Systems - memory management
Operating Systems - memory managementOperating Systems - memory management
Operating Systems - memory management
 
Unit 2 part 1(Process)
Unit 2 part 1(Process)Unit 2 part 1(Process)
Unit 2 part 1(Process)
 
Process management
Process managementProcess management
Process management
 
Process Control Block & Threads and Their Management
Process Control Block & Threads and Their ManagementProcess Control Block & Threads and Their Management
Process Control Block & Threads and Their Management
 
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
 
Process in operating system
Process in operating systemProcess in operating system
Process in operating system
 
Lecture5
Lecture5Lecture5
Lecture5
 
Unit v: Device Management
Unit v: Device ManagementUnit v: Device Management
Unit v: Device Management
 
Operating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - ProcessesOperating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - Processes
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
Os unit 3 , process management
Os unit 3 , process managementOs unit 3 , process management
Os unit 3 , process management
 
Unit II - 1 - Operating System Process
Unit II - 1 - Operating System ProcessUnit II - 1 - Operating System Process
Unit II - 1 - Operating System Process
 

Similar to Process and its related concept with problems.

Ch2_Processes_and_process_management_1.ppt
Ch2_Processes_and_process_management_1.pptCh2_Processes_and_process_management_1.ppt
Ch2_Processes_and_process_management_1.pptMohammad Almuiet
 
OS - Chapter # 3 for the development of os
OS - Chapter # 3 for the development of osOS - Chapter # 3 for the development of os
OS - Chapter # 3 for the development of osTahaShahid18
 
OperatingSystem02..(B.SC Part 2)
OperatingSystem02..(B.SC Part 2)OperatingSystem02..(B.SC Part 2)
OperatingSystem02..(B.SC Part 2)Muhammad Osama
 
operating system for computer engineering ch3.ppt
operating system for computer engineering ch3.pptoperating system for computer engineering ch3.ppt
operating system for computer engineering ch3.pptgezaegebre1
 
My ppt @ bec doms on process management
My ppt @ bec doms on process managementMy ppt @ bec doms on process management
My ppt @ bec doms on process managementBabasab Patil
 
My ppt @ bec doms on process management
My ppt @ bec doms on process managementMy ppt @ bec doms on process management
My ppt @ bec doms on process managementBabasab Patil
 
Operating System Process Scheduling.pptx
Operating System Process Scheduling.pptxOperating System Process Scheduling.pptx
Operating System Process Scheduling.pptxMuhammad Athar
 
Operating system || Chapter 3: Process
Operating system || Chapter 3: ProcessOperating system || Chapter 3: Process
Operating system || Chapter 3: ProcessAnkonGopalBanik
 
process control block ppt in operating system
process control block ppt in operating systemprocess control block ppt in operating system
process control block ppt in operating systemnc3186331
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process ConceptsMukesh Chinta
 
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncationLM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncationMani Deepak Choudhry
 

Similar to Process and its related concept with problems. (20)

Ch03- PROCESSES.ppt
Ch03- PROCESSES.pptCh03- PROCESSES.ppt
Ch03- PROCESSES.ppt
 
Chapter 3.pdf
Chapter 3.pdfChapter 3.pdf
Chapter 3.pdf
 
Ch2_Processes_and_process_management_1.ppt
Ch2_Processes_and_process_management_1.pptCh2_Processes_and_process_management_1.ppt
Ch2_Processes_and_process_management_1.ppt
 
UNIT - 3 PPT(Part- 1)_.pdf
UNIT - 3 PPT(Part- 1)_.pdfUNIT - 3 PPT(Part- 1)_.pdf
UNIT - 3 PPT(Part- 1)_.pdf
 
Cs8493 unit 2
Cs8493 unit 2Cs8493 unit 2
Cs8493 unit 2
 
OS-Process.pdf
OS-Process.pdfOS-Process.pdf
OS-Process.pdf
 
OS - Chapter # 3 for the development of os
OS - Chapter # 3 for the development of osOS - Chapter # 3 for the development of os
OS - Chapter # 3 for the development of os
 
CS6401 OPERATING SYSTEMS Unit 2
CS6401 OPERATING SYSTEMS Unit 2CS6401 OPERATING SYSTEMS Unit 2
CS6401 OPERATING SYSTEMS Unit 2
 
OperatingSystem02..(B.SC Part 2)
OperatingSystem02..(B.SC Part 2)OperatingSystem02..(B.SC Part 2)
OperatingSystem02..(B.SC Part 2)
 
operating system for computer engineering ch3.ppt
operating system for computer engineering ch3.pptoperating system for computer engineering ch3.ppt
operating system for computer engineering ch3.ppt
 
My ppt @ bec doms on process management
My ppt @ bec doms on process managementMy ppt @ bec doms on process management
My ppt @ bec doms on process management
 
My ppt @ bec doms on process management
My ppt @ bec doms on process managementMy ppt @ bec doms on process management
My ppt @ bec doms on process management
 
Operating System Process Scheduling.pptx
Operating System Process Scheduling.pptxOperating System Process Scheduling.pptx
Operating System Process Scheduling.pptx
 
OS (1).pptx
OS (1).pptxOS (1).pptx
OS (1).pptx
 
Operating system || Chapter 3: Process
Operating system || Chapter 3: ProcessOperating system || Chapter 3: Process
Operating system || Chapter 3: Process
 
OS-Unit-2-Part-1.pptx
OS-Unit-2-Part-1.pptxOS-Unit-2-Part-1.pptx
OS-Unit-2-Part-1.pptx
 
CH03.pdf
CH03.pdfCH03.pdf
CH03.pdf
 
process control block ppt in operating system
process control block ppt in operating systemprocess control block ppt in operating system
process control block ppt in operating system
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
 
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncationLM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
 

More from Satyendra Mohan

Principal of Programming Language
Principal of Programming Language Principal of Programming Language
Principal of Programming Language Satyendra Mohan
 
Introduction of Artificial Intelligence
Introduction of Artificial IntelligenceIntroduction of Artificial Intelligence
Introduction of Artificial IntelligenceSatyendra Mohan
 
Marketing of CSE Department
Marketing of CSE DepartmentMarketing of CSE Department
Marketing of CSE DepartmentSatyendra Mohan
 
Transport layer features and functionality
Transport layer features and functionalityTransport layer features and functionality
Transport layer features and functionalitySatyendra Mohan
 
Ipc nee 303 ppt even sem
Ipc nee 303 ppt even semIpc nee 303 ppt even sem
Ipc nee 303 ppt even semSatyendra Mohan
 

More from Satyendra Mohan (13)

Principal of Programming Language
Principal of Programming Language Principal of Programming Language
Principal of Programming Language
 
Introduction of Artificial Intelligence
Introduction of Artificial IntelligenceIntroduction of Artificial Intelligence
Introduction of Artificial Intelligence
 
Marketing of CSE Department
Marketing of CSE DepartmentMarketing of CSE Department
Marketing of CSE Department
 
Application layer
Application layer Application layer
Application layer
 
Transport layer features and functionality
Transport layer features and functionalityTransport layer features and functionality
Transport layer features and functionality
 
The Network Layer in CN
The Network Layer in CNThe Network Layer in CN
The Network Layer in CN
 
DDL and Physical Layer
DDL and Physical LayerDDL and Physical Layer
DDL and Physical Layer
 
Computer Network basic
Computer Network basicComputer Network basic
Computer Network basic
 
Operating system
Operating systemOperating system
Operating system
 
Digital india
Digital indiaDigital india
Digital india
 
Material science eeem
Material science eeemMaterial science eeem
Material science eeem
 
Material science eeem
Material science eeemMaterial science eeem
Material science eeem
 
Ipc nee 303 ppt even sem
Ipc nee 303 ppt even semIpc nee 303 ppt even sem
Ipc nee 303 ppt even sem
 

Recently uploaded

Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesPrabhanshu Chaturvedi
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 

Recently uploaded (20)

Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 

Process and its related concept with problems.

  • 1. JIT BarabankiMr Satyendra Mohan Srivastava
  • 2. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 2 Process  A process is a program in execution  A process can also be defined as the unit of work in a time sharing system  A system consist of bunch or collection of processes  Operating system processes execute system codes and various user processes executing various user codes  The various processes can execute concurrently via CPU multiplexing mechanism  The CPU switches between various processes which make computer system more productive
  • 3. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 3 Process (conti..)  Most of the text books of operating system uses job and processes interchangeably  Program can be passive entity stored on disk (executable file) but process is active entity  Program becomes process when executable file loaded into memory  A program can be divided into several processes  A process can be larger than program code (text selection)  Process can also includes various activities which is represented by the value of the program counter and contents of processors registers  A process includes the process stack (temporary data) and a data section (global variables)
  • 4. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 4 When the process executes, it may changes its state  new: The process is created in this state  running: The various instructions are being executed  waiting: The various process are waiting for some event to occur  ready: The various process are waiting to be assigned to a processor  terminated: The execution of process has finished Process State
  • 5. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 5 Diagrammatic Representation of Process State Interrupt New Terminated Ready Running Waiting Scheduler dispatch Admitted Exit I/O or Event waitI/O or Event Completion
  • 6. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 6 Process Control Block (PCB) Pointer Process State Process Number Program Counters Registers Memory Limits List of open files . . .  Each process in the operating system is represented by a PCB  PCB is also known as a task control block  PCB contains pieces of information associated with a specific process. The various block along with the description are listed below:  Process state : The states like new, ready, running, waiting, terminated and so on PCB
  • 7. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 7 Process Control Block (PCB) Pointer Process State Process Number Program Counters Registers Memory Limits List of open files . . .  Program Counter : It indicates the next instruction address which is to be executed  Registers : It include accumulators, stack pointers, index registers, general purpose registers and any conditional code information PCB
  • 8. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 8 CPU Switching from Process to Process Process P(i) Operating System Process P(i+1) Interrupt or system call Save state into PCB Save state into PCB Save state into PCB Save state into PCB Executing Executing Executing idle idle idle Interrupt or system call
  • 9. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 9 Threads  A process is a program that performs a single thread of execution  A single thread of instructions allows the process to perform one task at one time  Various modern operating system have extended the basic process concept to have multiple thread of execution  The process can perform more than one task at a time  A thread is also known as light weight process  A thread can be define as primary unit of CPU utilization
  • 10. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 10 Threads Advantages:  Resource sharing  Responsiveness  Economy  Utilization of multiprocessor architecture
  • 11. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 11 Process Scheduling  The objective of Multiprogramming is to maximize the number of process running at all time. This leads to maximize CPU utilization.  The objective of Time-sharing is to maximize the CPU switching among the process so that users can interact with each process or program while it is running  Only one process is running on uniprocessor system all the time  If more than one processes exit, the rest process may wait until CPU is free or scheduled on the CPU  The various processes in the system are put into job queue  The job queue contain all the processes in the system
  • 12. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 12  In Main Memory, the processes are ready and waiting to execute. Such state in the list are known as the ready queue  The processes in the list are stored as a linked list format  A ready queue header in the list contain the pointer which points to the first and the final Process Control block in the list  The operating system may also contain other queues  The various processes are going to provide the CPU then processes may execute, gets interrupted and wait for a particular event (I/O request)  The various request of processes can be depicted on the tape drive or on the disk Process Scheduling
  • 13. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 13 Process Scheduling  On the disk, system may be busy with the I/O request of some other processes hence processes on the disk have to wait for its number to acquire CPU  The waiting processes of the list for a particular I/O device are known as device queue  Each individual device has its own device queue  The diagrammatic representation of device which represent process scheduling is known as queueing diagram  Two type of Queue are present in the operating system  The ready queue  A set of device queue
  • 14. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 14 Process Scheduling  When the CPU is assigned to the process and process start its execution, following are the possibilities:  The process may issue an I/O request and placed on an I/O queue  The process may create new sub-processes and wait for its completion  Due to interrupt, the process may removed from CPU and put on the ready queue
  • 15. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 15 Process Scheduling Ready Queue CPU I/O I/O queue I/O request Time slice expired Child executes Interrupt occurs Fork a child Wait for an interrupt
  • 16. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 16 Schedulers  The operating system select processes from various scheduling queue  The selection of process is purely dependent on appropriate scheduler  The processes are spooled to a disk(mass storage device) for some later execution  CPU scheduler or Short-term scheduler  Select next process to be executed and provide the CPU  Sometimes, the only available scheduler in a particular system  CPU scheduler is invoked so frequently that it is considered as the fast one
  • 17. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 17 Schedulers  Job scheduler or Long-term scheduler  It select the various processes on the ready queue  Job scheduler is comparatively less frequently invoked than CPU scheduler  It controls the degree of multiprogramming  Processes can be CPU-bound process: It spends large time doing computations; few long CPU bursts I/O-bound process: It spends large time doing I/O than computations, few short CPU bursts
  • 18. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 18 Schedulers Partially executed swapped-out processes Ready queue CPU I/O I/O waiting queues swap in swap out In Queuing diagram, addition of Medium Term Scheduler
  • 19. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 19 Context Switch  Context Switching is the mechanism which allows switching of processes or from one state to another state  While CPU switches from one process to another process, the system should save the state of old process and load the new state (saved state) for the new process  The Context of a process can be represented via the PCB block diagram  The system perform no useful task while switching from one process to another. Such state is known as Context-switch time overhead  the context switch is directly proportional to the complex OS and the PCB  Multiple contexts can be loaded at once when multiple sets of registers per CPU will be provided by the hardware
  • 20. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 20 Operations on Processes The processes in the system may execute concurrently. They may create and delete process dynamically. It provide mechanisms for:  Process creation  Process termination  Process creation  A process can create new processes with the help of create process system  The various creating process is known as a Parent process
  • 21. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 21 Operations on Processes  Process creation  The new created process is known as the Children process  The newly created process may create various sub processes forming a tree of processes  A process need certain resource to complete its task  Such resources are CPU time, files, memory and I/O devices  The parent also partition its resource to its children  Restricting a child process leads to the restriction of process overloading in the system
  • 22. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 22 Operations on Processes  Process creation  The information or data to the child process is passed via parent process  Creation of process leads to two possibilities, Such as  The child along with the parent continue to execute concurrently  The parent with the child may wait to complete its execution or its termination  Creation of process along with the address space leads to two possibilities  Duplication of parent process leads to child process
  • 23. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 23 Producer - Consumer Problem  A producer process produces data or information that is ultimately consumed by consumer process  For concurrent execution of various process, a buffer is required  A producer process can produce information and consumer process consume the information produced by consumer process  A synchronization between producer process and consumer process is required to overcome various unwanted situation like,  Consumer may try to consume the information which yet to be produced. This leads to waiting of consumer process
  • 24. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 24 Producer - Consumer Problem  Producer may try to produce the information when buffer is full. This leads to waiting of producer process to consume some information by consumer process  The buffer can be provided by the operating system or the application program  The buffer can be categorized into two types:  The Bounded-Buffer  Assumes unbounded buffer size  The Unbounded-Buffer  Assumes a fixed buffer size
  • 25. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 25 Critical Section Problem  A system consisting of processes has a code segment called a critical section  At a particular instant of time, Only one process is allowed to perform its execution in the critical section  No two processes at any instant of time are allowed in the critical section  The execution of processes in the Critical Section must be mutually exclusive  Each process may request permission to enter into critical section  Critical Section has entry level and exit level section
  • 26. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 26 Critical Section Problem  A solution to Critical Section problem may satisfy the three requirements:  Mutual Exclusion  Progress  Bounded Waiting  Mutual Exclusion: When a process reside in the critical section then no two process is allowed in the critical section  Progress: The non executing processes in the remainder section can participate in the decision regarding the next process entry in the critical section  Boundary Waiting: There is a maximum limit of request to be made by a process to enter in the critical section
  • 27. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 27 The Dining Philosophers Problem Rice
  • 28. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 28 The Dining Philosophers Problem  The five Philosophers are sitting on five chairs sharing a common table  In the center of the table, some rice in a bowl is placed with the five chopsticks  The philosophers may exist in either thinking or eating phase  In thinking phase, a philosopher doesn’t interact with her colleagues  When a philosopher is hungry then the philosopher tries to pick up the two chopsticks that are closer to them  A philosopher can pick only one chopsticks at a time  A philosopher is in eating phase when he pick two chopsticks
  • 29. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 29 The Dining Philosophers Problem  After eating, the Philosopher releases two chopsticks  A philosopher is in eating phase when he pick two chopsticks
  • 30. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 30 Deadlock  A deadlock is a situation in which waiting process is requesting for the resources which is hold by another process thus resulting in a situation known as a Deadlock  A resource can be memory space, files, CPU cycles and I/O devices  A resource may be granted to a process when process request for it  In any situation, a requesting resource can be exceed over the number of available resources  In the normal situation, a resource can be granted via following sequence:  Requesting for resource  Use of resource  Release of resource
  • 31. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 31 Deadlock Note: Release and request for resources are system calls  A resource can be:  logical resource  Physical resource  Logical Resource  Semaphores  Files  Physical Resource  Printer  Memory Space  CPU cycle  Tape drives
  • 32. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 32 Deadlock Characterization  Necessary Conditions: A deadlock may occur if following four conditions satisfied simultaneously in a system  Mutual exclusion  Hold and wait  No preemption  Circular wait
  • 33. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 33 Resource Allocation Graph  A directed graph representation of graph is known as resource allocation graph  In resource allocation graph, Following are the representation:  Process is represented by . in the graph  Process to resource directed allow head is known as a requesting edge  Resource to process directed arrow head is known as assignment edge  A sample resource allocation graph is represented on next slide
  • 34. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 34 A sample Resource Allocation Graph R1 R3 P1 P2 P3 P4 R2 R4
  • 35. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 35 Deadlock Prevention Deadlock is the state, we can avoid this state of processes by ensuring that that atleast one condition can’t hold so by elaborating the necessary four condition with this approach. The four condition are  Mutual exclusion  Hold and wait  No preemption  Circular wait
  • 36. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 36 Recovery from Deadlock  Process termination  Deadlock elimination via sequential elimination of process  Elimination of all deadlocked processes  Resource preemption  Rollback  Selecting a victim  Starvation
  • 37. 1/24/2017 Mr Satyendra Mohan Srivastava, JIT Barabanki 37