5
ASSIGNMENT Advanced OPERATING SYSTEMS SEPT – DEC 2013 Due date : October 31, 2013 Lecture 1 Review Question 1.7 What is cache memory? 1.9 What is the distinction between spatial locality and temporal locality? Problems 1.7 In virtually all systems that include DMA modules, DMA access to main memory is given higher priority than processor access to main memory. Why? 1.13 A computer has a cache, main memory, and a disk used for virtual memory. If a referenced word is in the cache, 20 ns are required to access it. If it is in main memory but not in the cache, 60 ns are needed to load it into the cache (this includes the time to originally check the cache), and then the reference is started again. If the word is not in main memory, 12 ms are required to fetch the word from disk, followed by 60 ns to copy it to the cache, and then the reference is started again. The cache hit ratio is 0.9 and the main-memory hit ratio is 0.6.What is the average time in ns required to access

Adv Os Assignment 1 Draft Os Sept-Dec 2013

Embed Size (px)

DESCRIPTION

Adv Os Assignment 1 Draft Os Sept-Dec 2013

Citation preview

Page 1: Adv Os Assignment 1 Draft Os Sept-Dec 2013

ASSIGNMENT Advanced OPERATING SYSTEMS SEPT – DEC 2013

Due date : October 31, 2013Lecture 1

Review Question

1.7 What is cache memory?

1.9 What is the distinction between spatial locality and temporal locality?

Problems1.7

In virtually all systems that include DMA modules, DMA access to main memory isgiven higher priority than processor access to main memory. Why?

1.13

A computer has a cache, main memory, and a disk used for virtual memory. If a referencedword is in the cache, 20 ns are required to access it. If it is in main memory butnot in the cache, 60 ns are needed to load it into the cache (this includes the time tooriginally check the cache), and then the reference is started again. If the word is notin main memory, 12 ms are required to fetch the word from disk, followed by 60 ns tocopy it to the cache, and then the reference is started again. The cache hit ratio is 0.9and the main-memory hit ratio is 0.6.What is the average time in ns required to accessa referenced word on this system?

Page 2: Adv Os Assignment 1 Draft Os Sept-Dec 2013

ASSIGNMENT Advanced OPERATING SYSTEMS SEPT – DEC 2013

Due date : October 31, 2013

Lecture 2

Review Questions

2.7 Explain the distinction between a real address and a virtual address.

2.9 Explain the difference between a monolithic kernel and a microkernel.

Problems

2.2 An I/O-bound program is one that, if run alone, would spend more time waiting forI/O than using the processor. A processor-bound program is the opposite. Suppose ashort-term scheduling algorithm favors those programs that have used little processortime in the recent past. Explain why this algorithm favors I/O-bound programs andyet does not permanently deny processor time to processor-bound programs.

2.5 Read the following description and answer the question below.

In IBM’s mainframe operating system,OS/390, one of the major modules in the kernelis the System Resource Manager (SRM).This module is responsible for the allocationof resources among address spaces (processes).The SRM gives OS/390 a degree of sophistication unique among operating systems. No other mainframe OS, and certainlyno other type of OS, can match the functions performed by SRM. The concept of resourceincludes processor, real memory, and I/O channels. SRM accumulates statisticspertaining to utilization of processor, channel, and various key data structures. Its purposeis to provide optimum performance based on performance monitoring and analysis.The installation sets forth various performance objectives, and these serve asguidance to the SRM, which dynamically modifies installation and job performancecharacteristics based on system utilization. In turn, the SRM provides reports that enablethe trained operator to refine the configuration and parameter settings to improveuser service.This problem concerns one example of SRM activity. Real memory is divided intoequal-sized blocks called frames, of which there may be many thousands. Each framecan hold a block of virtual memory referred to as a page. SRM receives control approximately20 times per second and inspects each and every page frame. If the page

Page 3: Adv Os Assignment 1 Draft Os Sept-Dec 2013

ASSIGNMENT Advanced OPERATING SYSTEMS SEPT – DEC 2013

Due date : October 31, 2013has not been referenced or changed, a counter is incremented by 1. Over time, SRMaverages these numbers to determine the average number of seconds that a pageframe in the system goes untouched.

What might be the purpose of this and what action might SRM take?

Lecture 33.4 What does it mean to preempt a process?3.5 What is swapping and what is its purpose?

3.2 Consider a computer with N processors in a multiprocessor configuration.a. How many processes can be in each of the Ready, Running, and Blocked states atone time?b. What is the minimum number of processes that can be in each of the Ready,Running, and Blocked states at one time?

3.6 Consider the state transition diagram of Figure 3.9b. Suppose that it is time for theOS to dispatch a process and that there are processes in both the Ready state and theReady/Suspend state, and that at least one process in the Ready/Suspend state hashigher scheduling priority than any of the processes in the Ready state.Two extremepolicies are as follows: (1) Always dispatch from a process in the Ready state, to minimizeswapping, and (2) always give preference to the highest-priority process, eventhough that may mean swapping when swapping is not necessary. Suggest an intermediatepolicy that tries to balance the concerns of priority and performance.