1 / 19

Message Passing in VDK

Message Passing in VDK. Agenda. Review Of Semaphores Introduction To Message Passing Advantages and Disadvantages Using Message Passing with VDK An Unsuccessful Example A Successful Example Summary Questions. Review Of Semaphores.

sean-mejia
Download Presentation

Message Passing in VDK

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Message Passing in VDK

  2. Agenda • Review Of Semaphores • Introduction To Message Passing • Advantages and Disadvantages • Using Message Passing with VDK • An Unsuccessful Example • A Successful Example • Summary • Questions

  3. Review Of Semaphores • Semaphores allow processes to query and alter status information. • They are mainly used to control and monitor availability of system resources such as shared memory.

  4. Message Passing • Message passing can provide the same control and monitoring of system resources as semaphores, but also send a buffer with additional information as well.

  5. Advantages Of Message Passing • Useful if a shared memory architecture is not wanted or not possible. • One thread sends the necessary information or a pointer to that information to another thread.

  6. Disadvantages Of Message Passing • Added communication overhead. • Can dramatically slow the system if large amounts of data need to be sent.

  7. Using Message Passing in VDK • Basic message passing is accomplished through 4 VDK commands • id# CreateMessage(tag, size, pt_buffer) • void PostMessage(dest, pt_buffer, channel) • id# PendMessage(channel, timeout) • void GetMessagePayload(id#, tag, size, pt_buffer)

  8. The Unsuccessful Attempt • Attempted to use 4 threads in a ring topology passing around an array containing all the thread ID numbers. • Encountered problems putting the second thread in the ring

  9. The Unsuccessful Attempt

  10. The Unsuccessful Attempt • Added the functionality into this thread generated the following linker error: [Error li2007] Out of memory in memory segment "seg_pmco" in "p0". While processing the input section "seg_pmco" from file "dtor_list.doj" of size 0x2e words [Error li2007] Memory allocation errors. See the MAP file ".\Debug\individ.map" for details

  11. The Unsuccessful Attempt • Apparently the memory layout in the 21061 LDF file is incorrect according to a bug report on Analog Devices Web page. (bug number 15425)

  12. The Successful Attempt • Couldn’t fix the LDF file, so built a two thread ring instead of a four thread ring

  13. The Successful Attempt

  14. Summary • Message passing does have advantages over using semaphores, especially when the architecture doesn’t allow for shared memory access • However, the overhead inherent to message passing can slow the overall performance of the system.

  15. References • Visual DSP++ help files • Bug report 15425 at http://www.analog.com/processors/technicalSupport/toolsAnomalies.html

  16. Questions?

More Related