1 / 6

Concurrent and Distributed Systems

Concurrent and Distributed Systems. Introduction to CET306 Harry R. Erwin, PhD University of Sunderland. Texts.

jamil
Télécharger la présentation

Concurrent and Distributed 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. Concurrent and Distributed Systems Introduction to CET306 Harry R. Erwin, PhD University of Sunderland

  2. Texts • Clay Breshears (2009) The Art of Concurrency: A Thread Monkey's Guide to Writing Parallel Applications, O'Reilly Media, Pages: 304. This is available on www.amazon.co.uk as a paperback and more cheaply as a Kindle edition. You don't need a Kindle to read a Kindle edition. • Mordechai Ben-Ari (2006) Principles of Concurrent and Distributed Programming, Addison-Wesley. Also available on www.amazon.co.uk This is available as a paperback only. Covers the theory in depthand will be used as a supplementary text.

  3. Basic Definitions • Concurrent Program—a set of sequential programs that can be executed in parallel (Ben-Ari). This should be thought of as abstract parallelism. • A Process is one of the sequential programs. • A Thread is a programming construct corresponding to a Process. • Distributed Program—a concurrent program that runs on separate computers and uses separate memory for each process. • Parallel Program—a concurrent program that runs on separate processors, but shares memory or data among processes.

  4. More Definitions • Multitasking—when the execution of programs overlap on a single computer or CPU. This is a central function of the kernel of a modern operating system. • Multithreading—when a program contains multiple threads or processes on a single computer or CPU. • Task—another term for a schedulable entity or process. Tasks are commonly used in real-time systems to represent individual units of work. • Multitasking or multithreading systems often interleave instructions on a CPU. This makes analysis of their correctness quite difficult.

  5. Example of Interleaving • There are six ways these processes can inter-leave: • p1; p2; q1; q2; • p1; q1; p2; q2; • p1; q1; q2; p2; • q1; q2; p1; p2; • q1; p1; q2; p2; • q1; p1; p2; q2; • Your concurrent pro-gram MUST run cor-rectly in all six cases. • Consider a concurrent program with two processes: Process 1: {p1; p2;} Process 2: {q1; q2;} • Where pn; and qn; are atomic operations.

  6. Why is Concurrent Programming Hard? • Concurrent and distributed programs cannot be ‘hacked together’. Formal methods must be used to design them. • You must synchronise the execution of processes, and their communication. This has to be thought through carefully. • Illustration: In 1972-1979, TRW successfully built a high performance multi-tasking system for an important defence application. The application programmers on the project, including many of the world’s best at the time, were not trusted to implement concurrency correctly. The concurrency abstractions were allocated to the real-time operating system. We developed a ‘process design’ around those abstractions and an automated operating system test program to verify the correct implementation of the concurrency abstractions.

More Related