?? ch8i.txt
字號:
Chapter 8 File Processing and External Sorting: Instructor's CD questions
1. As compared to the time required to access one unit of data from
main memory, accessing one unit of data from disk is:
a) 10 times faster.
b) 1000 times faster.
c) 1,000,000 time faster.
d) 10 times slower.
e) 1000 times slower.
*f) 1,000,000 times slower.
2. The most effective way to reduce the time required by a disk-based
program is to:
a) Improve the basic operations.
*b) Minimize the number of disk accesses.
c) Eliminate the recursive calls.
d) Reduce main memory use.
3. The basic unit of I/O when accessing a disk drive is:
a) A byte.
*b) A sector.
c) A cluster.
d) A track.
e) An extent.
4. The basic unit for disk allocation under DOS or Windows is:
a) A byte.
b) A sector.
*c) A cluster.
d) A track.
e) An extent.
5. The most time-consuming part of a random access to disk is usually:
*a) The seek.
b) The rotational delay.
c) The time for the data to move under the I/O head.
6. The simplest and most commonly used buffer pool replacement
strategy is:
a) First in/First out.
b) Least Frequently Used.
*c) Least Recently Used.
7. The C++ programmer's view of a disk file is most like:
*a) An array.
b) A list.
c) A tree.
d) A heap.
8. In external sorting, a run is:
*a) A sorted sub-section for a list of records.
b) One pass through a file being sorted.
c) The external sorting process itself.
9. The sorting algorithm used as a model for most external sorting
algorithms is:
a) Insertion sort.
b) Quicksort.
*c) Mergesort.
d) Radix Sort.
10. Assume that we wish to sort ten million records each 10 bytes long
(for a total file size of 100MB of space). We have working memory of
size 1MB, broken into 1024 1K blocks. Using replacement selection and
multiway merging, we can expect to sort this file using how many
passes through the file?
a) About 26 or 27 (that is, log n).
b) About 10.
c) 4.
*d) 2.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -