教学文库网 - 权威文档分享云平台
您的当前位置:首页 > 文库大全 > 教育文库 >

-操作系统精髓与设计原理(第五版)+课后题答案1(3)

来源:网络收集 时间:2026-05-28
导读: -操作系统精髓与设计原理(第五版)+课后题答案1 CHAPTER 11 I/O MANAGEMENT AND DISK SCHEDULING Review Questions 11.1 Programmed I/O: The processor issues an I/O command, on behalf of a process, to an I/O

-操作系统精髓与设计原理(第五版)+课后题答案1

CHAPTER 11

I/O MANAGEMENT AND DISK SCHEDULING

Review Questions

11.1 Programmed I/O: The processor issues an I/O command, on behalf of a

process, to an I/O module; that process then busy-waits for the

operation to be completed before proceeding. Interrupt-driven I/O: The processor issues an I/O command on behalf of a process, continues to execute subsequent instructions, and is interrupted by the I/O module when the latter has completed its work. The subsequent instructions may be in the same process, if it is not necessary for that process to wait for the completion of the I/O. Otherwise, the process is suspended pending the interrupt and other work is performed. Direct memory access (DMA): A DMA module controls the exchange of data between main memory and an I/O module. The processor sends a request for the transfer of a block of data to the DMA module and is interrupted only after the entire block has been transferred. 11.5 Seek time, rotational delay, access time.

Problems

11.1 If the calculation time exactly equals the I/O time (which is the most

favorable situation), both the processor and the peripheral device

running simultaneously will take half as long as if they ran separately. Formally, let C be the calculation time for the entire program and let T be the total I/O time required. Then the best possible running time with

buffering is max(C, T), while the running time without buffering is C + T; and of course ((C + T)/2) max(C, T) (C + T). Source: [KNUT97].

-操作系统精髓与设计原理(第五版)+课后题答案1

11.3 Disk head is initially moving in the direction of decreasing track number:

If the disk head is initially moving in the direction of increasing track

number, only the SCAN and C-SCAN results change:

-操作系统精髓与设计原理(第五版)+课后题答案1

CHAPTER 12 FILE MANAGEMENT

Review Questions

12.1 A field is the basic element of data containing a single value. A record is

a collection of related fields that can be treated as a unit by some application program.

12.5 Pile: Data are collected in the order in which they arrive. Each record

consists of one burst of data. Sequential file: A fixed format is used for records. All records are of the same length, consisting of the same number of fixed-length fields in a particular order. Because the length and position of each field is known, only the values of fields need to be stored; the field name and length for each field are attributes of the file structure. Indexed sequential file: The indexed sequential file maintains the key characteristic of the sequential file: records are organized in sequence based on a key field. Two features are added; an index to the file to support random access, and an overflow file. The index provides a lookup capability to reach quickly the vicinity of a desired record. The overflow file is similar to the log file used with a sequential file, but is integrated so that records in the overflow file are located by following a pointer from their predecessor record. Indexed file: Records are

accessed only through their indexes. The result is that there is now no restriction on the placement of records as long as a pointer in at least one index refers to that record. Furthermore, variable-length records can be employed. Direct, or hashed, file: The direct file makes use of hashing on the key value.

Problems

B

12.1 Fixed blocking: F = largest integer

R

When records of variable length are packed into blocks, data for marking

the record boundaries within the block has to be added to separate the records. When spanned records bridge block boundaries, some reference to the successor block is also needed. One possibility is a length indicator preceding each record. Another possibility is a special separator marker between records. In any case, we can assume that each record requires a marker, and we assume that the size of a marker is about equal to the size of a block pointer [WEID87]. For spanned blocking, a block pointer

…… 此处隐藏:1976字,全部文档内容请下载后查看。喜欢就下载吧 ……
-操作系统精髓与设计原理(第五版)+课后题答案1(3).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.jiaowen.net/wenku/114542.html(转载请注明文章来源)
Copyright © 2020-2025 教文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:78024566 邮箱:78024566@qq.com
苏ICP备19068818号-2
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)