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

need help please

Status
Not open for further replies.

0

MIS
Apr 13, 2000
7
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++
 
I am not getting your problem properly. Should I send a multi threaded coded to you. <br>Or you will specify a bit .<br><br><br>Thanx<br>Siddhartha Singh<br><A HREF="mailto:ssingh@aztecsoft.com">ssingh@aztecsoft.com</A>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top