centos 进程处于睡眠_操作系统处于睡眠模式时,计算机的CPU是否处于活动状态?...

centos 进程处于睡眠_操作系统处于睡眠模式时,计算机的CPU是否处于活动状态?...

centos 进程处于睡眠

centos 进程处于睡眠_操作系统处于睡眠模式时,计算机的CPU是否处于活动状态?...

When you put your operating system into sleep mode, just how much activity is still actually occurring “under the hood” with your computer’s hardware? Today’s SuperUser Q&A post has a great explanation to help a curious reader learn more about how his system and computer works.

当您将操作系统置于睡眠模式时,计算机硬件实际上仍在“后台”进行多少活动? 今天的超级用户问答环节有一个很好的解释,可以帮助好奇的读者更多地了解其系统和计算机的工作方式。

Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.

今天的“问答”环节由SuperUser提供,它是Stack Exchange的一个分支,该社区是由社区驱动的Q&A网站分组。

Photo courtesy of Asif A. Ali (Flickr).

图片由Asif A. Ali(Flickr)提供

问题 (The Question)

SuperUser reader cpx wants to know if a computer’s CPU is active when an operating system is in sleep mode:

SuperUser阅读器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?

假设您在计算机上安装了Windows操作系统,并且在将其关闭之前将系统切换到睡眠模式。 据我所知,将不会运行任何程序或进程。 处理器是否仍会以某种方式或容量在后台运行并仍在运行,并且仍在使用电源?

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?

当您对运行Windows 7、8.1或10的现代计算机执行任何操作时(例如,打开机盖,按下按钮,触摸鼠标),它将立即自动打开,而无需按下电源按钮。 是因为CPU在低功耗模式下正在积极等待这些事件发生吗?

Is a computer’s CPU active when an operating system is in sleep mode?

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

答案 (The Answer)

SuperUser contributor DavidPostill has the answer for us:

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

Is a CPU Active in Sleep Mode?

CPU在睡眠模式下是否处于活动状态?

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

这取决于。 睡眠状态(S1至S4)不同,并且所有状态中的CPU状态都不相同。

  • The CPU is stopped in sleep state S1

    CPU在睡眠状态S1中停止
  • The CPU is powered off in sleep states S2 or greater

    处于睡眠状态S2或更高的CPU电源关闭

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).

睡眠通常是睡眠状态S3,但是BIOS有时可以配置为使用睡眠状态S1(在从S3恢复时无法正常使用)。

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

    powercfg -a(可用于查看PC支持的睡眠状态)

Example Output:

示例输出:

centos 进程处于睡眠_操作系统处于睡眠模式时,计算机的CPU是否处于活动状态?...

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.

状态S1,S2,S3和S4是睡眠状态。 处于这些状态之一的系统未执行任何计算任务,并且似乎已关闭。 但是,与处于关机状态(S5)的系统不同,睡眠中的系统会在硬件或磁盘上保留内存状态。 无需重新启动操作系统即可使计算机恢复工作状态。

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.

某些事件发生时,例如调制解调器的传入呼叫,某些设备可以将系统从睡眠状态唤醒。 此外,在某些计算机上,外部指示器会告诉用户系统仅在Hibernate。

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 sections 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.

在每个连续的睡眠状态S1至S4中,将关闭更多计算机。 所有兼容ACPI的计算机都会在S1处关闭处理器时钟,并在S4处失去系统硬件上下文(除非在关闭之前写入了Hibernate文件),如以下各节所述。 中间睡眠状态的详细信息可能会有所不同,具体取决于制造商如何设计机器。 例如,在某些机器上,主板上的某些芯片可能会在S3断电,而在另一些机器上,此类芯片会在S4之前保持通电。 此外,某些设备可能只能从S1唤醒系统,而不能从更深的睡眠状态唤醒系统。

System Power State S1

系统电源状态S1

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

系统电源状态S1为Hibernate状态,具有以下特征:

Power Consumption

能量消耗

  • Less consumption than in S0 and greater than in the other sleep states, processor clock is off and bus clocks are stopped, software resumption

    与S0相比消耗更少,在其他睡眠状态下消耗更多,处理器时钟关闭并且总线时钟停止,软件恢复
  • 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

系统电源状态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:

系统电源状态S2与S1相似,除了CPU上下文和系统缓存的内容丢失是因为处理器掉电之外。 状态S2具有以下特征:

Power Consumption

能量消耗

  • Less consumption than in state S1 and greater than in S3, processor is off, bus clocks are stopped (some buses might lose power), software resumption

    功耗低于状态S1且高于状态S3,处理器关闭,总线时钟停止(某些总线可能会断电),软件恢复
  • 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

    两秒或更长时间,大于或等于S1的延迟

System Hardware Context

系统硬件上下文

  • CPU context and system cache contents are lost

    CPU上下文和系统缓存内容丢失

System Power State S3

系统电源状态S3

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

系统电源状态S3为Hibernate状态,具有以下特征:

Power Consumption

能量消耗

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

    与状态S2相比消耗更少,处理器处于关闭状态,主板上的某些芯片也可能处于关闭状态

Software Resumption

软件恢复

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

    唤醒事件后,控制从处理器的复位向量开始

Hardware Latency

硬件延迟

  • Almost indistinguishable from S2

    与S2几乎没有区别

System Hardware Context

系统硬件上下文

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

    仅保留系统内存; CPU上下文,缓存内容和芯片集上下文丢失

System Power State S4

系统电源状态S4

System power state S4, the hibernate state, is the lowest-powered sleeping state and has the longest wake-up latency. To reduce power consumption 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.

系统电源状态S4(Hibernate状态)是功耗最低的睡眠状态,并且具有最长的唤醒延迟。 为了将功耗降至最低,硬件会关闭所有设备的电源。 但是,操作系统上下文保留在系统进入S4状态之前将其写入磁盘的Hibernate文件(内存映像)中。 重新启动后,加载程序将读取该文件并跳至系统先前的Hibernate前位置。

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).

如果处于状态S1,S2或S3的计算机丢失了所有交流电或电池电源,则它将丢失系统硬件环境,因此必须重新启动才能返回到S0。 但是,处于状态S4的计算机即使在失去交流电源或电池电源后也可以从其先前的位置重新启动,因为操作系统上下文保留在Hibernate文件中。 处于Hibernate状态的计算机不使用任何电源(trick流电流可能除外)。

System power state S4 has the following characteristics:

系统电源状态S4具有以下特征:

Power Consumption

能量消耗

  • Off, except for trickle current to the power button and similar devices, software resumption

    熄灭,除了电源按钮和类似设备的current流电流,软件恢复
  • 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.

    系统从保存的Hibernate文件重启。 如果无法加载Hibernate文件,则需要重启。 在系统处于S4状态时重新配置硬件可能会导致更改,从而导致无法正确加载Hibernate文件。

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.

    长且不确定。 只有物理交互才能使系统恢复到工作状态。 这种交互可能包括用户按下ON开关,或者,如果存在适当的硬件并且启用了唤醒,则是调制解调器或LAN上活动的传入振铃。 如果硬件支持,机器也可以从恢复计时器中唤醒。 系统硬件上下文。
  • 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.

    没有保留在硬件中。 掉电前,系统在Hibernate文件中写入内存映像。 加载操作系统后,它将读取该文件并跳至其先前位置。

Source: System Sleeping States

资料来源: 系统睡眠状态

Further Reading

进一步阅读



Have something to add to the explanation? Sound off in the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.

有什么补充说明吗? 在评论中听起来不错。 是否想从其他精通Stack Exchange的用户那里获得更多答案? 在此处查看完整的讨论线程

翻译自: https://www.howtogeek.com/242447/is-a-computers-cpu-active-when-an-operating-system-is-in-sleep-mode/

centos 进程处于睡眠