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.

66 Space Management Chapter 320K33K36K46Kprocess Aprocess B020 36 5264Kkernelprocess Aprocess Bphysical main storekernel019KFigure 3.3 Partition methodprogram counter in a register, from which it can derive the virtual position of the rest ofthe program. This technique is known as ‘‘establishing addressability.’’ It is usually performedonce at the start of execution. After that time, all address binding is fixed.Under MFT, partition boundaries are established independently of individualprocesses. They may be changed through manual intervention by the operator. Forexample, some installations provide many partitions of various sizes during the day butprovide only a few very large ones at night. Processes that need a very large partition areblocked (by the long-term scheduler) until an adequately large partition is created. UnderMVT, the operating system automatically changes the number and size of partitions inresponse to the requirements of new jobs.As our example shows, some spare room often appears at the end of a partition.We call such spare room internal waste because it is space inside the virtual store that isnot used. However, the process might use some of the spare room for dynamically growingdata structures. For example, compilers build tables that may grow very large. Someprograms can be compiled in smaller partitions, whereas others will need larger partitions.Once it has begun to run within a partition, a program can never expand beyondthe limits of that single partition.A process is either entirely in main store or entirely in backing store. There is nopoint swapping out part of a process, because the entire partition must be freed before itis safe to place another process in it. Many implementations do not swap a process out atall but allow it to execute until completion. If a process is swapped out, it must later beswapped back into the same partition that it was in before, because it has already beenbound there. The process is unable to re-establish addressability because it does not realizeit has been swapped out. In addition, it may have stored virtual addresses of importantobjects like data items or procedures within registers or data structures. It would becumbersome to find all the places in which addresses have been stored in order to rebindthem.

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

Saved successfully!

Ooh no, something went wrong!