1 / 6

Relevance of Thread Model to E mbedded and RT Systems

Relevance of Thread Model to E mbedded and RT Systems. Bina Ramamurthy bina@buffalo.edu. Topics. Reference : https :// computing.llnl.gov/tutorials/pthreads Process space vs thread space When to use threads ? Some examples in using threads: Pthread

bowie
Download Presentation

Relevance of Thread Model to E mbedded and RT Systems

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. Relevance of Thread Model to Embedded and RT Systems Bina Ramamurthy bina@buffalo.edu Amrita-UB-MSES-2013-9

  2. Topics • Reference: https://computing.llnl.gov/tutorials/pthreads • Process space vs thread space • When to use threads? • Some examples in using threads: Pthread • We will explain it using code and demos Amrita-UB-MSES-2013-9

  3. Process vs thread Amrita-UB-MSES-2013-9

  4. When to use threads? “…a program to take advantage of Pthreads, it must be able to be organized into discrete, independent tasks which can execute concurrently. For example, if routine1 and routine2 can be interchanged, interleaved and/or overlapped in real time, they are candidates for threading.” Amrita-UB-MSES-2013-9

  5. Thread States Enter: thread created Ready: Allocated resources Run: CPU allocated Blocked: waiting for an event/IO resource Ready Exit Run Blocked/wait Amrita-UB-MSES-2013-9

  6. Sample programs Source 1: Simple program with multiple threads overlapping Source 2: MT_safe passing of arguments to threads What is MT_safe? Thread functions should be non-reentrant / non-self-modifying Source 3: thread join Source 4: Stack size Source 5: About mutual exclusion among parallel threads’ accessing shared resources Amrita-UB-MSES-2013-9

More Related