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 1 of 3.
Anupama said:
1 decade ago
Critical section is the part of program code where the program changes global variables, writing files etc. So entering more than one process in their critical section may cause race condition.
Mumtaz gohar said:
1 decade ago
In fact we need four conditions to hold.
No two processes may be simultaneously inside their critical sections.
No assumptions may be made about the speed or the number of processors.
No process running outside its critical section may block other processes.
No process should have to wait forever to enter its critical section.
No two processes may be simultaneously inside their critical sections.
No assumptions may be made about the speed or the number of processors.
No process running outside its critical section may block other processes.
No process should have to wait forever to enter its critical section.
Parsh said:
1 decade ago
Race condition bring in the idea of critical section. Critical section is a mutually exclusive section whereby more than 1 process reading or writing the shared data is prohibited. So to avoid Race Condition, the following 4 conditions are needed
Ganesh said:
1 decade ago
A situation where several process acess and manipulate the same data concurently and the outcomes of the execution depends on the particular order in which the access takes place is called a race condition and to guard against the raic condition above we need to ensure that only 1 process at a time cam be manipulating the variable counter.
Ashok said:
1 decade ago
A race condition occurs when two threads access a shared variable at the same time. The first thread reads the variable, and the second thread reads the same value from the variable. Then the first thread and second thread perform their operations on the value, and they race to see which thread can write the value last to the shared variable. The value of the thread that writes its value last is preserved, because the thread is writing over the value that the previous thread wrote.
Jag said:
1 decade ago
Race condition also known like a deadlock problem by the form threads.
Vijay chilkoti said:
1 decade ago
Race condition is that condition when two or more process are using the same data or shared resource and they all try to make change in that at the same time.
Ananth said:
1 decade ago
If there are more more than two processes are in the critical section and accessing the variables, if one process increases the variable value and the other process is decreasing that variable value. We are unable to determine the value of the variable. Those two processes accessing the variable and manipulating the values simultaneously this will be resulted as the racing condition.
Maharaj Sudhir Sisodiya said:
1 decade ago
A process is said to be in critical section when it accesses the shared variables, shared data , shared registers etc. For correct execution of a set of processes , the order of execution must be defined, another process may enter the critical section only when the previous process has exited. This will ensure that there is no dead lock or race among the process as to which process will change the data. This is somewhat similar to CSMA/CD in networking.
Rajesh said:
1 decade ago
A situation in which multiple processes read and write a shared data item and the final result depends on the relative timing of their execution.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers