Consider the option of lazy map update. In this case, when a page is moved from disk to main memory, only the map of the process that actually caused the page-fault is updated. Other processes may have map entries that still point to the page on disk. This is particularly beneficial if some map pages containg references to the same page aren't in main memory. When a system employs lazy map update, it is possible that reference to some page will cause a page fault trap even though that page is in main memory.
By comparison prompt map update requires that all map entries that reference a particular page to be updated immediately when that page is moved.
Part A: As defined here, lazy map update applies only when pages are moved from disk to main memory. Why can't lazy update be used when pages are moved from main memory to disk?
Part B: Outline the operation of a page-fault handler that employs lazy map update when pages are brought from disk to main memory while still ensuring that shared pages are correctly implemented from the user's viewpoint. Focus on bringing new pages into memory and on the differences between this modified handler and a handler which does prompt update.
Recall that a binary semaphore is one where the counter may never take on values other than zero or one. When a binary semaphore is used for mutual exclusion, a critical section is entered with P(sem) and exited with V(sem).
Part A: What information is missing from the implementation of semaphores suggested above that would be needed to detect deadlocks in a resource centered system that used binary semaphores for mutual exclusion.
Part B: Assuming that the missing information you identified in part A is added to the semaphore and process data structures, what deadlock detection algorithm is applicable, when should the algorithm be initiated, and what would you suggest it do when it detects a deadlock?
Part A: What protection model does this system implement? For the purpose of this part, focus only on processes and the pages they currently share, and pay no attention to how pages come to be shared.
Part B: Does the complete system implement some specific protection model? Please take into account the file directory structure, the rights to open files, and the rights to access pages of files already opened. If yes, what model and why? If no, why not?
Part A: Outline, in graph theoretic terms, the structure of a deadlock detection algorithm applicable to this system.
Part B: Suppose that the complete set of database records needed for a transaction can be determined before any of them are locked. There is a simple deadlock avoidance algorithm that applies in this case. Explain it.