ch3 - Chapter 3 Concurrent Execution Concurrency:...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
Concurrency: concurrent execution 1 ©Magee/Kramer 2 nd Edition Chapter 3 Concurrent Execution
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Concurrency: concurrent execution 2 ©Magee/Kramer 2 nd Edition Concurrent execution Concepts : processes - concurrent execution and interleaving. process interaction. Models : parallel composition of asynchronous processes - interleaving interaction - shared actions process labeling, and action relabeling and hiding structure diagrams Practice : Multithreaded Java programs
Background image of page 2
Concurrency: concurrent execution 3 ©Magee/Kramer 2 nd Edition Definitions Concurrency Logically simultaneous processing. Does not imply multiple processing elements (PEs). Requires interleaved execution on a single PE. Parallelism Physically simultaneous processing. Involves multiple PEs and/or independent device operations. Both concurrency and parallelism require controlled access to shared resources . We use the terms parallel and concurrent interchangeably and generally do not distinguish between real and pseudo-concurrent execution. A Time B C
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Concurrency: concurrent execution 4 ©Magee/Kramer 2 nd Edition 3.1 Modeling Concurrency How should we model process execution speed? arbitrary speed (we abstract away time) How do we model concurrency? arbitrary relative order of actions from different processes ( interleaving but preservation of each process order ) What is the result? provides a general model independent of scheduling ( asynchronous model of execution)
Background image of page 4
Concurrency: concurrent execution 5 ©Magee/Kramer 2 nd Edition parallel composition - action interleaving think talk scratch think scratch talk scratch think talk Possible traces as a result of action interleaving. If P and Q are processes then (P||Q) represents the concurrent execution of P and Q. The operator || is the parallel composition operator. ITCH = (scratch->STOP). CONVERSE = (think->talk->STOP). ||CONVERSE_ITCH = (ITCH || CONVERSE). Disjoint alphabets
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Concurrency: concurrent execution 6 ©Magee/Kramer 2 nd Edition parallel composition - action interleaving (0,0) (0,1) (0,2) (1,2) (1,1) (1,0) from CONVERSE from ITCH 2 states 3 states 2 x 3 states ITCH scratch 0 1 CONVERSE think talk 0 1 2 CONVERSE_ITCH think talk talk think 0 1 2 3 4 5
Background image of page 6
Concurrency: concurrent execution 7 ©Magee/Kramer 2 nd Edition parallel composition - algebraic laws Commutative: (P||Q) = (Q||P) Associative: (P||(Q||R)) = ((P||Q)||R) = (P||Q||R). Clock radio example: CLOCK = (tick->CLOCK). RADIO = (on->off->RADIO). ||CLOCK_RADIO = (CLOCK || RADIO). LTS? Traces? Number of states?
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Concurrency: concurrent execution 8 ©Magee/Kramer 2 nd Edition modeling interaction - shared actions MAKER = (make-> ready- >MAKER). USER = ( ready- >use->USER).
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/08/2012 for the course CSC 6232 taught by Professor Rotenstreich during the Fall '11 term at GWU.

Page1 / 30

ch3 - Chapter 3 Concurrent Execution Concurrency:...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online