Software designer_operating system - single and double buffer and multi-level index structure

single and double buffer formula

The processing time of each piece of data = the time for each disk to read into the buffer + the time for the buffer to be sent to the user area. The time for a single buffer = (the time for each disk to read into the buffer + the time for the buffer to be sent to the user area) × How many disk blocks + data processing time of each disk block using double buffer time = time for each disk to read into the buffer × how many disk blocks + time for the buffer to be sent to the user area + data processing time for each disk block Data processing time = time for each disk to read into the buffer + time for the buffer to be sent to the user area \\ Time to use a single buffer = (time for each disk to read into the buffer + time for the buffer to be sent to the user area) × How many disk blocks + data processing time of each disk block \\ Using double buffer time = the time for each disk to read into the buffer × how many disk blocks + the time for the buffer to be sent to the user area + the processing time of each disk block dataThe processing time of each piece of data=The time to read into the buffer per disk+The time when the buffer is sent to the user areasingle buffer time _=( Time to read into the buffer for each disk+The time when the buffer was sent to the user area )×how many disk blocks+Data processing time per block _ _double buffer time _=The time to read into the buffer per disk×how many disk blocks+The time when the buffer is sent to the user area+Data processing time per block _ _

previous years

Questions 25 and 26 in the second half of 2014

image-20221028145031193

Analysis: single buffer time = (time for each disk to read into the buffer + time for the buffer to be sent to the user area) × how many disk blocks + data processing time for each disk block = (10+5)×10+2= 152 ;
Double buffer time=the time for each disk to read into the buffer×how many disk blocks+the time when the buffer is sent to the user area+the processing time of each disk block data=100+5+2= 107 ;

The answer is CB ;

Questions 25 and 26 in the second half of 2015

image-20221028145053105

Analysis: single buffer time = (time for each disk to read into the buffer + time for the buffer to be sent to the user area) × how many disk blocks + data processing time for each disk block = (15+5)×10+1= 201 ;
Double buffer time=the time for each disk to read into the buffer×how many disk blocks+the time when the buffer is sent to the user area+the processing time of each disk block data=150+5+1= 156 ;

The answer is DC ;

Multi-level index structure formula

The maximum length of the first-level index file: disk block size ( B ) each block number takes ( B ) × disk size ( B ) ÷ 1024 the second-level index file maximum length: ( disk block size ( B ) each block number takes ( B ) ) 2 × disk size ( B ) ÷ 1024 The maximum length of the first-level index file: \frac{disk block size (B)}{each block number needs to occupy (B)}×disk size (B)÷1024\ \ The maximum length of the secondary index file: (\frac{disk block size (B)}{each block number needs to occupy (B)})^2×disk size (B)÷1024The maximum length of the primary index file :Each block number takes ( B ) _Disk block size ( B )×disk size ( B )÷1024Secondary index file maximum length : (Each block number takes ( B ) _Disk block size ( B ))2×disk size ( B )÷1024

previous years

28 questions in the first half of 2009

image-20221028131454233

Analysis diagram

image-20221028133901472

The answer is D

Questions 27 and 28 in the second half of 2010

image-20221028131523434

Analysis: According to the formula, the maximum length of the primary index file is **(512÷3)×512÷1024=85**The
maximum length of the secondary index file is (512÷3)^2×512÷1024= 14450

Answer: AC ;

Questions 27 and 28 in the second half of 2012

image-20221028131551166

image-20221028131604645

Analysis diagram

image-20221028142443860

image-20221028143326952

The answer is CD ;

26 questions in the second half of 2017

image-20221028131624826

Analysis: The maximum length of the secondary index file is (1024÷3)^2×1024÷1024= 116281

The answer is C ;

28 questions in the second half of 2018

image-20221028131710882

Analysis diagram

image-20221028143631333

The answer is B ;

Questions 25 and 26 in the second half of 2020

image-20221028131800521

Analysis diagram

image-20221028144003170

image-20221028144116011

The answer is BD ;

Guess you like

Origin blog.csdn.net/m0_59598325/article/details/127572254