题目详情

假设磁盘块与缓冲区大小相同,每个盘块读入缓冲区的时间为15μs,由缓冲区送至用户区的时间是5μs,在用户区内系统对每块数据的处理时间为1μs。若用户需要将大小为10个磁盘块的Doc1文件逐块从磁盘读入缓冲区,并送至用户区进行处理,那么采用单缓冲区需要花费的时间为(请作答此空)μs;采用双缓冲区需要花费的时间为______μs。

  • A.150
  • B.151
  • C.156
  • D.201

正确答案及解析

正确答案
D
解析

这要理解流水线分段的原理,例如,流水线之所以能分成取址、执行两段,是因为第1个线程执行的时候,第2个线程可以去取址,这种叠加的关系。 题目中,单缓冲区的时候,前两段描述,即读入缓冲区、由缓冲区送到用户区,都需要用到单缓冲区,此时,必须等待线程1完成这两段, 即线程1到第三段:处理磁盘块的时候,线程2才能进入第1段,因此前两段必须合并成流水线中的一段,因为前两段无法让多个线程并行叠加执行。因此单缓冲区是两段,第一段20us,第二段1us,用流水线公式计算:21+(10-1)*20=201 双缓冲区就不存在这种情况,当线程1执行完第1段:读入缓冲区后,进入第2段:缓冲区送到用户区时,线程2就可以立即开始第1段,因此双缓冲区这三段正好是可以叠加执行,不用合并。因此双缓冲时直接按流水线时间计算:15+5+1+(10-1)*15=156

包含此试题的试卷

你可能感兴趣的试题

单选题

The Internet of( 1)(IoT) describes physical objects that are embedded with Sensor,processing abilities,softwares,and other technologies that connect with other devices and systems over the ( 2) or other communication and exchange data networks .Over the past few years, IoT has become one of the most important technologies of the ( 3 ) centuryWe can connect objects to the Internet via embedded devices. By means of( 4) computing, the cloud, big data, and mobile technologies, physical things can share and collect data with minimal human intervention. Traditional fields of embedded systems,wireless ( 5) networks (WSNs),control systems,automation, independently and collectively enable IoT.回答5处

  • A.sensor
  • B.searching
  • C.service
  • D.source
查看答案
单选题

The Internet of( 1)(IoT) describes physical objects that are embedded with Sensor,processing abilities,softwares,and other technologies that connect with other devices and systems over the ( 2) or other communication and exchange data networks .Over the past few years, IoT has become one of the most important technologies of the ( 3 ) centuryWe can connect objects to the Internet via embedded devices. By means of( 4) computing, the cloud, big data, and mobile technologies, physical things can share and collect data with minimal human intervention. Traditional fields of embedded systems,wireless ( 5) networks (WSNs),control systems,automation, independently and collectively enable IoT.回答4处

  • A.low-level
  • B.low-cost
  • C.high-cost
  • D.high-performance
查看答案
单选题

The Internet of( 1)(IoT) describes physical objects that are embedded with Sensor,processing abilities,softwares,and other technologies that connect with other devices and systems over the ( 2) or other communication and exchange data networks .Over the past few years, IoT has become one of the most important technologies of the ( 3 ) centuryWe can connect objects to the Internet via embedded devices. By means of( 4) computing, the cloud, big data, and mobile technologies, physical things can share and collect data with minimal human intervention. Traditional fields of embedded systems,wireless ( 5) networks (WSNs),control systems,automation, independently and collectively enable IoT.回答3处

  • A.19th
  • B.20th
  • C.21th
  • D.22th
查看答案
单选题

The Internet of( 1)(IoT) describes physical objects that are embedded with Sensor,processing abilities,softwares,and other technologies that connect with other devices and systems over the ( 2) or other communication and exchange data networks .Over the past few years, IoT has become one of the most important technologies of the ( 3 ) centuryWe can connect objects to the Internet via embedded devices. By means of( 4) computing, the cloud, big data, and mobile technologies, physical things can share and collect data with minimal human intervention. Traditional fields of embedded systems,wireless ( 5) networks (WSNs),control systems,automation, independently and collectively enable IoT.回答2处

  • A.path
  • B.Internet
  • C.route
  • D.switch
查看答案
单选题

The Internet of( 1)(IoT) describes physical objects that are embedded with Sensor,processing abilities,softwares,and other technologies that connect with other devices and systems over the ( 2) or other communication and exchange data networks .Over the past few years, IoT has become one of the most important technologies of the ( 3 ) centuryWe can connect objects to the Internet via embedded devices. By means of( 4) computing, the cloud, big data, and mobile technologies, physical things can share and collect data with minimal human intervention. Traditional fields of embedded systems,wireless ( 5) networks (WSNs),control systems,automation, independently and collectively enable IoT.回答1处

  • A.this
  • B.thing
  • C.think
  • D.things
查看答案

相关题库更多 +