Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...It's fun to see others going through the same stuff I did and be able to help. It's also a way for me to stay sharp and not lose the stuff I've learned..."

Geography

Where in the world do Tek-Tips members come from?
0 (MIS)
19 Apr 00 15:25
Hey everyone,
Ive been given this problem and can only make a very scimpy start on it....
can someone please help me??


Synchronise 2 threads: 1 prints 1, second prints 2,
use semiphores for synchronisation (2 needed)
even wait- signal
odd wait- signaal
initial value of semiphores is needed
prints odd one = 1, waits on semiphore,
even= 2, signal odd signals = 3,
guarantee- one thread that prints first, not necessarily the one created first; placement of semiphore is crucial.
if loops are incorrect, one thread may die, if 1 less digit, 2nd loop may be too small. Ensure it still gets the semiphore.

Please Please sort this out....
Thanks
ken

Ps, this has to be written in c/c++
Helpful Member!  kb244 (Programmer)
19 Apr 00 15:40
Have you any other informations on how you think you might want this done, or given thought to a layout/plans, even if you dont know how the coding is goning to work have you given thought on what proccesses you want for it to work, cause its much easier to work with (and for me to help with) if its broken down into manageble parts

Karl
kb244@kb244.8m.com

Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML, ASP(somewhat), QBasic(least i didnt start with COBOL)

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close