Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Semaphore

Status
Not open for further replies.

merwa

ISP
Dec 12, 2002
14
Hi,
What is SEMAPHORE ...what's it's role.Ur answer is appreciated
 
If you have many programs sharing the same data (databases are often written this way) you need some way to share infomation between running programs about which ones can have access to the shared data. the finer you allow them to share, the more semaphores you need them to be able to create.

Next disk block = 5

Program A reads 5
Program B reads 5
Prorram A uses block 6
Program B Uses Block 6
Program A adds one to Next Disk bock
Program B adds one to Next Disk bock

This is bad, you need semaphores to protect (latch) that memory area


I tried to remain child-like, all I acheived was childish.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top