Questions tagged [critical-region]
7 questions
16
votes
8 answers
Difference between "Critical Section", "Critical Region" and "Constrained Execution Region"
Are these actually three different concepts or am I getting jumbled? (I've been reading articles about threading and garbage collection together and have confused myself.)
"Critical section" - I think this may just be the term for sections of code…

J M
- 1,877
- 2
- 20
- 32
0
votes
0 answers
Is the variable between the child process created by the fork() function and the parent process a critical resource?
I have a question about OS.
Is the variable with the same name between the child process created by the fork() function and the parent process a critical resource?
I think the child process and the parent process can access variables with the same…
0
votes
0 answers
Why OpenMP gives different result every time even though I'm using Critical?
The following C program calculate the value of PI using multiple threads.
#include
#define N 10000000
int main(int argc, char **argv)
{
long int i, n = N;
double x, dx, f, sum, pi;
printf("number of intervals: %ld\n", n);
…

DevXino
- 1
- 1
0
votes
0 answers
Mutal exclusion and disable the interupts
Hello guys i have question
When a process is entering the critical region one way to stop other processes to enter the same critical region is to disable the interupts
My problem is:
Ok we disable the interrupts so the hardware can no longer stop…

Laur155 155
- 39
- 4
0
votes
1 answer
Are there critical sections in the following code?
The following code pieces are been called regularly by multiple threads in a single process. The question here is, are there critical sections?
First Code:
struct object {
struct object *nxt;
};
void delete(object **top, object *deletable) {
…

Dos
- 67
- 7
0
votes
1 answer
Many threads and critical region
If I have many threads running at the same time how can I allow only 1 thread to enter the critical region? Also what will happen if I had more than 1 thread in the critical region?

SuperMan
- 1
- 3
0
votes
1 answer
How do I link client and server to the same semaphore
I am working on an assignment that uses IPC schemes to communicate between and "Server" and a "Client" over shared files.
The shared file is created in the server application called the Data Reader along with a semaphore which is initialized. The…

Kyle Jensen
- 419
- 9
- 27