Skip to main content

1988 | OriginalPaper | Buchkapitel

Device Handling, Concurrency, and Interrupts

verfasst von : Professor Niklaus Wirth

Erschienen in: Programming in Modula-2

Verlag: Springer Berlin Heidelberg

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

In the last chapter we have discussed systems with several processes and how to simulate concurrent processes by time-sharing a single processor. Now we consider the inverse situation, where several processors participate in the execution of a single process. For the sake of simplicity, let us look at a cyclic process consisting of a producing and a consuming part. Let the process be formulated as $$ LOOPproduce(x);consume(x)END $$Now assume that each part can be executed by a specific processor only. We recognize that at any time only one of the two processors can be active. Hence they need to be synchronized, which is easily accomplished by the introduction of a synchronization variable s with the meaning of, say, “the consumer is active” (and with initial value FALSE). Each of the two sequential processors is now describable by its own program, which is again cyclic.

Metadaten
Titel
Device Handling, Concurrency, and Interrupts
verfasst von
Professor Niklaus Wirth
Copyright-Jahr
1988
Verlag
Springer Berlin Heidelberg
DOI
https://doi.org/10.1007/978-3-642-83565-0_31