Operating System Questions and Answers
Overview
Q. What are the three main purposes of an operating system?
Q. What are the main differences between operating systems for mainframe computers and personal computers?
Q. List the four steps that are necessary to run a program on a completely dedicated machine.
Q. We have stressed the need for an operating system to make efficient use of the computing hardware. When is it appropriate for the operating system to forsake this principle and to “waste” resources? Why is such a system not really wasteful?
Q. What is the main difficulty that a programmer must overcome in writing an operating system for a real-time environment?
Q. Consider the various definitions of operating system. Consider whether the operating system should include applications such as Web browsers And mail programs. Argue both that it should and that it should not, and support your answer.
Q. How does the distinction between kernel mode and user mode function as a rudimentary form of protection (security) system?
Q. Which of the following instructions should be privileged?
a. Set value of timer.
b. Read the clock.
c. Clear memory.
d. Issue a trap instruction.
e. Turn off interrupts.
f. Modify entries in device-status table.
g. Switch from user to kernel mode.
h. Access I/O device.
Q. Some early computers protected the operating system by placing it in a memory partition that could not be modified by either the user job or the operating system itself. Describe two difficulties that you think could arise with such a scheme.
Q. Some CPUs provide for more than two modes of operation. What are two possible uses of these multiple modes?
Q. Timers could be used to compute the current time. Provide a short description of how this could be accomplished.
Q. Is the Internet a LAN or a WAN?
Q. What is the purpose of system calls?
Q. What are the five major activities of an operating system in regard to process management?
Q. What are the three major activities of an operating system in regard to memory management?
Q. What are the three major activities of an operating system in regard to secondary-storage management?
Q. What is the purpose of the command interpreter? Why is it usually separate from the kernel?
Q. What system calls have to be executed by a command interpreter or shell in order to start a new process?
Q. What is the purpose of system programs?
Q. What is the main advantage of the layered approach to system design? What are the disadvantages of using the layered approach?
Q. List five services provided by an operating system. Explain how each provides convenience to the users. Explain also in which cases it would be impossible for user-level programs to provide these services.
Q. What is the purpose of system calls?
Q. What are the main advantages of the microkernel approach to system design?
Q. Why do some systems store the operating system in firmware and others on disk?
Q. How could a system be designed to allow a choice of operating systems to boot from? What would the bootstrap program need to do?
Q. Palm OS provides no means of concurrent processing. Discuss three major complications that concurrent processing adds to an operating system.
Q. The Sun UltraSPARC processor has multiple register sets. Describe the actions of a context switch if the new context is already loaded into one of the register sets. What else must happen if the new context is in memory rather than in a register set and all the register sets are in use?
Q. When a process creates a new process using the fork() operation, which of the following state is shared between the parent process and the child process?
a. Stack
b. Heap
c. Shared memory segments
Q. Again considering the RPC mechanism, consider the “exactly once” semantic. Does the algorithm for implementing this semantic execute correctly even if the “ACK” message back to the client is lost due to a network problem? Describe the sequence of messages and whether "exactly once" is still preserved.
Q. Assume that a distributed system is susceptible to server failure. What mechanisms would be required to guarantee the “exactly once” semantics for execution of RPCs?
Q. Provide two programming examples in which multithreading provides better performance than a single-threaded solution.
Q. What are two differences between user-level threads and kernel-level threads? Under what circumstances is one type better than the other?
Q. Describe the actions taken by a kernel to context switch between kernel level threads.
Q. What resources are used when a thread is created? How do they differ from those used when a process is created?
Q. Assume an operating system maps user-level threads to the kernel using the many-to-many model and the mapping is done through LWPs. Furthermore, the system allows developers to create real-time threads. Is it necessary to bind a real-time thread to an LWP? Explain.
Q. A CPU scheduling algorithm determines an order for the execution of its scheduled processes. Given n processes to be scheduled on one processor, how many possible different schedules are there? Give a formula in terms of n.
Q. Define the difference between preemptive and nonpreemptive scheduling.
Q. Suppose that the following processes arrive for execution at the times indicated. Each process will run the listed amount of time. In answering the questions, use non preemptive scheduling and base all decisions on the information you have at the time the decision must be made.
Process | Arrival Time | Burst Time |
P1 | 0.0 | 8 |
P2 | 0.4 | 4 |
P3 | 1.0 | 1 |
a. What is the average turnaround time for these processes with the FCFS scheduling algorithm?
b. What is the average turnaround time for these processes with the SJF scheduling algorithm?
c. The SJF algorithm is supposed to improve performance, but notice that we chose to run process P1 at time 0 because we did not know that two shorter processes would arrive soon. Compute what the average turnaround time will be if the CPU is left idle for the first 1 unit and then SJF scheduling is used. Remember that processes P1 and P2 are waiting during this idle time, so their waiting time may increase. This algorithm could be known as future-knowledge scheduling.
Q. What advantage is there in having different time-quantum sizes on different levels of a multilevel queuing system?
Q. Many CPU-scheduling algorithms are parameterized. For example, the RR algorithm requires a parameter to indicate the time slice. Multilevel feedback queues require parameters to define the number of queues, the scheduling algorithms for each queue, the criteria used to move processes between queues, and so on. These algorithms are thus really sets of algorithms (for example, the set of RR algorithms for all time slices, and so on). One set of algorithms may include another (for example, the FCFS algorithm is the RR algorithm with an infinite time quantum).What (if any) relation holds between the following pairs of sets of algorithms?
a. Priority and SJF
b. Multilevel feedback queues and FCFS
c. Priority and FCFS
d. RR and SJF
Q. Suppose that a scheduling algorithm (at the level of short-term CPU scheduling) favors those processes that have used the least processor time in the recent past. Why will this algorithm favor I/O-bound programs and yet not permanently starve CPU-bound programs?
Q. Distinguish between PCS and SCS scheduling.
Q. Assume an operating system maps user-level threads to the kernel using the many-to-many model where the mapping is done through the use of LWPs. Furthermore, the system allows program developers to create real-time threads. Is it necessary to bind a real-time thread to an LWP?
Q. Disabling interrupts frequently could affect the system’s clock. Explain why it could and how such effects could be minimized.
Q. Give the reasons why Solaris, Windows XP, and Linux implement multiple locking mechanisms. Describe the circumstances under which they use spinlocks, mutexes, semaphores, adaptive mutexes, and condition variables. In each case, explain why the mechanism is needed.
Q. Explain the differences, in terms of cost, among the three storage types volatile, nonvolatile, and stable.
Q. Explain the purpose of the checkpoint mechanism. How often should checkpoints be performed? Describe how the frequency of checkpoints affects:
• System performance when no failure occurs
• The time it takes to recover from a system crash
• The time it takes to recover from a disk crash
Q. Explain the concept of transaction atomicity.
Answer
Q. Show that some schedules are possible under the two-phase locking protocol but not possible under the timestamp protocol, and vice versa.
Answer
Q. The wait() statement in all Java program examples was part of a while loop. Explain why you would always need to use a while statement when using wait() and why you would never use an if statement.
Answer
Q. List three examples of deadlocks that are not related to a computer system environment.
Answer
Q. Suppose that a system is in an unsafe state. Show that it is possible for the processes to complete their execution without entering a deadlock state.
Answer
Q. Prove that the safety algorithm presented in Section 7.5.3 requires an order of m × n2 operations.
Answer
Q. Consider a computer system that runs 5,000 jobs per month with no deadlock-prevention or deadlock-avoidance scheme. Deadlocks occur about twice per month, and the operator must terminate and rerun about 10 jobs per deadlock. Each job is worth about $2 (in CPU time), and the jobs terminated tend to be about half-done when they are aborted A systems programmer has estimated that a deadlock-avoidance algorithm (like the banker’s algorithm) could be installed in the system with an increase in the average execution time per job of about 10 percent. Since the machine currently has 30-percent idle time, all 5,000 jobs per month could still be run, although turnaround time would increase by about 20 percent on average.
a. What are the arguments for installing the deadlock-avoidance algorithm?
b. What are the arguments against installing the deadlock-avoidance algorithm?
Answer
Q. Can a system detect that some of its processes are starving? If you answer “yes,” explain how it can. If you answer “no,” explain how the system can deal with the starvation problem.
Answer
Q. Consider the following resource-allocation policy. Requests and releases for resources are allowed at any time. If a request for resources cannot be satisfied because the resources are not available, then we check any processes that are blocked, waiting for resources. If they have the desired resources, then these resources are taken away from them and are given to the requesting process. The vector of resources for which the process is waiting is increased to include the resources that were taken away. For example, consider a system with three resource types and the vector Available initialized to (4,2,2). If process P0 asks for (2,2,1), it gets them. If P1 asks for (1,0,1), it gets them. Then, if P0 asks for (0,0,1), it is blocked (resource not available). If P2 now asks for (2,0,0), it gets the available one (1,0,0) and one that was allocated to P0 (since P0 is blocked). P0’s Allocation vector goes down to (1,2,1) and its Need vector goes up to (1,0,1).
a. Can deadlock occur? If you answer “yes”, give an example. If you answer “no,” specify which necessary condition cannot occur.
b. Can indefinite blocking occur? Explain your answer.
Answer
Q. Suppose that you have coded the deadlock-avoidance safety algorithm and now have been asked to implement the deadlock-detection algorithm. Can you do so by simply using the safety algorithm code and redefining Maxi = Waitingi + Allocationi, where Waitingi is a vector specifying the resources process i is waiting for, and Allocationi is as defined in Section 7.5? Explain your answer.
Answer
Q. Is it possible to have a deadlock involving only one single process? Explain your answer.
Answer
Q. Name two differences between logical and physical addresses.
Answer
Q. Consider a system in which a program can be separated into two parts: code and data. The CPU knows whether it wants an instruction (instruction fetch) or data (data fetch or store). Therefore, two base–limit register pairs are provided: one for instructions and one for data. The instruction base–limit register pair is automatically read-only, so programs can be shared among different users. Discuss the advantages and disadvantages of this scheme.
Answer
Q. Why are page sizes always powers of 2?
Answer
Q. Consider a logical address space of eight pages of 1024 words each, mapped onto a physical memory of 32 frames. a. How many bits are there in the logical address? b. How many bits are there in the physical address?
Answer
Q. What is the effect of allowing two entries in a page table to point to the same page frame in memory? Explain how this effect could be used to decrease the amount of time needed to copy a large amount of memory from one place to another. What effect would updating some byte on the one page have on the other page?
Answer
Q. Describe a mechanism by which one segment could belong to the address space of two different processes.
Answer
Q. Sharing segments among processes without requiring the same segment number is possible in a dynamically linked segmentation system. a. Define a system that allows static linking and sharing of segments without requiring that the segment numbers be the same. b. Describe a paging scheme that allows pages to be shared without requiring that the page numbers be the same.
Answer
Q. In the IBM/370, memory protection is provided through the use of keys. A key is a 4-bit quantity. Each 2K block of memory has a key (the storage key) associated with it. The CPU also has a key (the protection key) associated with it. A store operation is allowed only if both keys are equal, or if either is zero. Which of the following memory-management schemes could be used successfully with this hardware?
a. Bare machine
b. Single-user system
c. Multiprogramming with a fixed number of processes
d. Multiprogramming with a variable number of processes
e. Paging
f. Segmentation
Answer
Q. Under what circumstances do page faults occur? Describe the actions taken by the operating system when a page fault occurs.
Answer
Q. Assume that you have a page-reference string for a process with m frames (initially all empty). The page-reference string has length p; n distinct page numbers occur in it. Answer these questions for any page replacement algorithms:
a. What is a lower bound on the number of page faults?
b. What is an upper bound on the number of page faults?
Answer
Q. Which of the following programming techniques and structures are “good” for a demand-paged environment? Which are “not good”? Explain your answers.
a. Stack
b. Hashed symbol table
c. Sequential search
d. Binary search
e. Pure code
f. Vector operations
g. Indirection
Answer
Q. Consider the following page-replacement algorithms. Rank these algorithms on a five-point scale from “bad” to “perfect” according to their page-fault rate. Separate those algorithms that suffer from Belady’s anomaly from those that do not.
a. LRU replacement
b. FIFO replacement
c. Optimal replacement
d. Second-chance replacement
Answer
Q. When virtual memory is implemented in a computing system, there are certain costs associated with the technique and certain benefits. List the costs and the benefits. Is it possible for the costs to exceed the benefits? If it is, what measures can be taken to ensure that this does not happen?
Answer
Q. An operating system supports a paged virtual memory, using a central processor with a cycle time of 1 microsecond. It costs an additional 1 microsecond to access a page other than the current one. Pages have 1000 words, and the paging device is a drum that rotates at 3000 revolutions per minute and transfers 1 million words per second. The following statistical measurements were obtained from the system: • 1 percent of all instructions executed accessed a page other than the current page. • Of the instructions that accessed another page, 80 percent accessed a page already in memory. • When a new page was required, the replaced page was modified 50 percent of the time. Calculate the effective instruction time on this system, assuming that the system is running one process only and that the processor is idle during drum transfers.
Answer
Q. Consider the two-dimensional array A:
int A[][] = new int[100][100];
where A[0][0] is at location 200, in a paged memory system with pages of size 200. A small process is in page 0 (locations 0 to 199) for manipulating the matrix; thus, every instruction fetch will be from page 0. For three page frames, how many page faults are generated by the following array-initialization loops, using LRU replacement, and assuming page frame 1 has the process in it, and the other two are initially empty?
a.
for (int j = 0; j < 100; j++)
for (int i = 0; i < 100; i++)
A[i][j] = 0;
b.
for (int i = 0; i < 100; i++)
for (int j = 0; j < 100; j++)
A[i][j] = 0;
Answer
Q. Consider the following page reference string:
1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6.
How many page faults would occur for the following replacement algorithms, assuming one, two, three, four, five, six, or seven frames? Remember all frames are initially empty, so your first unique pages will all cost one fault each.
• LRU replacement
• FIFO replacement
• Optimal replacement
Answer
Q. Suppose that you want to use a paging algorithm that requires a reference bit (such as second-chance replacement or working-set model), but the hardware does not provide one. Sketch how you could simulate a reference bit even if one were not provided by the hardware, or explain why it is not possible to do so. If it is possible, calculate what the cost would be.
Answer
Q. You have devised a new page-replacement algorithm hat you think may be optimal. In some contorted test cases, Belady’s anomaly occurs. Is the new algorithm optimal? Explain your answer.
Answer
Q. Segmentation is similar to paging but uses variable-sized “pages.” Define two segment-replacement algorithms based on FIFO and LRU page replacement schemes. Remember that since segments are not the same size, the segment that is chosen to be replaced may not be big enough to leave enough consecutive locations for the needed segment. Consider strategies for systems where segments cannot be relocated and those for systems where they can.
Answer
Q. Consider a demand-paged computer system where the degree of multiprogramming is currently fixed at four. The system was recently measured to determine utilization of CPU and the paging disk. The results are one of the following alternatives. For each case, what is happening? Can the degree of multiprogramming be increased to increase the CPU utilization? Is the paging helping?
a. CPU utilization 13 percent; disk utilization 97 percent
b. CPU utilization 87 percent; disk utilization 3 percent
c. CPU utilization 13 percent; disk utilization 3 percent
Answer
Q. We have an operating system for a machine that uses base and limit registers, but we have modified the machine to provide a page table. Can the page tables be set up to simulate base and limit registers? How can they be, or why can they not be?
Answer
Q. Some systems automatically delete all user files when a user logs off or a job terminates, unless the user explicitly requests that they be kept; other systems keep all files unless the user explicitly deletes them Discuss the relative merits of each approach.
Answer
Q. Why do some systems keep track of the type of a file, while others leave it to the user or simply do not implement multiple file types? Which system is “better?”
Answer
Q. Similarly, some systems support many types of structures for a file’s data, while others simply support a stream of bytes. What are the advantages and disadvantages?
Answer
Q. Could you simulate a multilevel directory structure with a single-level directory structure in which arbitrarily long names can be used? If your answer is yes, explain how you can do so, and contrast this scheme with the multilevel directory scheme. If your answer is no, explain what prevents your simulation’s success. How would your answer change if file names were limited to seven characters?
Answer
Q. Explain the purpose of the open() and close() operations.
Answer
Q. Give an example of an application in which data in a file should be accessed in the following order:
a. Sequentially
b. Randomly
Answer
Q. In some systems, a subdirectory can be read and written by an authorized user, just as ordinary files can be.
a. Describe the protection problems that could arise.
b. Suggest a scheme for dealing with each of the protection problems you named in part a.
Answer
Q. Consider a system that supports 5000 users. Suppose that you want to allow 4990 of these users to be able to access one file.
a. How would you specify this protection scheme in UNIX?
b. Could you suggest another protection scheme that can be used more effectively for this purpose than the scheme provided by UNIX?
Answer
Q. Researchers have suggested that, instead of having an access list associated with each file (specifying which users can access the file, and how), we should have a user control list associated with each user (specifying which files a user can access, and how). Discuss the relative merits of these two schemes.
Answer
Q. Consider a file currently consisting of 100 blocks. Assume that the file control block (and the index block, in the case of indexed allocation) is already in memory. Calculate how many disk I/O operations are required for contiguous, linked, and indexed (single-level) allocation strategies, if, for one block, the following conditions hold. In the contiguous-allocation case, assume that there is no room to grow in the beginning, but there is room to grow in the end. Assume that the block information to be added is stored in memory.
a. The block is added at the beginning.
b. The block is added in the middle.
c. The block is added at the end.
d. The block is removed from the beginning.
e. The block is removed from the middle.
f. The block is removed from the end.
Answer
Q. What problems could occur if a system allowed a file system to be mounted simultaneously at more than one location?
Answer
Q. Why must the bitmap for file allocation be kept on mass storage, rather than in main memory?
Answer
Q. Consider a system that supports the strategies of contiguous, linked ,and indexed allocation. What criteria should be used in deciding which strategy is best utilized for a particular file?
Answer
Q. One problem with contiguous allocation is that the user must pre allocate enough space for each file. If the file grows to be larger than the space allocated for it, special actions must be taken. One solution to this problem is to define a file structure consisting of an initial contiguous area (of a specified size). If this area is filled, the operating system automatically defines an overflow area that is linked to the initial contiguous area. If the overflow area is filled, another overflow area is allocated. Compare this implementation of a file with the standard contiguous and linked implementations.
Answer
Q. How do caches help improve performance? Why do systems not use more or larger caches if they are so useful?
Answer
Q. Why is it advantageous for the user for an operating system to dynamically allocate its internal tables? What are the penalties to the operating system for doing so?
Answer
Q. Explain how the VFS layer allows an operating system easily to support multiple types of file systems.
Answer
Q. The accelerating seek described in Exercise 12.3 is typical of hard-disk drives. By contrast, floppy disks (and many hard disks manufactured before the mid-1980s) typically seek at a fixed rate. Suppose that the disk in Exercise 12.3 has a constant-rate seek rather than a constant acceleration seek, so the seek time is of the form t = x + yL, where t is the time in milliseconds and L is the seek distance. Suppose that the time to seek to an adjacent cylinder is 1 millisecond, as before, and is 0.5 milliseconds for each additional cylinder.
a. Write an equation for this seek time as a function of the seek distance.
b. Using the seek-time function from part a, calculate the total seek time for each of the schedules in Exercise 12.2. Is your answer the same as it was for Exercise 12.3(c)?
c. What is the percentage speedup of the fastest schedule over FCFS in this case?
Answer
Q. Is disk scheduling, other than FCFS scheduling, useful in a single-user environment? Explain your answer.
Answer
Q. Explain why SSTF scheduling tends to favor middle cylinders over the innermost and outermost cylinders.
Answer
Q. Why is rotational latency usually not considered in disk scheduling? How would you modify SSTF, SCAN, and C-SCAN to include latency optimization?
Answer
Q. How would use of a RAM disk affect your selection of a disk-scheduling algorithm? What factors would you need to consider? Do the same considerations apply to hard-disk scheduling, given that the file system stores recently used blocks in a buffer cache in main memory?
Answer
Q. Why is it important to balance file system I/O among the disks and controllers on a system in a multitasking environment?
Answer
Q. What are the tradeoffs involved in rereading code pages from the file system versus using swap space to store them?
Answer
Q. Is there any way to implement truly stable storage? Explain your answer.
Answer
Q. The term “fast wide SCSI-II” denotes a SCSI bus that operates at a data rate of 20 megabytes per second when it moves a packet of bytes between the host and a device. Suppose that a fast wide SCSI-II disk drive spins at 7200 RPM, has a sector size of 512 bytes, and holds 160 sectors per track.
a. Estimate the sustained transfer rate of this drive in megabytes per second.
b. Suppose that the drive has 7000 cylinders, 20 tracks per cylinder, a head switch time (from one platter to another) of 0.5 millisecond, and an adjacent cylinder seek time of 2 milliseconds. Use this additional information to give an accurate estimate of the sustained transfer rate for a huge transfer.
c. Suppose that the average seek time for the drive is 8 milliseconds. Estimate the I/Os per second and the effective transfer rate for a random-access workload that reads individual sectors that are scattered across the disk.
d. Calculate the random-access I/Os per second and transfer rate for I/O sizes of 4 kilobytes, 8 kilobytes, and 64 kilobytes.
e. If multiple requests are in the queue, scheduling algorithms such as SCAN should be able to reduce the average seek distance. Suppose that a random-access workload is reading 8-kilobyte pages, the average queue length is 10, and the scheduling algorithm reduces the average seek time to 3 milliseconds. Now calculate the I/Os per second and the effective transfer rate of the drive.
Answer
Q. More than one disk drive can be attached to a SCSI bus. In particular, a fast wide SCSI-II bus (see Exercise 12.9) can be connected to at most 15 disk drives. Recall that this bus has a bandwidth of 20 megabytes per second. At any time, only one packet can be transferred on the bus between some disk’s internal cache and the host. However, a disk can be moving its disk arm while some other disk is transferring a packet on the bus. Also, a disk can be transferring data between its magnetic platters and its internal cache while some other disk is transferring a packet on the bus. Considering the transfer rates that you calculated for the various workloads in above question, discuss how many disks can be used effectively by one fast wide SCSI-II bus.
Answer
Q. Remapping of bad blocks by sector sparing or sector slipping could influence performance. Suppose that the drive in Exercise 12.9 has a total of 100 bad sectors at random locations and that each bad sector is mapped to a spare that is located on a different track, but within the same cylinder. Estimate the number of I/Os per second and the effective transfer rate for a random-access workload consisting of 8-kilobyte reads, with a queue length of 1 (that is, the choice of scheduling algorithm is not a factor).What is the effect of a bad sector on performance?
Answer
Q. In a disk jukebox, what would be the effect of having more open files than the number of drives in the jukebox?
Answer
Q. If magnetic hard disks eventually have the same cost per gigabyte as do tapes, will tapes become obsolete, or will they still be needed? Explain your answer.
Answer
Q. It is sometimes said that tape is a sequential-access medium, whereas magnetic disk is a random-access medium. In fact, the suitability of a storage device for random access depends on the transfer size. The term streaming transfer rate denotes the data rate for a transfer that is underway, excluding the effect of access latency. By contrast, the effective transfer rate is the ratio of total bytes per total seconds, including overhead time such as the access latency. Suppose that, in a computer, the level-2 cache has an access latency of 8 nanoseconds and a streaming transfer rate of 800 megabytes per second, the main memory has an access latency of 60 nanoseconds and a streaming transfer rate of 80 megabytes per second, the magnetic disk has an access latency of 15 millisecond and a streaming transfer rate of 5 megabytes per second, and a tape drive has an access latency of 60 seconds and a streaming transfer rate of 2 megabytes per seconds.
a. Random access causes the effective transfer rate of a device to decrease, because no data are transferred during the access time. For the disk described, what is the effective transfer rate if an average access is followed by a streaming transfer of 512 bytes, 8 kilobytes, 1 megabyte, and 16 megabytes?
b. The utilization of a device is the the ratio of effective transfer rate to streaming transfer rate. Calculate the utilization of the disk drive for random access that performs transfers in each of the four sizes given in part a.
c. Suppose that a utilization of 25 percent (or higher) is considered acceptable. Using the performance figures given, compute the smallest transfer size for disk that gives acceptable utilization.
d. Complete the following sentence: A disk is a random-access device for transfers larger than bytes, and is a sequential access device for smaller transfers.
e. Compute the minimum transfer sizes that give acceptable utilization for cache, memory, and tape.
f. When is a tape a random-access device, and when is it a sequential access device?
Answer
Q. 12.15 Suppose that we agree that 1 kilobyte is 1,024 bytes, 1 megabyte is 1,0242 bytes, and 1 gigabyte is 1,0243 bytes. This progression continues through terabytes, petabytes, and exabytes (1,0246). There are currently several new proposed scientific projects that plan to record and store a few exabytes of data during the next decade. To answer the following questions, you will need to make a few reasonable assumptions; state the assumptions that you make.
a. How many disk drives would be required to hold 4 exabytes of data?
b. How many magnetic tapes would be required to hold 4 exabytes of data?
c. How many optical tapes would be required to hold 4 exabytes of data (see Exercise 12.21)?
d. How many holographic storage cartridges would be required to hold 4 exabytes of data (see Exercise 12.20)?
e. How many cubic feet of storage space would each option require?
Answer
Q. State three advantages of placing functionality in a device controller, rather than in the kernel. State three disadvantages.
Answer
Q. The example of handshaking in Section 13.2 used 2 bits: a busy bit and a command-ready bit. Is it possible to implement this handshaking with only 1 bit? If it is, describe the protocol. If it is not, explain why 1 bit is insufficient.
Answer
Q. Why might a system use interrupt-driven I/O to manage a single serial port, but polling I/O to manage a front-end processor, such as a terminal concentrator?
Answer
Q. Polling for an I/O completion can waste a large number of CPU cycles if the processor iterates a busy-waiting loop many times before the I/O completes. But if the I/O device is ready for service, polling can be much more efficient than is catching and dispatching an interrupt. Describe a hybrid strategy that combines polling, sleeping, and interrupts for I/O device service. For each of these three strategies (pure polling, pure interrupts, hybrid), describe a computing environment in which that strategy is more efficient than is either of the others.
Answer
Q. How does DMA increase system concurrency? How does it complicate hardware design?
Answer
Q. Why is it important to scale up system bus and device speeds as the CPU speed increases?
Answer
Q. Distinguish between a STREAMS driver and a STREAMS module.
Answer
Q. What are the main differences between capability lists and access lists?
Answer
Q. A Burroughs B7000/B6000 MCP file can be tagged as sensitive data. When such a file is deleted, its storage area is overwritten by some random bits. For what purpose would such a scheme be useful?
Answer
Q. In a ring-protection system, level 0 has the greatest access to objects, and level n (greater than zero) has fewer access rights. The access rights of a program at a particular level in the ring structure are considered as a set of capabilities. What is the relationship between the capabilities of a domain at level j and a domain at level i to an object (for j > i)?
Answer
Q. What protection problems may arise if a shared stack is used for parameter passing?
Answer
Q. Consider a computing environment where a unique number is associated with each process and each object in the system. Suppose that we allow a process with number n to access an object with number m only if n > m. What type of protection structure do we have?
Answer
Q. Consider a computing environment where a process is given the privilege of accessing an object only n times. Suggest a scheme for implementing this policy.
Answer
Q. If all the access rights to an object are deleted, the object can no longer be accessed. At this point, the object should also be deleted, and the space it occupies should be returned to the system. Suggest an efficient implementation of this scheme.
Answer
Q. Why is it difficult to protect a system in which users are allowed to do their own I/O?
Answer
Q. Capability lists are usually kept within the address space of the user. How does the system ensure that the user cannot modify the contents of the list?
Answer
Q. Most WANs employ only a partially connected topology. Why is this so?
Answer
Q. Under what circumstances is a token-passing network more effective than an Ethernet network?
Answer
Q. Why would it be a bad idea for gateways to pass broadcast packets between networks? What would be the advantages of doing so?
Answer
Q. Discuss the advantages and disadvantages of caching name translations for computers located in remote domains.
Answer
Q. What are the advantages and disadvantages of using circuit switching? For what kinds of applications is circuit switching a viable strategy?
Answer
Q. What are two formidable problems that designers must solve to implement a network-transparent system?
Answer
Q. Process migration within a heterogeneous network is usually impossible, given the differences in architectures and operating systems. Describe a method for process migration across different architectures running: a. The same operating system b. Different operating systems
Answer
Q. To build a robust distributed system, you must know what kinds of failures can occur.
a. List three possible types of failure in a distributed system.
b. Specify which of the entries in your list also are applicable to a centralized system.
Answer
Q. Is it always crucial to know that the message you have sent has arrived at its destination safely? If your answer is yes, explain why. If your answer is no, give appropriate examples.
Answer
Q. Present an algorithm for reconstructing a logical ring after a process in the ring fails.
Answer
Q. Consider a distributed system with two sites, A and B. Consider whether site A can distinguish among the following:
a. B goes down.
b. The link between A and B goes down.
c. B is extremely overloaded and its response time is 100 times longer than normal. What implications does your answer have for recovery in distributed systems?
Answer
Q. Dynamically loadable kernel modules give flexibility when drivers are added to a system, but do they have disadvantages too? Under what circumstances would a kernel be compiled into a single binary file, and when would it be better to keep it split into modules? Explain your answer.
Answer
Q. Multithreading is a commonly used programming technique. Describe three different ways that threads could be implemented. Explain how these ways compare to the Linux clone mechanism. When might each alternative mechanism be better or worse than using clones?
Answer
Q. The Linux kernel does not allow paging out of kernel memory. What effect does this restriction have on the kernel’s design? What are two advantages and two disadvantages of this design decision?
Answer
Q. What are three advantages of dynamic (shared) linkage of libraries compared to static linkage? What are two cases where static linkage is preferable?
Answer
Q. Compare the use of networking sockets with the use of shared memory as a mechanism for communicating data between processes on a single computer. What are the advantages of each method? When might each be preferred?
Answer
Q. UNIX systems used to use disk-layout optimizations based on the rotation position of disk data, but modern implementations, including Linux, simply optimize for sequential data access. Why do they do so? Of what hardware characteristics does sequential access take advantage? Why is rotational optimization no longer so useful?
Answer
Q. What type of operating system is Windows XP? Describe two of its major features.
Answer
Q. List the design goals of Windows XP. Describe two in detail.
Answer
Q. Describe the booting process for a Windows XP system.
Answer
Q. Describe the three main architectural layers of Windows XP.
Answer
Q. What is the job of the object manager?
Answer
Q. What types of services does the process manager provide? What is a local procedure call?
Answer
Q. What are the responsibilities of the I/O manager?
Answer
Q. Does Windows XP offer any user-mode processes that enable it to run programs developed for other operating systems? Describe two of these subsystems.
Answer
Q. What types of networking does Windows XP support? How does Windows XP implement transport protocols? Describe two networking protocols.
Answer
Q. How is the NTFS namespace organized? Describe.
Answer
Q. How does NTFS handle data structures? How does NTFS recover from a system crash? What is guaranteed after a recovery takes place?
Answer
Q. How does Windows XP allocate user memory?
Answer
Q. Describe some of the ways an application can use memory via the Win32 API.
Answer