Can anyone give me the meaning of semaphore and queues?For what sake it is used?I checked in the site but not understood properly.

Reply to
Loading thread data ...

Which of the ~2500000 hits when googling for 'semaphore' doesn't give you enough information ? Which 'site' did you check?


Stefan Naewe
Reply to
Stefan Näwe

Semaphores are flags with an atomic test&set operation. That means, if one process want to have a ressource, it checks wether this resource ist free and if it is free it will set it occupied. This test&set may not be interrupted, because if in the interrupt the state changes, the check is incorrect. Semaphores are used for all ressource not shareble.

Queues are data structures with an atomic put and get. So if one process puts something in the queue this something will not get mixed up with any other something put in the queue. Queues are used to pass data from many processes to one process.

Regards, Kurt

Kurt Harders
PiN -Präsenz im Netz GITmbH
 Click to see the full signature
Reply to
Kurt Harders

Semaphore is a signalling system, using flags and arm positions to denote alphanumeric characters. The CND (Campaign for Nuclear Disarmament) symbol is an overlay of the diagrams for the semaphore letters "C" "N" "D".

Queues are mechanisms for sucking the lifeblood out of shoppers or post office customers.


BTW, when is our homework assignment due?

Reply to
Deep Reset

Do you mean

| /|\

That is just N

/ \

superimposed on D

| |

No C involved

\ |

Reply to
Richard Henry

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.