Difference between critical section, mutex and semaphore.

Difference between critical section, mutex and semaphore.

A critical section in which the process may be changing common variables, updating table, writing a file and perform another function. The important problem is that if one process is executing in its critical section, no other process is to be allowed to execute in its critical section. Each process much request permission to enter its critical section.

A semaphore is a tool for synchronization and it is used to remove the critical section problem which is that no two processes can run simultaneously together so to remove this two signal operations are used named as wait and signal which is used to remove the mutual exclusion of the critical section. as an unsigned one of the most important synchronization primitives, because you can build many other Decrementing the semaphore is called acquiring or locking it, incrementing is called releasing or unlocking.

A mutex is a special case of the semaphore and also known as binary mutex it can have only two values minimum of 0 and maximum of 1, meaning it can be either locked or unlocked. It is used to prevent more than one thread from accessing the same data while allowing multiple threads to run on it.
What is OLE? How do you handle drag and drop in OLE?
OLE is meant for Object Linking and Embedding. It is a way of handling compound documents (Single document which can store data in multiple formats—such as text.........
What is IUnknown? Explain some of commonly used methods provided by IUnknown.
IUnknown is the base interface for every COM class. Through all this COM interfaces are derived. It uses three methods which are as follows:...............
What is the use of message map? Advantages of a message map.
Any system is a message driven system. Every event has to be noted down and stored somewhere like a mouse click or a printer signal sends a message to the running application which in turn handles the.........
Post your comment