SlideShare a Scribd company logo
1 of 17
30.9.21
 Process Synchronization is a way to
coordinate processes that use shared data.
 It occurs in an operating system among
cooperating processes.
10/1/2021 2
Dr.M.Karthika/AP/IT/MTNC
 The main purpose of synchronization is the
sharing of resources without interference
using mutual exclusion.
 The other purpose is the coordination of the
process interactions in an operating system.
Semaphores and monitors are the most
powerful and most commonly used
mechanisms to solve synchronization
problems.
10/1/2021 3
Dr.M.Karthika/AP/IT/MTNC
 It is the task phenomenon of coordinating the
execution of processes in such a way that no two
processes can have access to the same shared
data and resources.
 It is a procedure that is involved in order to
preserve the appropriate order of execution of
cooperative processes.
 In order to synchronize the processes, there are
various synchronization mechanisms.
 Process Synchronization is mainly needed in a
multi-process system when multiple processes
are running together, and more than one
processes try to gain access to the same shared
resource or any data at the same time.
10/1/2021 4
Dr.M.Karthika/AP/IT/MTNC
 Many systems provide hardware support for critical section code.
The critical section problem could be solved easily in a single-
processor environment if we could disallow interrupts to occur
while a shared variable or resource is being modified.
 In this manner, we could be sure that the current sequence of
instructions would be allowed to execute in order without pre-
emption. Unfortunately, this solution is not feasible in a
multiprocessor environment.
 Disabling interrupt on a multiprocessor environment can be
time-consuming as the message is passed to all the processors.
 This message transmission lag delays the entry of threads into
the critical section, and the system efficiency decreases.
10/1/2021 5
Dr.M.Karthika/AP/IT/MTNC
 As the synchronization hardware solution is
not easy to implement for everyone, a strict
software approach called Mutex Locks was
introduced.
 In this approach, in the entry section of code, a
LOCK is acquired over the critical resources
modified and used inside the critical section,
and in the exit section that LOCK is released.
 As the resource is locked while a process
executes its critical section hence no other
process can access it.
10/1/2021 6
Dr.M.Karthika/AP/IT/MTNC
 Solaris 2
 Windows 2000
10/1/2021 7
Dr.M.Karthika/AP/IT/MTNC
 Solaris implements variety of locks to support
multitasking, multithreading and
multiprocessing.
 It uses adaptive mutexes, conditional variables,
semaphores, read-write locks, turnstiles to
control access to critical sections.
 On A multiprocessor system it starts as a
standard semaphore spin-lock.
 If the lock is held by a thread which is running
on another CPU then the thread spins.
 If the lock is held by a thread which is currently
in run state,the thread blocks, going to sleep
until it is awakened by the signal of releasing the
lock.
10/1/2021 8
Dr.M.Karthika/AP/IT/MTNC
 The spin-waiting method is exceedingly
inefficient if code segment is longer.
So conditional variables, semaphores are
used for them.
 Solaris provides Read-Write lock to protect
the data are frequently accessed by long
section of code usually in read-only manner.
 It uses turnstiles to order the list of threads
waiting to acquire either an adaptive mutex
or read-writer lock.
10/1/2021 9
Dr.M.Karthika/AP/IT/MTNC
 Turnstile is a queue structure containing
threads blocked on a lock.
 They are per lock holding thread, not per
object.
 Turnstiles are organized according to
priority-inheritance which gives the running
thread the highest of the priorities of the
threads in its turnstiles to prevent priority
inversion.
10/1/2021 10
Dr.M.Karthika/AP/IT/MTNC
 Locking mechanisms are used by kernel is
also used by user-level threads, so that the
locks are available both inside and outside of
the kernel. The difference is only that
priority-inheritance in only used in kernel,
user-level thread does not provide this
functionality.
 To optimize Solaris performance, developers
refine the locking methods as locks are used
frequently and typically for crucial kernel
functions, tuning their implementations and
use to gain great performance.
10/1/2021 11
Dr.M.Karthika/AP/IT/MTNC
 Windows operating system is a multithreaded
kernel that provide support for real time
application and multiprocessors.
 On uniprocessor system, Windows provides
interrupt masks to protect access to global
resources.
 It protects access to global resource using
spinlock.
 The kernel uses spinlocks only to protect short
code segment like Solaris.
 The kernel ensures that while holding a spinlock,
a thread will never be preempted.
10/1/2021 12
Dr.M.Karthika/AP/IT/MTNC
 Windows provide dispatcher object for thread
synchronization according to several different
mechanisms including mutexes, semaphores,
events and timers.
 The system protects shared data by requiring
a thread to gain ownership of a mutex for
accessing the data and when it is finished,
releases the ownership.
10/1/2021 13
Dr.M.Karthika/AP/IT/MTNC
 Events acts as a conditional variable to notify
a waiting thread when desired condition
occurs.
 Timers are used to notify one or more thread
when time expired.
 Dispatcher objects may be either signaled
state or a non-signaled state.
10/1/2021 14
Dr.M.Karthika/AP/IT/MTNC
10/1/2021 15
Dr.M.Karthika/AP/IT/MTNC
 Signaled state indicates that an object is
available and a thread will not block when
acquiring the object.
 Non-signaled state indicates that an object is
not available and a thread will block when
trying to acquire the object.
10/1/2021 16
Dr.M.Karthika/AP/IT/MTNC
THANK YOU
10/1/2021 17
Dr.M.Karthika/AP/IT/MTNC

More Related Content

Similar to Process Synchronization Mechanisms in Solaris and Windows

lecture 1 (Part 2) kernal and its categories
lecture 1 (Part 2) kernal and its categorieslecture 1 (Part 2) kernal and its categories
lecture 1 (Part 2) kernal and its categoriesWajeehaBaig
 
input and output protection.pptx
input and output protection.pptxinput and output protection.pptx
input and output protection.pptxAliyanAbbas1
 
Symmetric multiprocessing and Microkernel
Symmetric multiprocessing and MicrokernelSymmetric multiprocessing and Microkernel
Symmetric multiprocessing and MicrokernelManoraj Pannerselum
 
Distributed operating system
Distributed operating systemDistributed operating system
Distributed operating systemPrankit Mishra
 
MODERN OPERATING SYSTEM
MODERN OPERATING SYSTEMMODERN OPERATING SYSTEM
MODERN OPERATING SYSTEMkhanz2012
 
Linux kernel Architecture and Properties
Linux kernel Architecture and PropertiesLinux kernel Architecture and Properties
Linux kernel Architecture and PropertiesSaadi Rahman
 
Optimization of Remote Core Locking Synchronization in Multithreaded Programs...
Optimization of Remote Core Locking Synchronization in Multithreaded Programs...Optimization of Remote Core Locking Synchronization in Multithreaded Programs...
Optimization of Remote Core Locking Synchronization in Multithreaded Programs...ITIIIndustries
 
Factors Affecting the System Safety || Linux
Factors Affecting the System Safety || LinuxFactors Affecting the System Safety || Linux
Factors Affecting the System Safety || LinuxZain Abid
 
Operating System Simple Introduction
Operating System Simple IntroductionOperating System Simple Introduction
Operating System Simple IntroductionDiwash Sapkota
 
unixlinux - kernelexplain yield in user spaceexplain yield in k.pdf
unixlinux - kernelexplain yield in user spaceexplain yield in k.pdfunixlinux - kernelexplain yield in user spaceexplain yield in k.pdf
unixlinux - kernelexplain yield in user spaceexplain yield in k.pdfPRATIKSINHA7304
 
Distributed system lectures
Distributed system lecturesDistributed system lectures
Distributed system lecturesmarwaeng
 

Similar to Process Synchronization Mechanisms in Solaris and Windows (20)

lecture 1 (Part 2) kernal and its categories
lecture 1 (Part 2) kernal and its categorieslecture 1 (Part 2) kernal and its categories
lecture 1 (Part 2) kernal and its categories
 
Operating system
Operating systemOperating system
Operating system
 
input and output protection.pptx
input and output protection.pptxinput and output protection.pptx
input and output protection.pptx
 
Wiki 2
Wiki 2Wiki 2
Wiki 2
 
Symmetric multiprocessing and Microkernel
Symmetric multiprocessing and MicrokernelSymmetric multiprocessing and Microkernel
Symmetric multiprocessing and Microkernel
 
Distributed operating system
Distributed operating systemDistributed operating system
Distributed operating system
 
OS-UNIT-1-Part-2.pdf
OS-UNIT-1-Part-2.pdfOS-UNIT-1-Part-2.pdf
OS-UNIT-1-Part-2.pdf
 
Kernels and its types
Kernels and its typesKernels and its types
Kernels and its types
 
MODERN OPERATING SYSTEM
MODERN OPERATING SYSTEMMODERN OPERATING SYSTEM
MODERN OPERATING SYSTEM
 
Linux kernel Architecture and Properties
Linux kernel Architecture and PropertiesLinux kernel Architecture and Properties
Linux kernel Architecture and Properties
 
Optimization of Remote Core Locking Synchronization in Multithreaded Programs...
Optimization of Remote Core Locking Synchronization in Multithreaded Programs...Optimization of Remote Core Locking Synchronization in Multithreaded Programs...
Optimization of Remote Core Locking Synchronization in Multithreaded Programs...
 
MIcrokernel
MIcrokernelMIcrokernel
MIcrokernel
 
Windows 2000
Windows 2000Windows 2000
Windows 2000
 
Factors Affecting the System Safety || Linux
Factors Affecting the System Safety || LinuxFactors Affecting the System Safety || Linux
Factors Affecting the System Safety || Linux
 
Operating System Simple Introduction
Operating System Simple IntroductionOperating System Simple Introduction
Operating System Simple Introduction
 
unixlinux - kernelexplain yield in user spaceexplain yield in k.pdf
unixlinux - kernelexplain yield in user spaceexplain yield in k.pdfunixlinux - kernelexplain yield in user spaceexplain yield in k.pdf
unixlinux - kernelexplain yield in user spaceexplain yield in k.pdf
 
Monolithic kernel
Monolithic kernelMonolithic kernel
Monolithic kernel
 
Distributed system lectures
Distributed system lecturesDistributed system lectures
Distributed system lectures
 
Desktop support qua
Desktop support quaDesktop support qua
Desktop support qua
 
Desktop support qua
Desktop support quaDesktop support qua
Desktop support qua
 

More from Dr.M.Karthika parthasarathy

IoT Enabled Wireless Technology Based Monitoring and Speed Control of Motor U...
IoT Enabled Wireless Technology Based Monitoring and Speed Control of Motor U...IoT Enabled Wireless Technology Based Monitoring and Speed Control of Motor U...
IoT Enabled Wireless Technology Based Monitoring and Speed Control of Motor U...Dr.M.Karthika parthasarathy
 
Unit 1 Introduction to Artificial Intelligence.pptx
Unit 1 Introduction to Artificial Intelligence.pptxUnit 1 Introduction to Artificial Intelligence.pptx
Unit 1 Introduction to Artificial Intelligence.pptxDr.M.Karthika parthasarathy
 

More from Dr.M.Karthika parthasarathy (20)

IoT Enabled Wireless Technology Based Monitoring and Speed Control of Motor U...
IoT Enabled Wireless Technology Based Monitoring and Speed Control of Motor U...IoT Enabled Wireless Technology Based Monitoring and Speed Control of Motor U...
IoT Enabled Wireless Technology Based Monitoring and Speed Control of Motor U...
 
Linux Lab Manual.doc
Linux Lab Manual.docLinux Lab Manual.doc
Linux Lab Manual.doc
 
Unit 2 IoT.pdf
Unit 2 IoT.pdfUnit 2 IoT.pdf
Unit 2 IoT.pdf
 
Unit 3 IOT.docx
Unit 3 IOT.docxUnit 3 IOT.docx
Unit 3 IOT.docx
 
Unit 1 Introduction to Artificial Intelligence.pptx
Unit 1 Introduction to Artificial Intelligence.pptxUnit 1 Introduction to Artificial Intelligence.pptx
Unit 1 Introduction to Artificial Intelligence.pptx
 
Unit I What is Artificial Intelligence.docx
Unit I What is Artificial Intelligence.docxUnit I What is Artificial Intelligence.docx
Unit I What is Artificial Intelligence.docx
 
Introduction to IoT - Unit II.pptx
Introduction to IoT - Unit II.pptxIntroduction to IoT - Unit II.pptx
Introduction to IoT - Unit II.pptx
 
IoT Unit 2.pdf
IoT Unit 2.pdfIoT Unit 2.pdf
IoT Unit 2.pdf
 
Chapter 3 heuristic search techniques
Chapter 3 heuristic search techniquesChapter 3 heuristic search techniques
Chapter 3 heuristic search techniques
 
Ai mcq chapter 2
Ai mcq chapter 2Ai mcq chapter 2
Ai mcq chapter 2
 
Introduction to IoT unit II
Introduction to IoT  unit IIIntroduction to IoT  unit II
Introduction to IoT unit II
 
Introduction to IoT - Unit I
Introduction to IoT - Unit IIntroduction to IoT - Unit I
Introduction to IoT - Unit I
 
Internet of things Unit 1 one word
Internet of things Unit 1 one wordInternet of things Unit 1 one word
Internet of things Unit 1 one word
 
Unit 1 q&a
Unit  1 q&aUnit  1 q&a
Unit 1 q&a
 
.net progrmming part4
.net progrmming part4.net progrmming part4
.net progrmming part4
 
.net progrmming part3
.net progrmming part3.net progrmming part3
.net progrmming part3
 
.net progrmming part1
.net progrmming part1.net progrmming part1
.net progrmming part1
 
.net progrmming part2
.net progrmming part2.net progrmming part2
.net progrmming part2
 
Java programs
Java programsJava programs
Java programs
 
What is a shell script
What is a shell scriptWhat is a shell script
What is a shell script
 

Recently uploaded

Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
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
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
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
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
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
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
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
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
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
 
_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
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 

Recently uploaded (20)

Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
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
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........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 )
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
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
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
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
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
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
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
_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
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 

Process Synchronization Mechanisms in Solaris and Windows

  • 2.  Process Synchronization is a way to coordinate processes that use shared data.  It occurs in an operating system among cooperating processes. 10/1/2021 2 Dr.M.Karthika/AP/IT/MTNC
  • 3.  The main purpose of synchronization is the sharing of resources without interference using mutual exclusion.  The other purpose is the coordination of the process interactions in an operating system. Semaphores and monitors are the most powerful and most commonly used mechanisms to solve synchronization problems. 10/1/2021 3 Dr.M.Karthika/AP/IT/MTNC
  • 4.  It is the task phenomenon of coordinating the execution of processes in such a way that no two processes can have access to the same shared data and resources.  It is a procedure that is involved in order to preserve the appropriate order of execution of cooperative processes.  In order to synchronize the processes, there are various synchronization mechanisms.  Process Synchronization is mainly needed in a multi-process system when multiple processes are running together, and more than one processes try to gain access to the same shared resource or any data at the same time. 10/1/2021 4 Dr.M.Karthika/AP/IT/MTNC
  • 5.  Many systems provide hardware support for critical section code. The critical section problem could be solved easily in a single- processor environment if we could disallow interrupts to occur while a shared variable or resource is being modified.  In this manner, we could be sure that the current sequence of instructions would be allowed to execute in order without pre- emption. Unfortunately, this solution is not feasible in a multiprocessor environment.  Disabling interrupt on a multiprocessor environment can be time-consuming as the message is passed to all the processors.  This message transmission lag delays the entry of threads into the critical section, and the system efficiency decreases. 10/1/2021 5 Dr.M.Karthika/AP/IT/MTNC
  • 6.  As the synchronization hardware solution is not easy to implement for everyone, a strict software approach called Mutex Locks was introduced.  In this approach, in the entry section of code, a LOCK is acquired over the critical resources modified and used inside the critical section, and in the exit section that LOCK is released.  As the resource is locked while a process executes its critical section hence no other process can access it. 10/1/2021 6 Dr.M.Karthika/AP/IT/MTNC
  • 7.  Solaris 2  Windows 2000 10/1/2021 7 Dr.M.Karthika/AP/IT/MTNC
  • 8.  Solaris implements variety of locks to support multitasking, multithreading and multiprocessing.  It uses adaptive mutexes, conditional variables, semaphores, read-write locks, turnstiles to control access to critical sections.  On A multiprocessor system it starts as a standard semaphore spin-lock.  If the lock is held by a thread which is running on another CPU then the thread spins.  If the lock is held by a thread which is currently in run state,the thread blocks, going to sleep until it is awakened by the signal of releasing the lock. 10/1/2021 8 Dr.M.Karthika/AP/IT/MTNC
  • 9.  The spin-waiting method is exceedingly inefficient if code segment is longer. So conditional variables, semaphores are used for them.  Solaris provides Read-Write lock to protect the data are frequently accessed by long section of code usually in read-only manner.  It uses turnstiles to order the list of threads waiting to acquire either an adaptive mutex or read-writer lock. 10/1/2021 9 Dr.M.Karthika/AP/IT/MTNC
  • 10.  Turnstile is a queue structure containing threads blocked on a lock.  They are per lock holding thread, not per object.  Turnstiles are organized according to priority-inheritance which gives the running thread the highest of the priorities of the threads in its turnstiles to prevent priority inversion. 10/1/2021 10 Dr.M.Karthika/AP/IT/MTNC
  • 11.  Locking mechanisms are used by kernel is also used by user-level threads, so that the locks are available both inside and outside of the kernel. The difference is only that priority-inheritance in only used in kernel, user-level thread does not provide this functionality.  To optimize Solaris performance, developers refine the locking methods as locks are used frequently and typically for crucial kernel functions, tuning their implementations and use to gain great performance. 10/1/2021 11 Dr.M.Karthika/AP/IT/MTNC
  • 12.  Windows operating system is a multithreaded kernel that provide support for real time application and multiprocessors.  On uniprocessor system, Windows provides interrupt masks to protect access to global resources.  It protects access to global resource using spinlock.  The kernel uses spinlocks only to protect short code segment like Solaris.  The kernel ensures that while holding a spinlock, a thread will never be preempted. 10/1/2021 12 Dr.M.Karthika/AP/IT/MTNC
  • 13.  Windows provide dispatcher object for thread synchronization according to several different mechanisms including mutexes, semaphores, events and timers.  The system protects shared data by requiring a thread to gain ownership of a mutex for accessing the data and when it is finished, releases the ownership. 10/1/2021 13 Dr.M.Karthika/AP/IT/MTNC
  • 14.  Events acts as a conditional variable to notify a waiting thread when desired condition occurs.  Timers are used to notify one or more thread when time expired.  Dispatcher objects may be either signaled state or a non-signaled state. 10/1/2021 14 Dr.M.Karthika/AP/IT/MTNC
  • 16.  Signaled state indicates that an object is available and a thread will not block when acquiring the object.  Non-signaled state indicates that an object is not available and a thread will block when trying to acquire the object. 10/1/2021 16 Dr.M.Karthika/AP/IT/MTNC