The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages here.

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

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-27-2006
lilo lilo is offline
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
  #2 (permalink)  
Old 05-27-2006
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,763
Homework is not allowed here on the forums.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:54 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0