The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Semaphore Jaken Shell Programming and Scripting 1 05-06-2007 09:17 PM
Example for use of kernel semaphore Rakesh Ranjan High Level Programming 3 03-20-2006 02:33 AM
semaphore raguramtgr UNIX for Dummies Questions & Answers 3 07-27-2004 01:18 AM
Semaphore vjsony UNIX for Dummies Questions & Answers 3 04-07-2003 11:06 AM
semaphore yls177 UNIX for Dummies Questions & Answers 1 10-08-2002 08:18 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 05-26-2006
Registered User
 

Join Date: May 2006
Posts: 1
semaphore program

Hello,
can you help me to write this program?

Write a program that create 2 processes and 1 named pipe,where 1st child calculate 1st prime number, send it to pipe. 2nd process reads it from pipe and calculates next prime number and send it back to pipe.Controle synchronization with a semaphore.
Example of execution
Process 1527 prime number is 1
Process 1528 prime number is 3
Process 1527 prime number is 5
Etc…

N.B:while 1st process calculates ,2nd process should be blocked by semaphore
thanks
Reply With Quote
Forum Sponsor
  #2  
Old 05-27-2006
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 4,297
Homework is not allowed here on the forums.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 12:24 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0