13.07.2015 Views

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Fixed partitions 65does to Load.ReleaseStore(descriptor). This call deallocates space. The descriptor must indicateboth where the space starts and how long it is. It may be impossible to releasespace that is not at the end of virtual store. After this call, accesses to the releasedspace are treated as errors.Terminate(exit code). This call causes the process to terminate, releasing all itsvirtual space. The storage manager may reclaim backing store for all parts of thespace that are not being shared. Other resource managers may also reclaimresources from the terminating process. The exit code is used to communicatestatus back to the parent of the process, which might be waiting for this child tocomplete.The rest of this chapter is organized according to the type of address translation thehardware supports. This organization will provide some feeling for the history of spacemanagement because the simpler methods that we will start with were developed first.These early methods are important not only from a historical perspective but also becausethey serve to develop some of the ideas that will appear in even the most sophisticatedhardware. The part of the kernel this chapter discusses is called the storage managerbecause it makes policy decisions with regard to space.2 FIXED PARTITIONSAll forms of space management require hardware support. The fixed-partition methodwas standard in OS/360, where it is called MFT (for ‘‘multiprogramming with a fixednumber of tasks’’ or MVT for ‘‘multiprogramming with a variable number of tasks.’’This operating system was designed for early IBM 360 models, which provided thenecessary hardware. All physical store is divided by the operating system into a set ofcontiguous regions called partitions. Only one process can be executed at a time in eachpartition, and the virtual space of each process is just the single partition in which it executes.Figure 3.3 shows processes A and B placed in partitions. The first partition, oflength 20K, is reserved for the kernel. The next partition starts at location 20K and is16K long. Process A fits there with 3K wasted at the end. Process B is in the next partition,which starts at 36K and is also 16K long. It wastes 6K of this partition. The lastpartition starts at 52K and is 12K long; it is currently unoccupied.Under the partition method, virtual addresses are identical to the physicaladdresses. Address translation is therefore easy; there is no need for a translation table.However, the process must know where in physical store it has been placed because itmust know how to address its own data and instructions. We say that it must be boundto its virtual addresses, that is, its virtual references must be turned into physical references.Binding is performed in two ways. At loading time, when the process is broughtinto main store for the first time, all virtual addresses are bound to physical addresses bythe position where the process is placed in physical store. At execution time, when theprogram is running, it can execute an instruction that places the current value of the

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

Saved successfully!

Ooh no, something went wrong!