SlideShare a Scribd company logo
2
Most read
3
Most read
4
Most read
1
 When two or more processes are
reading or writing some shared data
and the final result depends on who
runs precisely when, is called race
condition.
 Race condition occurs when two or
more operations occur in an
undefined manner.
 Race condition should be avoided
because they can cause fine errors in
applications and are difficult to
debug.
2
 A critical section is a block of code
that only one process at a time can
execute.
 The critical section problem is to
ensure that only one process at a
time is allowed to be operating in its
critical section.
 Each process takes permission from
operating system to enter into the
critical section:
a) Entry Section
b) Remainder Section
c) Exit Section
3
 Solution of critical section must satisfy :
a) Mutual Exclusion : If a process is executing in its
critical section, then no other process is allowed
to execute in the critical section.
b) Progress : If no process is in the critical section,
then no other process from outside can block it
from entering the critical section.
c) Bounded Waiting : A bound must exist on the
number of times that other processes are
allowed to enter their critical sections after a
process has made a request to enter its critical
section and before that request is granted.
 OS handles critical section problem by
using Kernel, which is classified as :
a) Preemptive Kernel
b) Non-preemptive Kernel
4
 Mutual exclusion methods are used in
concurrent programming to avoid the
simultaneous use of a common
resource, such as a global variable, by
pieces of computer code called critical
section.
 Mutual exclusion can be carried out by:
a) Software Method (Highly error prone)
b) Hardware Method (Faster but incomplete)
c) Programming Language Method
5
1) At any time, only one process is allowed to enter in its critical
section.
2) Solution is implemented purely in software.
3) A process remains inside the critical section for a bounded time
only.
4) A process can not prevent other process from entering into critical
section.
5) A process must not be indefinitely postponed from entering its
critical section.
6
7

More Related Content

PPTX
Operating system critical section
PDF
Semaphores
PPTX
Deadlocks in operating system
PPTX
Deadlock Avoidance in Operating System
PPT
Chapter 7 - Deadlocks
PPT
Part 1 - PROCESS CONCEPTS
PPSX
Exception Handling
PPTX
Lecture 5 inter process communication
Operating system critical section
Semaphores
Deadlocks in operating system
Deadlock Avoidance in Operating System
Chapter 7 - Deadlocks
Part 1 - PROCESS CONCEPTS
Exception Handling
Lecture 5 inter process communication

What's hot (20)

PPTX
System protection in Operating System
PPTX
The n Queen Problem
PPS
Virtual memory
PPTX
Critical section problem in operating system.
PDF
Inter process communication
PPT
Operating System: Deadlock
PPTX
Deadlock Prevention
PDF
Deadlock Avoidance - OS
PPT
Peterson Critical Section Problem Solution
PPT
Contiguous Memory Allocation.ppt
PPT
Mutual exclusion and sync
PPTX
Iso layers
PPTX
Unit 2 data link control
PPTX
Context switching
PPTX
daa-unit-3-greedy method
PPTX
And or graph
PPTX
Presentation on Segmentation
PPT
Flow & Error Control
PPTX
Predicate logic
System protection in Operating System
The n Queen Problem
Virtual memory
Critical section problem in operating system.
Inter process communication
Operating System: Deadlock
Deadlock Prevention
Deadlock Avoidance - OS
Peterson Critical Section Problem Solution
Contiguous Memory Allocation.ppt
Mutual exclusion and sync
Iso layers
Unit 2 data link control
Context switching
daa-unit-3-greedy method
And or graph
Presentation on Segmentation
Flow & Error Control
Predicate logic
Ad

Similar to Critical Section in Operating System (20)

PPTX
critical section problem.pptx
PDF
CSI-503 - 4. Process synchronization
PPTX
Lecture 5- Process Synchronization (1).pptx
PPT
dos mutual exclusion algos
PDF
Analysis of mutual exclusion algorithms with the significance and need of ele...
PDF
Concurrency in Operating system_12345678
PDF
criticalsectionproblem-160905215747.pdf
PDF
Lecture 5- Process Synchonization_revised.pdf
PPTX
Critical Section in Operating System
PPTX
794985751-Unit-3-Inter-Process-Communication.pptx
PPT
BIL406-Chapter-9-Synchronization and Communication in MIMD Systems.ppt
PPTX
Fault Tolerant and Distributed System
PDF
Cpu scheduling & process synchronizing
PDF
Istqb question-paper-dump-3
PPTX
Lecture 9 - Process Synchronization.pptx
PPTX
Operating system 23 process synchronization
PPTX
Process Management in Android
PDF
Istqb exam sample_paper_1
DOC
Sample Paper 1233140926359988 2
PDF
Istqb question-paper-dump-8
critical section problem.pptx
CSI-503 - 4. Process synchronization
Lecture 5- Process Synchronization (1).pptx
dos mutual exclusion algos
Analysis of mutual exclusion algorithms with the significance and need of ele...
Concurrency in Operating system_12345678
criticalsectionproblem-160905215747.pdf
Lecture 5- Process Synchonization_revised.pdf
Critical Section in Operating System
794985751-Unit-3-Inter-Process-Communication.pptx
BIL406-Chapter-9-Synchronization and Communication in MIMD Systems.ppt
Fault Tolerant and Distributed System
Cpu scheduling & process synchronizing
Istqb question-paper-dump-3
Lecture 9 - Process Synchronization.pptx
Operating system 23 process synchronization
Process Management in Android
Istqb exam sample_paper_1
Sample Paper 1233140926359988 2
Istqb question-paper-dump-8
Ad

More from MOHIT AGARWAL (8)

PPTX
Firewalls and packet filters
PPTX
Code Conversion in 8085 Microprocessor
PPTX
Abstract Class & Abstract Method in Core Java
PPTX
Distance Vector & Link state Routing Algorithm
PPTX
Static Data Members and Member Functions
PPT
Modes Of Transfer in Input/Output Organization
PPTX
Newton raphson method
PPTX
Communication with Artificial intelligence
Firewalls and packet filters
Code Conversion in 8085 Microprocessor
Abstract Class & Abstract Method in Core Java
Distance Vector & Link state Routing Algorithm
Static Data Members and Member Functions
Modes Of Transfer in Input/Output Organization
Newton raphson method
Communication with Artificial intelligence

Recently uploaded (20)

PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
additive manufacturing of ss316l using mig welding
PPTX
Sustainable Sites - Green Building Construction
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
DOCX
573137875-Attendance-Management-System-original
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
Digital Logic Computer Design lecture notes
PDF
Arduino robotics embedded978-1-4302-3184-4.pdf
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
PPT on Performance Review to get promotions
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
OOP with Java - Java Introduction (Basics)
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
Well-logging-methods_new................
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
additive manufacturing of ss316l using mig welding
Sustainable Sites - Green Building Construction
Model Code of Practice - Construction Work - 21102022 .pdf
573137875-Attendance-Management-System-original
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Digital Logic Computer Design lecture notes
Arduino robotics embedded978-1-4302-3184-4.pdf
Foundation to blockchain - A guide to Blockchain Tech
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPT on Performance Review to get promotions
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
UNIT 4 Total Quality Management .pptx
OOP with Java - Java Introduction (Basics)
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Well-logging-methods_new................

Critical Section in Operating System

  • 1. 1
  • 2.  When two or more processes are reading or writing some shared data and the final result depends on who runs precisely when, is called race condition.  Race condition occurs when two or more operations occur in an undefined manner.  Race condition should be avoided because they can cause fine errors in applications and are difficult to debug. 2
  • 3.  A critical section is a block of code that only one process at a time can execute.  The critical section problem is to ensure that only one process at a time is allowed to be operating in its critical section.  Each process takes permission from operating system to enter into the critical section: a) Entry Section b) Remainder Section c) Exit Section 3
  • 4.  Solution of critical section must satisfy : a) Mutual Exclusion : If a process is executing in its critical section, then no other process is allowed to execute in the critical section. b) Progress : If no process is in the critical section, then no other process from outside can block it from entering the critical section. c) Bounded Waiting : A bound must exist on the number of times that other processes are allowed to enter their critical sections after a process has made a request to enter its critical section and before that request is granted.  OS handles critical section problem by using Kernel, which is classified as : a) Preemptive Kernel b) Non-preemptive Kernel 4
  • 5.  Mutual exclusion methods are used in concurrent programming to avoid the simultaneous use of a common resource, such as a global variable, by pieces of computer code called critical section.  Mutual exclusion can be carried out by: a) Software Method (Highly error prone) b) Hardware Method (Faster but incomplete) c) Programming Language Method 5
  • 6. 1) At any time, only one process is allowed to enter in its critical section. 2) Solution is implemented purely in software. 3) A process remains inside the critical section for a bounded time only. 4) A process can not prevent other process from entering into critical section. 5) A process must not be indefinitely postponed from entering its critical section. 6
  • 7. 7

Editor's Notes

  • #2: To use this title animation slide with a new image simply 1) move the top semi-transparent shape to the side, 2) delete placeholder image, 3) click on the picture icon to add a new picture, 4) Move semi-transparent shape back to original position, 5) Update text on slide.
  • #8: To use this title animation slide with a new image simply 1) move the top semi-transparent shape to the side, 2) delete placeholder image, 3) click on the picture icon to add a new picture, 4) Move semi-transparent shape back to original position, 5) Update text on slide.