Download presentation
Presentation is loading. Please wait.
1
Multics
2
MULTiplexed Information and Computing Service
Multics is a timesharing OS begun in 1965 and used until 2000. Primary usage was with a mainframe and multiple terminals. CPUs, memory, I/O controllers, disk drives could be added or removed while the system is running
3
MULTiplexed Information and Computing Service
Designed to run 24/7 Changed the idea of the computer from being a tool for scientists to a reliable and powerful resource for a large number of people
4
Brief History Joint project between MIT, Bell Labs, and GE
Bell labs withdrew in 1969 GE Sold its computer business to Honeywell in who sold Multics as a commercial product
5
Long History
6
Features High-level language implementation On-line reconfiguration
Large virtual memory with segments, paging, and generalized addresses First hierarchical file system Dynamic linking and function call by name Shared memory multiprocessor Security and rings
7
Language Implementation
Written in PL/I language In 1965 this was a new proposal by IBM Only a small part of the OS was written in assembly Writing an OS in a high-level language was a radical idea at the time
8
PL/1 Language: Bubble Sort
9
Objectives Designed to serve a large community of users with diverse interests, principally from remote terminates: User programs should become independent of the various storage devices in the system. Uses a virtual memory OS is responsible for management of physical storage. Allow a program to use a procedure knowing only its name (dynamic linking). Permit sharing of procedures and data subject only to authorization.
10
“Process:” “- the activity of a processor in carrying out the computation specified by a program” In Multics processes stand in a one-to-one correspondence with virtual memories. Each process runs in its own address space. Traffic controller (process scheduler) module of the supervisor (OS) chooses which/when process to run.
11
Virtual Memory 214 segments Each with as many as 218 36 bit words.
214 * 218 * 36 bits = 232 * 36 bits = bits = 18 GB Quite large address space. Designed to avoid proceduer overlays or movement of data within the address space.
12
Segments Each segment is independent having a length, permissions, and may grow or shrink. Two types of segments: Procedure (Instructions) Data (source program files, other files on the system, etc.) Cannot write to a procedure segment. Pure – a segment that can not modify itself. Instruction fetches from data are invalid.
13
File system The file system is intricately linked to the Process address space. No difference between a process procedure segment and a file segment. First OS to use a hierarchical arrangement of directories.
14
Generalized Addressing
A segment # and word # form the virtual addresses. Supervisor places the word in main memory when required. Program doesn’t need to know where the word is on secondary storage. It is location-independent.
15
HW Addressing Procedure base register contains the segment number of the procedure currently being executed. Four other base/limit registers hold complete segment #/word# generalized addresses: AP: Argument pointer BP: Base Pointer LP: Linkage Pointer SP: Stack Pointer. PC: Program counter is advanced by 1 each instruction
16
Instruction Format Address of next instruction is Segment # from Procedure base register + word # in the program counter. For data addresses, if the external flag is true, the segment tag indicates one of the base/limit pointers. The address field is added to that register to compute the generalized address. If the external flag is false, the address is combined with the address
17
Creation of Data-Access Generalized Address
PCB = False Segment # Word # = True External Flag + Segment # Word # Base Register + Index reg. Segment Address Operation Mode Tag Instruction Format
18
Indirect Accessing Addressing mode may indicate indirect addressing.
In this case the generalized address for a data reference is used to fetch a pair of 36-bit words. If the address mode of the first word is ITS “indirect-to-segment” the segment number and word number fields are combined to produce a new generalized address. This address is augmented by indexing according to the mode of the second word pair (which may lead to further indirect addressing).
19
Descriptor Segment How to convert generalized address (segment # / word #) to main memory location? A two-step hardware table look-up procedure: The segment number is used as an index into an array called the descriptor segment. The descriptor segment contains a descriptor for each segment that a process may reference. Points to where in memory the segment is and what protection mode the process has for this segment. Second step is just combining word number with segment location to find the actual segment. The descriptor base register is used to locate the descriptor segment of the process in execution. Switching a process now involves updating registers and the descriptor segment. Segment #’s are process-dependent (even when being shared).
20
Paging Segments may become large enough to use paging.
Mapping generalized addresses to main memory location is done by OS and transparent to the user. Page Tables in main memory, provide means of trapping if page is not present. Small associative memory is built into each processor so that most references to page tables/descriptor segments may be by-passed.
21
Linking How to share procedure and data code amongst different processes (this is pre-threads). Allows more efficient usage of main memory (if there is a common library that each process needs a copy of, we have k copies of it. Instead since the procedure’s don’t change we can just keep 1 copy of it. Sharing of data is potentially more complex.
22
Procedure Segments Procedure Segments must be pure:
We cannot allow their execution to affect their contents. It must be possible for a process to call a routine by its symbolic name without having made prior arrangements for its use. I.e. without having to know where exactly in main memory or disk the procedure is located. Each linked-procedure may in-turn link its own set of libraries (and so-on). Segments of procedure must be invariant to the recompilation of other segments. The values of identifiers that denote addresses within a segment which may change with recompilation must not appear in the content of any other segment
23
Making a Segment Known Initially there is no position in the processes segment table for the specified procedure. A new record must be installed to the segment. Each segment is known by symbolic path (i.e. where it exists on disk). This must not change or the program will fail. Segment numbers are applied by the processes and as such are not a segment concept. In assembly, the op-codes use symbolic references to data that will be translated later.
24
OPR <D> [x] Since the value of a variable ‘x’ may change between compilations of the target segment, the process needs to use the symbolic name for data variables. How can we make the transition from symbolic reference to generalized addressing without altering the content of segment P? The update must occur on every reference to that memory location. Link data is the information that is altered value. The collection of link data for all external references originating in segment P is called the linkage section of procedure P. (L)
25
Linking To implement reference to D|x from within segment P will require two references by generalized address: One to access the pertinent link data in L And one to fetch the word addressed in segment D. Realization of this minimum number of references implies use of the indirect addressing feature of the processor. T
26
Linking II Before the link is established, an attempt by a process of computation a to reference D|x through the link must lead to a trap. The segment number and word number fields of the indirect word can then be used to inform supervisory routines of the place to look to find the symbolic address (D}l[x] associated with the link. This address must be translated into a generalized address to establish the link. The operation of changing the link data to establish a link is called linking.
27
Establishing the Link Two look-up operations are required on the part of supervisory routines to establish the link. The symbolic reference name D must be associated with a specific segment through a search in the directory structure, and this segment must be made known to the process if a segment number has not already been assigned. The set of associations between symbolic word names and word numbers for a segment is its symbol table and is part of the segment
28
Linkage Pointer The linkage pointer is a generalized address that resides in a dedicated base register (designated lp). It is the origin L#|s of the portion of a linkage segment that contains the links for intersegment references made from the segment being executed. References to external segments are coded relative to the link pointer.
29
Procedure Call and Return
The coding used to transfer control to a sub-procedure and the subsequent return of control must meet the requirements of programming generality: Transmission of arguments. Arranging for return of control. Saving and restoring processor state. Allocating private storage for the called procedure. This private storage is supplied by associating the stack segment with each process in which a frame of private storage is reserved at each procedure call.
30
Function Calling The frame is released upon return of control.
This mechanism is implemented by the stack pointer (designated sp) which is the generalized address of the stack frame origin for the procedure in operation. The use of the stack segment makes every procedure in MULT[CS automatically recursive by associating separate stack frames with successive entries into the same procedure. Arguments must be placed in the stack segment.
31
Procedure Linkages The method of dynamic linking just described introduces one new problem: When process a, in executing procedure P, transfers control to procedure Q, the value of linkage pointer must be changed to the generalized address of the linkage section for procedure Q. Since the new value of the linkage pointer contains a segment number, it is private data of process a and cannot be placed in segment P or Q. For each external entry point within a procedure segment, two additional instructions are placed in the procedure's linkage section at compilation time. The first instruction loads the linkage pointer with the appropriate value at procedure entry, The instruction transfers control to the entry point in the called procedure segment. second
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.