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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

please help??

Status
Not open for further replies.

0

MIS
Apr 13, 2000
7
0
0
IE
Hey everyone,<br>Ive been given this problem and can only make a very scimpy start on it....<br>can someone please help me??<br><br><br>Synchronise 2 threads: 1 prints 1, second prints 2,<br>use semiphores for synchronisation (2 needed)<br>even wait- signal<br>odd wait- signaal<br>initial value of semiphores is needed<br>prints odd one = 1, waits on semiphore, <br>even= 2, signal odd signals = 3,<br>guarantee- one thread that prints first, not necessarily the one created first; placement of semiphore is crucial.<br>if loops are incorrect, one thread may die, if 1 less digit, 2nd loop may be too small. Ensure it still gets the semiphore.<br><br>Please Please sort this out....<br>Thanks<br>ken<br><br>Ps, this has to be written in c/c++
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top