Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

multi process sous uclunix

Altera_Forum
Honored Contributor II
892 Views

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 II
98 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 II
98 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 II
98 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 II
98 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 II
98 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