Computer Science - Operating Systems Concepts - Discussion
Discussion Forum : Operating Systems Concepts - Section 1 (Q.No. 3)
3.
To avoid the race condition, the number of processes that may be simultaneously inside their critical section is
Discussion:
22 comments Page 2 of 3.
Keshika said:
1 decade ago
Consider a system consisting of processes. Each process has a segment of code, called a critical section (CS) , in which the process may be changing common variables, updating a table, writing a file, and so on.
The important feature of the system is that, when one process is executing in its CS, no other process is to be allowed to execute in its CS.
That is, no two processes are executing in their CSs at the same time.
Each process must request permission to enter its CS. The section of code implementing this request is the entry section.
The CS may be followed by an exit section.
The remaining code is the remainder section.
The important feature of the system is that, when one process is executing in its CS, no other process is to be allowed to execute in its CS.
That is, no two processes are executing in their CSs at the same time.
Each process must request permission to enter its CS. The section of code implementing this request is the entry section.
The CS may be followed by an exit section.
The remaining code is the remainder section.
Rajeev said:
1 decade ago
In a critical section only one process should execute.
Shashak goyal said:
1 decade ago
Race condition brings in the idea of critical section. Race condition occurs when two threads try to access the shared data and change it at the same time.
Vaishnavi said:
1 decade ago
No two process can be in their critical section at the same time. If not race condition may occur.
Mutex (mutual exclusion) helps to avoid 2 processes being in their critical section at the same time.
If the number of processes to be handled is more than 2, then semaphores can be used to avoid race condition.
Mutex (mutual exclusion) helps to avoid 2 processes being in their critical section at the same time.
If the number of processes to be handled is more than 2, then semaphores can be used to avoid race condition.
Pooja said:
1 decade ago
Entering more than one process in their critical section may cause race condition. So only one process entering at a time.
(1)
Mahendra said:
10 years ago
Final output of any variable depends on the execution sequence of the process. This condition is called as Race Condition.
(1)
Jeevan said:
9 years ago
The critical section allows only one process and executes wait() until the process is completed hence there can be one process.
(1)
Jahangeer said:
8 years ago
Well defined by @Ashok.
Nidhi said:
7 years ago
In a critical condition more than one threads can be simultaneously running in order to produce a result. Now the sequence of these threads may lead to different answer at the end of process (as the threads must have read and done the processing of your instruction). So, only one thread shall be processed in order to avoid various result out of the critical condition.
Joyi said:
7 years ago
If the order of execution of process determines the final state of a shared resource it's called race condition.
So, a better way to avoid is, do execution one after one.
So, a better way to avoid is, do execution one after one.
(2)
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers