当操作系统处于睡眠模式时,计算机的cpu是活动的吗?

当你把你的操作系统置于睡眠模式时,到底有多少活动仍然在你的电脑硬件的“引擎盖下”发生?今天的超级用户问答帖子有一个很好的解释,可以帮助好奇的读者更多地了解他的系统和计算机是如何工作的。...

当操作系统处于睡眠模式时,计算机的cpu是活动的吗?

当你把你的操作系统置于睡眠模式时,到底有多少活动仍然在你的电脑硬件的“引擎盖下”发生?今天的超级用户问答帖子有一个很好的解释,可以帮助好奇的读者更多地了解他的系统和计算机是如何工作的。

今天的问答环节是由SuperUser提供的,SuperUser是Stack Exchange的一个分支,是一个由社区驱动的问答网站分组。

照片由Asif A.Ali(Flickr)提供。

问题

超级用户读取器cpx想知道当操作系统处于睡眠模式时计算机的CPU是否处于活动状态:

Suppose you have a Windows operating system installed on your computer and you toggle the system into sleep mode before putting it away. To the best of my knowledge, there would be no programs or processes running. Would the processor still be running or active in the background in some manner or capacity and utilizing power?

When you perform any action with modern computers running Windows 7, 8.1, or 10 (i.e. opening the lid, pressing a button, touching the mouse), it immediately turns itself on without having to press the power button. Is it because the CPU was actively waiting for those events to occur while in low power mode?

当操作系统处于睡眠模式时,计算机的CPU是活动的吗?

答案

超级用户贡献者DavidPostill为我们提供了答案:

Is a CPU Active in Sleep Mode?

It depends. There are different sleep states (S1 to S4) and the CPU state is not the same in all of them.

  • The CPU is stopped in sleep state S1
  • The CPU is powered off in sleep states S2 or greater

Sleep is normally sleep state S3, but the BIOS can sometimes be configured to use sleep state S1 instead (used when resume from S3 does not work properly).

  • powercfg -a (can be used to see what sleep states a PC supports)

Example Output:

007Ys3FFgy1gpdwcer0e3j30hd054mxh

System Sleep States

States S1, S2, S3, and S4 are the sleeping states. A system in one of these states is not performing any computational tasks and appears to be off. Unlike a system in the shutdown state (S5), however, a sleeping system retains memory state, either in the hardware or on disk. The operating system need not be rebooted to return the computer to a working state.

Some devices can wake the system from a sleeping state when certain events occur, such as an incoming call to a modem. In addition, on some computers, an external indicator tells the user that the system is merely sleeping.

With each successive sleep state, S1 to S4, more of the computer is shut down. All ACPI-compliant computers shut off their processor clocks at S1 and lose system hardware context at S4 (unless a hibernate file is written before shutdown), as listed in the secti*** below. Details of the intermediate sleep states can vary depending on how the manufacturer has designed the machine. For example, on some machines certain chips on the motherboard might lose power at S3, while on others such chips retain power until S4. Furthermore, some devices might be able to wake the system only from S1 and not from deeper sleep states.

System Power State S1

System power state S1 is a sleeping state with the following characteristics:

Power C***umption

  • Less c***umption than in S0 and greater than in the other sleep states, processor clock is off and bus clocks are stopped, software resumption
  • Control restarts where it left off

Hardware Latency

  • Typically no more than two seconds

System Hardware Context

  • All context retained and maintained by hardware

System Power State S2

System power state S2 is similar to S1 except that the CPU context and contents of the system cache are lost because the processor loses power. State S2 has the following characteristics:

Power C***umption

  • Less c***umption than in state S1 and greater than in S3, processor is off, bus clocks are stopped (some buses might lose power), software resumption
  • After wake-up, control starts from the processor’s reset vector

Hardware Latency

  • Two seconds or more, greater than or equal to the latency for S1

System Hardware Context

  • CPU context and system cache contents are lost

System Power State S3

System power state S3 is a sleeping state with the following characteristics:

Power C***umption

  • Less c***umption than in state S2, processor is off and some chips on the motherboard might also be off

Software Resumption

  • After the wake-up event, control starts from the processor’s reset vector

Hardware Latency

  • Almost indistinguishable from S2

System Hardware Context

  • Only system memory is retained; CPU context, cache contents, and chipset context are lost

System Power State S4

System power state S4, the hibernate state, is the lowest-powered sleeping state and has the longest wake-up latency. To reduce power c***umption to a minimum, the hardware powers off all devices. Operating system context, however, is maintained in a hibernate file (an image of memory) that the system writes to disk before entering the S4 state. Upon restart, the loader reads this file and jumps to the system’s previous, pre-hibernation location.

If a computer in state S1, S2, or S3 loses all AC or battery power, it loses system hardware context and therefore must reboot to return to S0. A computer in state S4, however, can restart from its previous location even after it loses AC or battery power because operating system context is retained in the hibernate file. A computer in the hibernate state uses no power (with the possible exception of trickle current).

System power state S4 has the following characteristics:

Power C***umption

  • Off, except for trickle current to the power button and similar devices, software resumption
  • System restarts from the saved hibernate file. If the hibernate file cannot be loaded, rebooting is required. Reconfiguring the hardware while the system is in the S4 state might result in changes that prevent the hibernate file from loading correctly.

Hardware Latency

  • Long and undefined. Only physical interaction returns the system to a working state. Such interaction might include the user pressing the ON switch or, if the appropriate hardware is present and wake-up is enabled, an incoming ring for the modem or activity on a LAN. The machine can also awaken from a resume timer if the hardware supports it. System hardware context.
  • None retained in hardware. The system writes an image of memory in the hibernate file before powering down. When the operating system is loaded, it reads this file and jumps to its previous location.

Source: System Sleeping States

Further Reading

  • An A-Z Index of the Windows CMD Command Line – An excellent reference for all things Windows command line related.
  • powercfg – Control power settings and configure Hibernate/Standby modes.

有什么要补充的解释吗?在评论中发出声音。想从其他精通技术的Stack Exchange用户那里了解更多答案吗?在这里查看完整的讨论主题。

  • 发表于 2021-04-09 23:12
  • 阅读 ( 372 )
  • 分类:互联网

你可能感兴趣的文章

微软边缘的睡眠标签减少了37%的cpu使用率

如果你厌倦了为了你的浏览器标签而牺牲你的计算机硬件,微软可能会为你提供解决方案。这家软件巨头已经将其睡眠标签功能转移到了微软Edge Beta 88上,并有一些有希望的数字可以与大家分享。 ...

  • 发布于 2021-03-29 03:34
  • 阅读 ( 167 )

如何在linux上杀死僵尸进程

...类型的信息: 进程状态:状态描述如下。 进程号:它在操作系统中的唯一标识符。 程序计数器:当这个进程下一次被赋予访问CPU的权限时,系统将使用这个地址来查找应该执行的进程的下一条指令。 寄存器:这个进程使用的C...

  • 发布于 2021-04-01 07:47
  • 阅读 ( 233 )

如何查看哪些进程正在阻止mac睡眠

...“防止睡眠”列中看到“是”,则您的Mac不会在该进程仍处于活动状态时自动进入睡眠模式。如果是您识别的进程,您可以等待活动任务完成,或者尝试“退出”应用程序。如果这是一个进程的行为不符合您的预期或拒绝关闭,...

  • 发布于 2021-04-01 09:17
  • 阅读 ( 275 )

如何控制mac电脑何时自动进入睡眠状态

...两个滑块:一个用于在显示器关闭时设置,另一个用于在计算机进入睡眠状态时设置。在某种程度上,苹果将这些滑块组合成一个滑块,以鼓励人们在默认情况下让电脑睡眠,从而理论上有助于节约能源。 不幸的是,在macOS的最...

  • 发布于 2021-04-01 17:16
  • 阅读 ( 409 )

如何从linux终端检查内存使用情况

...RAM。Linux使用任何空闲的RAM作为文件缓冲区空间,以保持计算机以最佳性能运行。很容易产生这样的印象:系统的RAM已经被一些失控的进程或内存泄漏所消耗,但这种情况很少发生。 它通常只是内核在后台顽强地完成它的工作。...

  • 发布于 2021-04-02 13:03
  • 阅读 ( 208 )

提高mac性能的10个快速步骤

...脑需要大约5-10GB的可用空间来进行内务管理。把它想象成操作系统的呼吸空间。 单击屏幕右上角的Apple图标,然后单击About This Mac。在“存储”选项卡下,您将看到当前硬盘使用情况的明细,以及可用空间的大小。如果主驱动器...

  • 发布于 2021-04-02 21:41
  • 阅读 ( 199 )

如果我的电脑处于睡眠模式,windows 10会更新吗?

...本电脑肯定不会醒来更新和过热,而在一个袋子里塞。**计算机,它可能只会为重要的计划任务而醒来。 进入电源选项,您将看到三个唤醒计时器设置:禁用、启用和“仅重要唤醒计时器”。系统更新是属于“重要”保护伞下的...

  • 发布于 2021-04-03 00:00
  • 阅读 ( 339 )

提高windows笔记本电脑电池寿命的6种方法

...活,不过如果需要,您可以自定义此设置。 要检查电脑处于哪种电池模式,请单击任务栏通知区域中的电池图标。一个窗口显示当前电池寿命百分比,以及一个可用于切换到其他电源模式的滑块。 要启用节电模式,请将滑块一...

  • 发布于 2021-04-03 00:13
  • 阅读 ( 205 )

htg解释道:windows中的高级电源设置是什么?

...在“控制面板”>“硬件和声音”>“电源选项”>“计算机睡眠时更改”中配置的选项相同。 Sleep>允许混合睡眠:混合睡眠是睡眠和冬眠的结合。它是为台式电脑设计的,而不是笔记本电脑。使用混合睡眠,你的桌...

  • 发布于 2021-04-04 06:34
  • 阅读 ( 202 )

如何延长windows笔记本电脑的电池寿命

...音”>“电源选项”,然后调整“关闭显示器”和“使计算机进入睡眠”选项。 禁用蓝牙和其他硬件设备 不使用的硬件设备也会无缘无故地浪费电池电量。例如,如果您的笔记本电脑从未使用过任何蓝牙配件,您可以关闭蓝...

  • 发布于 2021-04-07 01:13
  • 阅读 ( 218 )
gxk3810
gxk3810

0 篇文章

相关推荐