您的位置:首页 > 运维架构

Modern Operating System --- Power Management (Hard Disk)

2015-10-17 05:04 281 查看
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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: