Concepts of Programming Languages
580 Chapter 13 Concurrency thread of control. Programs executed with physical concurrency can have multiple threads of control. ...
13.2 Introduction to Subprogram-Level Concurrency 581 Concurrency is now used in numerous everyday computing tasks. Web servers ...
582 Chapter 13 Concurrency some resource that cannot be simultaneously used. Specifically, if task A needs to access shared data ...
13.2 Introduction to Subprogram-Level Concurrency 583 One general method for providing mutually exclusive access (to support com ...
584 Chapter 13 Concurrency of this subsection. Tasks that are ready to run are stored in a queue that is often called the task r ...
13.2 Introduction to Subprogram-Level Concurrency 585 have been used for this choice, some based on specifiable priority levels. ...
586 Chapter 13 Concurrency Keep in mind that our discussion of concurrency is intentionally incom- plete, and only the most impo ...
13.3 Semaphores 587 positions and the number of filled positions in the buffer (to prevent buffer underflow and overflow). The c ...
588 Chapter 13 Concurrency The following are concise pseudocode descriptions of wait and release: wait(aSemaphore) if aSemaphore ...
13.3 Semaphores 589 FETCH(VALUE); release(emptyspots); { increase empty spaces } -- consume VALUE -- end loop end consumer; The ...
590 Chapter 13 Concurrency task consumer; loop wait(fullspots); { make sure it is not empty } wait(access); { wait for access } ...
13.4 Monitors 591 13.4 Monitors One solution to some of the problems of semaphores in a concurrent envi- ronment is to encapsula ...
592 Chapter 13 Concurrency the interface to the monitor is shown as the two boxes labeled insert and remove (for the insertion a ...
13.5 Message Passing 593 C# has a predefined class, Monitor, which is designed for implementing monitors. 13.5 Message Passing T ...
594 Chapter 13 Concurrency is waiting for a message at the time task B sends that message, the message can be transmitted. This ...
13.6 Ada Support for Concurrency 595 A task body must include some syntactic form of the entry points that correspond to the ent ...
596 Chapter 13 Concurrency A rendezvous can occur in two basic ways in this simple example. First, the receiver task, Task_Examp ...
13.6 Ada Support for Concurrency 597 know the name of the task from which it will accept messages. This asymmetry is in contrast ...
598 Chapter 13 Concurrency customers at a drive-up window. The following skeletal teller task illustrates a select construct: ta ...
13.6 Ada Support for Concurrency 599 13.6.2 Cooperation Synchronization Each accept clause can have a guard attached, in the for ...
«
26
27
28
29
30
31
32
33
34
35
»
Free download pdf