online discussion-5 Version 0 |
|
👤 Author: by writer 2020-10-27 02:11:19 |
Please login to reply. Login
Please login to reply. Login
Please login to reply. Login
Please login to reply. Login
Please login to reply. Login
Please login to reply. Login
Please login to reply. Login
Please login to reply. Login
Please login to reply. Login
Please login to reply. Login
Please login to reply. Login
Please login to reply. Login
Please login to reply. Login
Please login to reply. Login
Please login to reply. Login
Please login to reply. Login
Please login to reply. Login
Please login to reply. Login
Please login to reply. Login
Please login to reply. Login
Please login to reply. Login
Please login to reply. Login
Please login to reply. Login
Please login to reply. Login
Please login to reply. Login
Please login to reply. Login
Please login to reply. Login
A Critical Section is a code segment that accesses shared variables and has to be executed as an atomic action. It means that in a group of cooperating processes, at a given point of time, only one process must be executing its critical section. If any other process also wants to execute its critical section, it must wait until the first one finishes.
<p class="center"><img src="https://www.studytonight.com/operating-system/images/critical-section-problem.png" alt="Critical Section Problem" data-cfsrc="images/critical-section-problem.png" /></p>
<hr />
<h3>Solution to Critical Section Problem</h3>
A solution to the critical section problem must satisfy the following three conditions:
<hr />
<h4>1. Mutual Exclusion</h4>
Out of a group of cooperating processes, only one process can be in its critical section at a given point of time.
<h4>2. Progress</h4>
If no process is in its critical section, and if one or more threads want to execute their critical section then any one of these threads must be allowed to get into its critical section.
PostVer 0
Please login to reply. Login