zoukankan      html  css  js  c++  java
  • Modern Operating System --- Power Management (Hard Disk)

    Another major villain is the hard disk. It takes substantial energy to keep it spinning at high

    speed, even if there are no accesses. Many conputers, especially notebooks, spin the disk down

    after a certain number of seconds or minutes of inactivity. When it is next needed, it is spun up

    again. Unfortunately, a stopped disk is hiberating rather than sleeping because it takes quite a

    few seconds to spin it up again, which causes noticeable delays for the user.

    In addition, restarting the disk consumes considerable extra energy. As a consequence, every disk

    has a characteristic time, Td, that is its break-event point, often in the range 5 to 15 seconds. 

    Suppose that the next disk access is expected to come some time t in the future. If t < Td, it 

    takes less energy to keep the disk spinning rather than spin it down and then spin it up so

    quickly. If t > Td, the energy  saved makes it worth spinning the disk down and up again much

    later. If a good prediction could be made (e.g. based on past access patterns), the operating

    system could make shutdown predictions and save energy. In practice, most systems are conservative

    and only stop the disk after a few minutes of inactivity.

    Another way to save disk energy is to have a substantial disk cache in RAM. If a needed block is in

    the cache, an idle disk does not have to be restarted to satisfy the read. Similarly, if a write to the

    disk can be buffered in the cache, a stopped disk does not have to restarted just to handle the write.

    The disk can remain off until the cache fills up or a read miss happens.

    Another way to avoid necessary disk starts is for the operating system to keep running programs

    informed about the disk state by sending it messages or signals. Some programs have discretionary

    writes that can be skipped or delayed. For example, a word processor may be set up to write the file

    being edited to disk every few minutes. If the word processor knows that the disk is off at the moment

    it would normally wirte the file out, it can delay this write until the disk is next turned on or until a 

    certain additional time has elapsed.

  • 相关阅读:
    django文件——django + jquery-file-upload上传篇(一)-- 插件实现文件上传
    jQuery动态数字翻滚计数到指定数字的文字特效 JQuery.Running.js
    bootstrap table 第一弹:实现模态框弹出编辑
    input输入框下横线动画实现+自动填充
    Jquery 实现动态添加输入框&编号
    解决公司内网只允许微信上网:CentOS7 + SS5 搭建Sockt5代理服务器方案
    python学习系列:装饰器
    linux学习:文件属性(一)—— inode
    requests模块中request函数参数介绍
    Forbidden(403)的3种处理方式
  • 原文地址:https://www.cnblogs.com/miaoyong/p/4886837.html
Copyright © 2011-2022 走看看