150 likes | 295 Views
The Structure of the "THE"- Multiprogramming. Edsger W. Dijkstra Technological University, Eindhoven, The Netherlands System Andrew Edwards. Goal. A reduction of turn-around time for programs of short duration Economic use of peripheral devices
E N D
The Structure of the "THE"-Multiprogramming Edsger W. Dijkstra Technological University, Eindhoven, The NetherlandsSystem Andrew Edwards
Goal • A reduction of turn-around time for programs of short duration • Economic use of peripheral devices • Automatic Control of backing store to be combined with economic use of the central processor • The economic feasibility to use the machine for those applications for which only the flexibility of a general purpose computer is needed, but (as a rule) not the capacity nor the processing power.
Terminology • “Pages”, “core pages”, and “drum pages” • “Segments” • Identification method which allows lookup of segments to be added to core • “Segment Variable”
Processor Allocation • Treat both input and output peripherals as though they had their own sequential streams • Whole system is based on concept of “sequential processes”
Design • Implemented bottom up • Designed so that testing would require the fewest test cases in each transition
Semaphores • Special purpose variables for keeping track of mutual exclusion • After initialization can only be decremented (lock is now held) or incremented (lock released) • Negative numbers cause processes to be put on a waiting list
Semaphores 2 • COROLLARY 1. If a semaphore value is nonpositive its absolute value equals the number of processes booked on its waiting list. • COROLLARY 2. The P-operation represents the potential delay, the complementary V-operation represents the removal of a barrier.
Semaphores 3 • P and V operations are indivisible and are always done sequentially • If a V operation is done it does not matter which process is removed from the waiting list • Processes can only become blocked from trying to access a semaphore which is non positive
Mutual Exclusion • Allows only one process to be in a critical section at a time. • Critical sections are used always for the inspection and modification of state variables
Mutual Exclusion Example begin semaphore mutex; mutex := 1; parbegin begin L1 : P (mutex ) ; critical section 1; V(mutex); remainder of cycle 1; go to L1 end; begin L2: P (mutex); critical section 2; V (mutex); remainder of cycle 2; go to L2 end Paraeud end
Private Semaphores • Semaphore associated with an individual process • Used as a state tracker to check if the process should be allowed to continue or be stopped temporarily
Private Semaphores 2 P(mutex) ; "inspection and modification of state variables including a conditional V(private semaphore)"; V (mutex) ; P(private semaphore).
Harmonious Cooperation • “Homing position” when all processes are at rest • Initial tasks can only spawn a finite amount of tasks • Due to processes only being able to call lower processes • All processes cannot be in the homing position if there is an unaccepted task. • After the acceptance of an initial task all processes will reach the state of the “homing position”
References • "The Structure of the "THE" Multiprogramming System" by E. W. Dijkstra, Communications of the ACM, 11(5):341--346, 1968.