Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
843 Views

multi process sous uclunix

hi all 

i want to know if in µclinux wa can starte two application as two process to be communication between there , i have not the MMU ,
0 Kudos
5 Replies
Altera_Forum
Honored Contributor I
49 Views

That task is not at all specific NIOS or using an MMU. It's just a general Linux question.  

 

There are multiple ways. One very often used is to read and write pipes.  

 

You can test the appropriate user land software on any PC Linux box. 

 

-Michael
Altera_Forum
Honored Contributor I
49 Views

so i can use Fork() to create mutiprocess in my µclinux without MMU.?!!! 

and thant i want to start toww application in same time , how i can do that,? 

thank'you
Altera_Forum
Honored Contributor I
49 Views

With noMMU Architecture, fork() is not available. You need to use vfork() instead. AFAIK, in MMU-Linux vfork() usually is mapped to fork(), so you can just always use vfork() unless you need some specifics of fork that vfork does not provide.  

 

I don't know what you mean by "start two applications". But one application can use (v)fork() and friends to start another application, either using it's own code (thus working similar as a multi-thredded application) or load new code from a file.  

 

-Michael
Altera_Forum
Honored Contributor I
49 Views

vfork() stalls the calling process until the child calls exec(). 

So you can use it if you are using pipes (or similar) for communication between different programs, but not if you want to share any data areas. 

 

Other options - which may, or may not, be available under any specific *nix. 

- System V (named) shared memory 

- threads 

- mmap(... MAP_SHARED ...) 

- named pipes/fifos
Altera_Forum
Honored Contributor I
49 Views

 

--- Quote Start ---  

vfork() stalls the calling process until the child calls exec() 

--- Quote End ---  

 

 

And after that you have two processes running until the child stops.  

 

AFAIK, you need to take care that the parent does not stop before the child is gone. 

 

-Michael
Reply