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.

Exercises 1194. A process generally has no inkling when a segment fault occurs. Describe how aprocess could use a TimeOfDay service call to guess that such a fault has occurred.5. If we allow a process to have anywhere from zero segments to the maximumnumber of segments allowed by the hardware, it takes one more bit to represent thenumber of segments in use than to represent any particular segment. Why? Whatimplementation difficulty does that create? What can be done about it?6. There is a similar problem for segment sizes. What is the problem?7. What is the relation between the size of physical store and virtual store under segmentation?8. Suppose we wish to implement paging and want to use the load-image file as backingstore for instructions and read-only data as a way to save space on the backingdrum. What information must be stored in the load-image file? What constraintsshould we place on that file?9. How long is a process page table on the VAX?10. On the VAX, a process may access kernel space. What prevents a process fromgenerating nuisance missing-page faults by trying to read regions in the kernel?11. If a process releases the instructions segment in which it is currently executing,describe in detail the actions taken by the kernel that lead inexorably to catastrophe.How should the kernel treat the disaster?12. Should the address translation table be in the virtual space of the associated process?Consider the ramifications of making the opposite decision.13. Write a program to generate page-reference strings by using the followingapproach, which was used to generate Figure 3.21. All n pages of virtual store arelisted in order. Use the exponential distribution with mean √ n to pick a numberbetween 1 and n . The page at that point in the list is the next page in the referencestring. Move that page to the start of the list, and repeat the algorithm. (Elementsnear the front of the list were referenced recently; those near the end have not beenreferenced for a long time.)14. What properties of true page-reference strings are not exhibited by the ones generatedby the program of exercise 13?15. Use the program from exercise 13 to generate a graph like the one in Figure 3.21.16. Design a combination of the NUR and second-chance cyclic page-replacement policies.17. Given the reference string 4 52143543215,draw the cold-start fault-rategraphs for main store ranging between 1 and 7 pages, using Min, FIFO, LRU, andtwo forms of NUR, the ordinary one (resetting Used to false in each page tableentry that the scan passes) and a variant (resetting Used to false everywhere in thepage table when all the Used fields are true).18. If a machine offers several states, each with its own register set, why not use differentstates for different processes to reduce the process switch cost?

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

Saved successfully!

Ooh no, something went wrong!