13.07.2015 Views

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Paging 91internal waste.) The load image is then marked so that the loader can identify and properlyrestrict access to each region.One clever idea, found in VMS and Dynix, is for the linker to put nothing in thefirst page of virtual store. This page is then marked invalid by the storage manager. Ifthe process accidentally tries to follow a null or uninitialized pointer, there is a goodchance that it will generate an access into that first page. which will cause a trap.6.3 Case study: MulticsMultics is an operating system designed for the Honeywell 645 computer. It wasdeveloped at M.I.T. in cooperation with Bell Labs and the computer department of GeneralElectric. Since its design around 1965, it has been in use at M.I.T. and elsewhere,and a version of it is now marketed by the Honeywell Corporation.Multics combines paging and segmentation. This structure is a natural consequenceof two design goals. First, the designers wanted to allow processes to refer toenormous numbers of segments. They allocated 18 bits of each address to the segmentname. The segment table can therefore be much too long to maintain in main store, so itmust be paged. Second, they wanted to allow individual segments to be quite large.They allocated the other 18 bits of each address to the offset within the segment. Mainstore could hold only a few segments of full size. Therefore, segments are themselvespaged. Of the 18 bits showing offset in a segment, 8 indicate the page and the other 10the offset within the page. A virtual space therefore has up to 2 18 = 256K segments, eachsegment has up to 2 8 = 256 pages, and each page has 2 10 = 1K words. (Actually, pagesof 64 words are available, but we will ignore them.) The total virtual space is describedby 36 bits, representing 64G words. The top 18 bits, [0..17], represent the segmentnumber. The next 8 bits, [18..25], represent the page number, and the lowest 10 bits,[26..35], represent the offset within the segment.Each process has its own segment table. This table is placed in a segment of itsown (the ‘‘descriptor segment’’) that is usually not in the virtual space of the process.Each entry in the segment table has the following information.a pointer to the page table for this segmentthe length of the segment (in pages)permissions for the segment (read, write, execute, use as stack)a Boolean Present field (if false, the entire segment, and possibly its page table, isswapped out)The segment table is found by the hardware through a register that looks just like one ofthe segment table entries. This register, called the DBR for ‘‘descriptor base register,’’holds a segment table entry for the segment table. The 36-bit program counter is storedin another register.Each segment, including the descriptor segment, is described by a page table. Thepage table holds one entry for each page in the segment, storing the following information.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!