What's the difference between semaphore , critical sections and mutex?
Answer Posted / rajji
Semaphore and mutex are the synchronising mechanisms for shared resources. And critical region is part of synchonizing schemes, means it's a part of process sections.
Normally every process will have 3 sections 1.Entry section 2.critical section 3. exit section
In these critical section is more important which tells us how to manage resources like.
In semaphores if one thread is waiting for resource then other thread which has the resource can signal the waiting thread.
In Mutex if one thead is waiting for resource then it has to wait till resource get released. This is the best mechanism for multithreading.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What are the 5 stages of chkdsk?
Can I use chkdsk on ssd?
What is bursting?
Is 64 bit excel faster?
How can I tell what programs are running in the background on my computer?
Does dual boot affect performance?
Define the difference between preemptive and nonpreemptive scheduling.
What is the difference between logical and physical address space?
What is the unified memory architecture? Explain.
Which is faster shared memory or message passing?
In a ram description ddr 2 1066mhz “2.5-3-3-8” what do the numbers in quotes signify?
Can anybody send me Excel tips and improtant formul...... please.
Considering notepad/IE or any other thing as process, What will happen if you start notepad or IE 3 times ? Where three processes are started or three threads are started?
How does the cpu and the ram communicate?
What is fragmentation? Different types of fragmentation?