Solution—Load Part and Keep Remainder on Disk

Load on Demand

The OS loader should be designed to load only the portions of the OS:

  • that are necessary to initiate application programs;

  • that are used very frequently and must always reside in memory in order to yield good performance.

The remainder of the OS should be kept on disk until it is required.

Likewise, the OS application program loader should be designed to load only enough of an application program into memory to get it started. Additional portions of the application program should only be read into memory upon demand.

Track Usage

After a portion of the OS or an application program has been loaded into memory, the OS should track how long it has been since the information was last used. If it hasn't been used for quite a while, the OS should eliminate it from memory. In the event that some of the information has been updated since it was read from disk, the OS should swap it back to disk before eliminating it from memory.

Capabilities Required

In order to implement the capabilities just discussed, the OS must have the following capabilities:

  • Whenever an instruction (or the instruction prefetcher) initiates a memory code or data access, the processor must in some manner quickly determine if the target information is already in memory (and, if so, where). If it isn't in memory, the processor must be able to quickly determine the mass storage address of the required information so it can load it into memory to be accessed by the current program.

  • The processor must have some way of determining if the block of information has been accessed since it was placed in memory, and, if so, was it changed (i.e., written to).

  • Although not mentioned in the preceding discussion, it would also be nice if the processor could determine:

    - if the currently executing program is permitted access to the information (i.e., it has sufficient privilege).

    - if the currently executing program is permitted to write to the targeted area.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.14.240.178