DOC PREVIEW
Duke CPS 210 - Qualifying Exam

This preview shows page 1-2-3 out of 9 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CPS 210 Qualifying ExamSpring 2010Answer all questions. For implementation problems, any kind of pseudocode is fine, as long as its meaning isclear. You may assume common primitives such as hash tables and linked lists: you do not need to implementthem.Five ShortsQ1. Answer the following questions in the space provided: 1-3 sentences or fragments each. Substantive answers receive full credit: the details are not important.(a) Data cached at multiple clients can become stale if it is updated. Many distributed systems have taken a position that stale data is acceptable if it is not stale for "too long" (e.g., the Web, DNS, and early NFS). Outline a technique to bound staleness in such systems.(b) Why does your Web browser have the public keys of certain corporations “baked in”, i.e., contained within the browser program?(c) Modern processors provide some means for software to execute a read-modify-write of a memory location with an assurance that no other processor (core) completed an intervening write to that location. Give an example, and say what this feature is used for and why it is necessary.(d) Is it important what replacement/eviction algorithm a TLB uses? Why might it be less important than, say, replacement policies for virtual memory?(e) Are digital signatures on digital documents more or less secure than ink signatures on printed documents? Justify your answer.Concurrent ProcessesQ2. This problem deals with a process manager for a multi-programmed operating system kernel.The problem is to implement three key methods of a Process class that maintains parent/child relationships among processes, and coordinates the kernel API calls that govern creation and destruction of processes (in Unix these are the system calls named fork, exit, and wait). - p->Birth(Process* parent) registers this newly created process p as a child of its parent. - p->Death(int status) indicates that this process p has exited with the specified exit status. - int status = child->Join() waits for this child process to exit (i.e., to call Death), and returns the child’s exit status. Each Process object P has an associated thread. The thread bound to P calls Birth and Death on Pas part of the implementation of the system calls to create and destroy processes respectively (e.g., fork and exit). A thread bound to P may call Join on a child of P; Join is used to implement the wait system call. You do not need to create these threads or enforce these restrictions; they areintended to simplify the problem. Death on P waits until two conditions are satisfied: (1) the children of P have exited, and (2) the parent of P has exited or has executed a Join on P. The intent is that the Process object for P may be safely deleted after Death returns. Your solution should represent the process tree with the following state for each Process object P:(1) a list of the children of P, (2) a pointer to the parent of P, and (3) P’s exit status if P has exited. Be sure that your solution is free of deadlock and dangling references.(Q2) [continued] Implement pseudocode for Birth, Death, and Join methods.Memory ManagementQ3. This problem deals with a “heap” manager to support dynamic memory allocation, as for the new primitive in Java and C++. Consider the implementation of two primitives for heap allocation in C: - address_t p = malloc (int size): allocate a heap block for an object of size bytes, and return a pointer to it.- free(p): release the heap block referenced by the pointer p.(Q3a) Why use a heap at all, rather than a stack, which also supports dynamic memory allocation?(Q3b) What support is needed from the operating system kernel to implement heap allocation? Briefly discuss the suitable division of function between the kernel and an application-level runtime library, and justify it.(Q3c) It is possible to implement heap primitives in various ways, involving various tradeoffs, performance behaviors, and assumptions about usage patterns. Briefly discuss the implementation goals and choices for these primitives.(Q3d) Sketch a pseudocode implementation of the malloc and free primitives.(Q3d) [continued] Pseudocode for the malloc and free primitives.Cache ManagementQ4. Caching is a common technique in operating system software. Operating systems manage primary memory as a cache for objects drawn from various sets while those objects are in active use: virtual memory pages, file blocks, directory name entries, IP address mappings on the local network, file metadata descriptors(inodes or vnodes), and so on.(Q4a) Outline the data structures that an operating system might use to represent such a cache. What are the important operations on these cache structures? In this question I am asking you to generalize from these examples and outline what is common across these software-managed caching structures.(Q4b) What policy choices might an operating system make to enhance system performance with respect to how these caches are managed? Outline the areas in which operating system caching policies are most likelyto impact overall performance, and discuss some of the options, tradeoffs, and/or choices for each area.(Q4c) Most modern operating systems use a common pool of physical memory page frames to cache file blocks and virtual memory pages. Outline some of the key ways in which file block caching differs from virtual memory page caching. How do these differences affect the caching policies used by the operating


View Full Document
Download Qualifying Exam
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Qualifying Exam and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Qualifying Exam 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?