在磁盘上存储数据的排列方式会影响I/O服务的总时间。假设每磁道划分成10个物理块,每块存放1个逻辑记录。逻辑记录R1,R2,…,R10存放在同一个磁道上,记录的安排顺序如下表所示:
假定磁盘的旋转速度为30ms/周,磁头当前处在R1的开始处。若系统顺序处理这些记录,使用单缓冲区,每个记录处理时间为6ms,则处理这10个记录的最长时间为( );若对信息存储进行优化分布后,处理10个记录的最少时间为( )。
问题1选项
A.189ms
B.208ms
C.289ms
D.306ms
问题2选项
A.60ms
B.90ms
C.109ms
D.180ms
正确答案及解析
正确答案
解析
答案: D、B
本题是一个较为复杂的磁盘原理问题,我们可以通过模拟磁盘的运行来进行分析求解。运作过程为:
1、读取R1:耗时3ms。读取完,磁头位于R2的开始位置。
2、处理R1:耗时6ms。处理完,磁头位于R4的开始位置。
3、旋转定位到R2开始位置:耗时24ms。
4、读取R2:耗时3ms。读取完,磁头位于R3的开始位置。
5、处理R2:耗时6ms。处理完,磁头位于R5的开始位置。
6、旋转定位到R3开始位置:耗时24ms。
……
从以上分析可以得知,读取并处理R1一共需要9毫秒。而从R2开始,多了一个旋转定位时间,R2旋转定位到读取并处理一共需要33毫秒,后面的R3至R10与R2的情况一致。所以一共耗时:
9+33×9=306毫秒。
本题后面一问要求计算处理10个记录的最少时间。其实只要把记录间隔存放,就能达到这个目标。在物理块1中存放R1,在物理块4中存放R2,在物理块7中存放R3,依此类推,这样可以做到每条记录的读取与处理时间之和均为9ms,所以处理10条记录一共为90ms。
包含此试题的试卷
你可能感兴趣的试题
( )is that it provides guidance and direction on how quality will be managed and verified throughout the project.
-
- A.Plan Quality Management
- B.Manage Quality
- C.Control Quality
- D.Project Charter
- 查看答案
( )the process of determining,documenting,and managing stakeholder needs and requirements to meet Project objectives.
-
- A.Plan Scope Management
- B.Collection Requirements
- C.Validate Scope
- D.Control Scope
- 查看答案
The information security management system preserves the confidentiality,integrity and availability of information by applying a( ).
-
- A.technology management process
- B.resource management process
- C.quality management process
- D.risk management process
- 查看答案
( )is a decentralized database,ensure that the data will not be tampered with and forged.
-
- A.Artificial intelligence
- B.Blockchain
- C.Sensing technology
- D.Big datA
- 查看答案
( )puts computer resources on the web,and must meet the requirements of super capacity,super concurrency,super speed and super security.
-
- A.Cloud computing
- B.Big datA
- C.Blockchain
- D.Internet of things
- 查看答案