What's the difference between semaphore , critical sections and mutex?
Answer / 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 |
What are dynamic linking?
What is the difference between logical and physical address space?
How does the system detect thrashing?
Is faster ram worth it?
What is spooling? and What is spooled device? Give the examples for the spooled devices?
What is the difference between af_inet and pf_inet?
What are pages?
What is the difference between primary & secondary storage device?
What are the different functions of an operating system?
Is a directory a regular file?
What is synchronously and asynchronously?
Can a 64 bit computer run 32 bit programs?