1 / 11

Outlines

University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Concurrent and Real Time programming Introduction. Outlines. Concurrency Real time systems. Concurrency.

Download Presentation

Outlines

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. University of PalestineFaculty of Applied Engineering and Urban PlanningSoftware Engineering DepartmentConcurrent and Real Time programmingIntroduction Instructore: Tasneem Darwish

  2. Outlines • Concurrency • Real time systems Instructore: Tasneem Darwish

  3. Concurrency • Concurrent programming is the name given to the notations that are used to express parallelism in an application program. • Concurrent programming also expresses the techniques for dealing with communication and synchronization between parallel entities. Instructore: Tasneem Darwish

  4. Concurrency • why to use concurrency? • To fully utilize the processor (the processor is so fast with respect to the I/O devices) • To allow more than one processor to solve a problem ( A sequential program can only be executed by one processor. A concurrent program is able to exploit parallelism and obtain faster execution). • To model parallelism in the real world (Real-time and embedded programs have to control and interface with real-world entities (robots, conveyor belts, etc.) that are inherently parallel). Instructore: Tasneem Darwish

  5. Concurrency • Concurrency problems: • Concurrent activities need to coordinate their actions. • the coordination can involve intricate patterns of communication and synchronization. • Not managing communication and synchronization very well can result in new error arising. Instructore: Tasneem Darwish

  6. Concurrency • Examples of problems in concurrent programs: • deadlock may occur where each concurrent activity is waiting for another to perform an operation • interference may occur when two or more concurrent activities attempt to update the same object; this can result in the object's data becoming corrupt; • starvation may happen where one or more concurrent activities are continually denied resources as a result of the actions of the others. Instructore: Tasneem Darwish

  7. Concurrency • The desired concurrent program • The desired behaviour of a concurrent program is safety and aliveness. • The safety property expresses the requirement for "nothing bad to happen“ (the concurrent activities do not interfere with each other and cause data corruption). • The aliveness property expresses the requirement that "something good will happen". (concurrent activities are able to make progress and do not suffer from deadlocks or starvation). Instructore: Tasneem Darwish

  8. Concurrency • How deadlocks happen? • There are four necessary conditions that must exist if deadlock is to occur. • Mutual exclusion (only one concurrent activity can use a resource at once) • Hold and Waite (there must exist concurrent activities that are holding resources while waiting for others resources to be acquired) • No pre-emption (resources acquired by a concurrent activity cannot be forcibly taken away from it by another activity.) • Circular wait (a circular chain of concurrent activities must exist) Instructore: Tasneem Darwish

  9. Real Time systems • real-time systems are systems that have to respond to externally generated input within a finite and specified time interval. • They are inherently concurrent because they are often embedded in a larger engineering system and have to model the parallelism that exists in the real-world objects that they are monitoring and controlling. • The RTSJ extends the Java concurrency model to allow it to interact with external events. Instructore: Tasneem Darwish

  10. Real Time systems • Some real-time systems characteristics: • Large and complex. • Extremely reliable and safe. • Interaction with hardware interfaces. Instructore: Tasneem Darwish

  11. Real Time systems • Hard and soft real time systems: • Hard real-time systems are those where it is absolutely important that responses occur within the specified deadline. • Soft real-time systems are those where response times are important, but the system will still function correctly if deadlines are missed. • In interactive systems there are no explicit deadlines. Instructore: Tasneem Darwish

More Related