2010-11-08 03:26:49     How could I benefit from Dual core BF561

Document created by Aaronwu Employee on Aug 23, 2013
Version 1Show Document
  • View in full screen mode

2010-11-08 03:26:49     How could I benefit from Dual core BF561

Fisher Ho (TAIWAN)

Message: 95638   

 

Hi, Sirs,

 

 

 

      I studied several methods and did  experiments that how to write multi-tasking programs   on BF561.

 

 

 

      But I have no idea that how to implement it.

 

 

 

     Since...

 

     If I choose multi-process programming,

 

     vfork() prodeces a new child process, but the parent process would be stop.

 

     If I perform exec(), the function will not return. The parent will be raplaced.

 

     I don't know how to  generate a multi-process enviroment....Orz

 

 

 

    If I use linux-thread,  generated threads only could run in one core.

 

    NPTL seems  not to be supported by uclibc and BF561 SMP developing environment.

 

 

 

   How could I specify a task for the other core? Thank you very much.

TranslateQuoteReplyEditDelete

 

 

2010-11-08 05:32:08     Re: How could I benefit from Dual core BF561

Sonic Zhang (CHINA)

Message: 95640   

 

You should call vfork() in your parent process and then call execve() to load a binary if return from vfork as a child process. After the child process context is replaced by the new binary, parent and child processes can run independantly.

QuoteReplyEditDelete

 

 

2010-11-08 09:03:20     Re: How could I benefit from Dual core BF561

Fisher Ho (TAIWAN)

Message: 95643   

 

Thank you for your reply...

 

 

 

I made a stupid mistake.   I forgot to make sure pid number is child...

 

 

 

When can I stop stupid funny errors?  QQ

TranslateQuoteReplyEditDelete

 

 

2010-11-08 20:03:58     Re: How could I benefit from Dual core BF561

Mike Frysinger (UNITED STATES)

Message: 95658   

 

the threading model (linuxthreads/nptl/whatever) doesnt matter to the BF561 SMP implementation.  due to design limitations (which come from hardware limitations), threads are all run on the same core.  only different processes may be spread among cores which means you would probably want standard IPC mechanisms to make them work together.  this is all documented here:

  docs.blackfin.uclinux.org/doku.php?id=linux-kernel:smp-like

 

as for controlling which cores a process runs on, please review the documentation:

  docs.blackfin.uclinux.org/doku.php?id=linux-kernel:smp-like#application_suggestions

Attachments

    Outcomes