chapter 7: Main Memory Flashcards
Absolute code can be generated for \_\_\_\_. A) compile time binding B) load time binding C) execution time binding D) interrupt binding
A- COMPILE TIME BINDING
Which of the following methods of binding instructions and data to memory is performed by most general-purpose operating systems? A) interrupt binding B) compile time binding C) execution time binding D) load time binding
C- EXECUTION TIME BINDING
An address generated by a CPU is referred to as a ____.
A) physical address
B) logical address
C) post relocation register address
D) Memory-Management Unit (MMU) generated address
B- LOGICAL ADDRESS
In a dynamically linked library, ____.
A) loading is postponed until execution time
B) system language libraries are treated like any other object module
C) more disk space is used than the option of using a statically-linked library
D) a stub is included in the image for each library-routine reference
D- A STUB IS INCLUDED IN THE IMAGE FOR EACH LIBRARY-ROUTINE REFERENCE
Which of the following binding schemes facilitates swapping? A) interrupt time B) load time C) assembly time D) execution time
D- EXECUTION TIME
The roll out, roll in variant of swapping is used ____.
A) when a backing store is not necessary
B) for the round-robin scheduling algorithm
C) for priority-based scheduling algorithms
D) when the load on the system has temporarily been reduced
C- FOR PRIORITY-BASED SCHEDULING ALGORITHMS
Which of the following dynamic storage-allocation algorithms results in the smallest leftover hole in memory? A) first fit B) best fit C) worst fit D) None of the above
B- BEST FIT
Which of the following is true of compaction?
A) It can be done at assembly, load, or execution time.
B) It is used to solve the problem of internal fragmentation.
C) It cannot shuffle memory contents.
D) It is possible only if relocation is dynamic and done at execution time
D- IT IS POSSIBLE ONLY IF RELOCATION IS DYNAMIC AND DONE AT EXECUTION TIME
A(n) \_\_\_\_ page table has one page entry for each real page (or frame) of memory. A) inverted B) clustered C) forward-mapped D) virtual
A- INVERTED
How is a limit register used for protecting main memory?
When the CPU is executing a process, it generates a logical memory address that is added to a relocation register in order to arrive at the physical memory address actually used by main memory. A limit register holds the maximum logical address that the CPU should be able to access. If any logical address is greater than or equal to the value in the limit register, then the logical address is a dangerous address and an error results.
What is the advantage of using dynamic loading?
Dynamic loading enables a program to not have to store itself, in its entirety, in main memory. This allows the system to obtain better memory-space utilization. This also allows unused routines to stay out of main memory so that memory can be used more effectively. For example, code used to handle an obscure error would not always use up main memory.
What is the context switch time, associated with swapping, if a disk drive with a transfer rate of 2 MB/s is used to swap out part of a program that is 200 KB in size? Assume that no seeks are necessary and that the average latency is 15 ms. The time should reflect only the amount of time necessary to swap out the process.
200KB / 2048 KB per second + 15 ms = 113 ms
When does external fragmentation occur?
As processes are loaded and removed from memory, the free memory space is broken into little pieces. External fragmentation exists when there is enough total memory space to satisfy a request, but the available spaces are not contiguous; storage is fragmented into a large number of small holes. Both the first-fit and best-fit strategies for memory allocation suffer from external fragmentation.
Explain the basic method for implementing paging.
Physical memory is broken up into fixed-sized blocks called frames while logical memory is broken up into equal-sized blocks called pages. Whenever the CPU generates a logical address, the page number and offset into that page is used, in conjunction with a page table, to map the request to a location in physical memory.
How does a transaction look-aside buffer (TLB) assist in the hardware implementation of a page table?
Typically, large page tables are stored in main memory, and a page-table base register points to the page table. Therefore, two memory accesses are needed to access a byte (one for the page-table entry, one for the byte), causing memory access to be slowed by a factor of 2. The standard solution to this problem is to use a TLB, a special, small fast-lookup hardware cache. The TLB is associative, high speed memory. Each entry consists of a key and value. An item is compared with all keys simultaneously, and if the item is found, the corresponding value is returned.