The Structure of the “THE” -Multiprogramming System Edsger W. Dijkstra Jimmy Pierce.

24
The Structure of the “THE”-Multiprogramming System Edsger W. Dijkstra Jimmy Pierce
  • date post

    21-Dec-2015
  • Category

    Documents

  • view

    219
  • download

    2

Transcript of The Structure of the “THE” -Multiprogramming System Edsger W. Dijkstra Jimmy Pierce.

Page 1: The Structure of the “THE” -Multiprogramming System Edsger W. Dijkstra Jimmy Pierce.

The Structure of the “THE”-Multiprogramming System

Edsger W. Dijkstra

Jimmy Pierce

Page 2: The Structure of the “THE” -Multiprogramming System Edsger W. Dijkstra Jimmy Pierce.

Progress Report on the multiprogramming effort at the Departmentof Mathematics at the Technological University in Eindhoven.

(1968)

EL X8 Modern2.5 μsMemory Cycle Time

Address Size

Memory Size

27 bits

32K

5 - 70 ns

64 bit

1 - 2 GB

Page 3: The Structure of the “THE” -Multiprogramming System Edsger W. Dijkstra Jimmy Pierce.

Goals

• Reduction in turn around time for programs of short duration

• Economic use of peripherals

• Automatic control of backing store with economic use of central processor

• Economic feasibility to use machine for programs which only need flexibility of the processor and not the capacity or power of it

• NOT multi access system

• Testable

Page 4: The Structure of the “THE” -Multiprogramming System Edsger W. Dijkstra Jimmy Pierce.

Guiding Principles

• Select project as ambition as justifiably possible

• Select a machine with sound basic characteristics

• Experience does not lead to wisdom and understanding

Don’t over incorporate features that only add work

Don’t depend on specific properties of a machine

Make an effort to learn as much as possible from past experiences

Page 5: The Structure of the “THE” -Multiprogramming System Edsger W. Dijkstra Jimmy Pierce.

Layered Operating System

Page 6: The Structure of the “THE” -Multiprogramming System Edsger W. Dijkstra Jimmy Pierce.

Layered Operating System

Bottom layers provide abstraction of resources

Top layers access lower levels for resources

Access always proceeds from top down

Page 7: The Structure of the “THE” -Multiprogramming System Edsger W. Dijkstra Jimmy Pierce.

Testing

Done in stages

Bottom layer thoroughly tested before implementing layerabove

Allows full system testing in manageable time

5 + 5 + 5 + 5 + 5 + 5 vs. 5 * 5 * 5 * 5 * 5 * 5

“… testing had not yet been completed, but the resulting system isguaranteed to be flawless.”

Page 8: The Structure of the “THE” -Multiprogramming System Edsger W. Dijkstra Jimmy Pierce.

Contains:Processor Allocation

Real-time Clock Interrupt

Provides:Processor Abstraction

Each process appears to have own processor

Level 0

Page 9: The Structure of the “THE” -Multiprogramming System Edsger W. Dijkstra Jimmy Pierce.

Processor Allocation

Only unidirectional passing of time through various programstates has meaning, not amount of time

Delaying of process execution will have no harmful effectsto the internal logic of the process

Thus numerous processes can be executing independentlyof number of actual processors, as long as processors canswitch to the various processes

Semaphores used to regulate cooperation between processes

Page 10: The Structure of the “THE” -Multiprogramming System Edsger W. Dijkstra Jimmy Pierce.

Semaphores

Integer variable initialized to 1 or 0

P decrements variable and places process on a waiting list if new value is negative

Works since delaying a process has no ill effects

Two atomic methods, P and V

V increments variable and removes a process from waiting list ifnew value is non-positive

Page 11: The Structure of the “THE” -Multiprogramming System Edsger W. Dijkstra Jimmy Pierce.

Mutual Exclusion

Protection of critical sections

Mutex is globally accessible

mutex = 1;

P(mutex); critical sectionV(mutex);

Page 12: The Structure of the “THE” -Multiprogramming System Edsger W. Dijkstra Jimmy Pierce.

Private Semaphores

Used to block process while configuring environment( creation of reader-writer buffer )

mutex = 1;privateSemaphore = 0;

P(mutex); modify global state variables V(privateSemaphore);V(mutex);

P(privateSemaphore);

Private semaphore can be released globally but only lockedprivately

Page 13: The Structure of the “THE” -Multiprogramming System Edsger W. Dijkstra Jimmy Pierce.

Contains:Segment Controller

Provides:Memory Abstraction

Each process has a segment of memory to use

Level 1

Page 14: The Structure of the “THE” -Multiprogramming System Edsger W. Dijkstra Jimmy Pierce.

Memory Allocation

Unique identifiers for each segment of memory

Detaches memory from core or drum identifier

Memory can be located in any page at core or drum

Segment identifier in core indicating segment is (non)emptyand page address

Memory swapped out of core does not have to return to samedrum page from which it originated

Page 15: The Structure of the “THE” -Multiprogramming System Edsger W. Dijkstra Jimmy Pierce.

Contains:Message Interpreter

Provides:Device Abstraction

Each process has own individualdevice handle

Level 2

Page 16: The Structure of the “THE” -Multiprogramming System Edsger W. Dijkstra Jimmy Pierce.

Message Interpreter

All processes share console using mutual synchronization

Process sends message to console with an identification header

Handles interaction between processes and the user

Operator must identify which process to communicate with

Memory segments contain vocabulary for messages

Page 17: The Structure of the “THE” -Multiprogramming System Edsger W. Dijkstra Jimmy Pierce.

Contains:Communication Units

Provides:Logical Communication Units

Buffering is handled automaticallyvia communication channels

Level 3

Page 18: The Structure of the “THE” -Multiprogramming System Edsger W. Dijkstra Jimmy Pierce.

Communication Buffering

Mutual exclusion needed to allocate peripherals to processes

Processes must be able to communicate with operator( hardware failure, anomalous conditions )

Peripherals wrapped by buffers and abstracted to logicalcommunication units

Page 19: The Structure of the “THE” -Multiprogramming System Edsger W. Dijkstra Jimmy Pierce.

Contains:Independent User Programs

Provides:Independent user code

to be executed “simultaneously”

Level 4

Page 20: The Structure of the “THE” -Multiprogramming System Edsger W. Dijkstra Jimmy Pierce.

Contains:The Operator

Sold Separately

Level 5

Page 21: The Structure of the “THE” -Multiprogramming System Edsger W. Dijkstra Jimmy Pierce.

Proving Harmonious Cooperation

Processes at rest are at homing positions

When process accepts task, it leaves homing position

Upon return from task, process returns to homing position

Facts:

Page 22: The Structure of the “THE” -Multiprogramming System Edsger W. Dijkstra Jimmy Pierce.

Processes performing a task will only generate a finitenumber of tasks for other processes

Processes can only generate tasks at a lower level

Thus cannot have circular process calls

Attention must be paid to ensure process requesting segment from segment controller remains in core when call returns

Page 23: The Structure of the “THE” -Multiprogramming System Edsger W. Dijkstra Jimmy Pierce.

It is impossible that all processes have returned to homingpositions while there is still a generated, pending,

unaccepted task

Calls leave homing positions when tasks are accepted

Calls to lower levels cause higher levels to block until call returns

Calls return to homing positions when tasks are completed

Page 24: The Structure of the “THE” -Multiprogramming System Edsger W. Dijkstra Jimmy Pierce.

Each process will eventually return to homing positionafter accepting a task

Calls cannot generate an infinite number of child procedures

Any blocked calls are due to lower process performing work onthe higher level’s behalf

Unidirectional flow through layers prevents circular waits ( A waiting on B waiting on C waiting on A )