`
Anddy
  • 浏览: 191546 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

Standby Suspend Sleep and Hibernate

阅读更多

在linux下工作,经常不想把已经工作的环境全部关闭,每次开机都须重新开启eclipse等等。有时一下走神浏览下网页时间就过去了。看来还是用待机取代关机比较方便哈。
之前也听说过“待机”,“睡眠”等概念,以前的理解只是停留在表面。今天深入了解下他们的区别
下面这篇文章转载自: http://www.cnitblog.com/yuhensong/archive/2008/06/18/45849.html 想看原版的请移步
如果觉得下文文字较多,看看多图文章 : http://pubs.logicalexpressions.com/pub0009/LPMArticle.asp?ID=745
在ubuntu命令行hibernate/suspend : http://ubuntuforums.org/showthread.php?t=813387
安装ubuntu时未分配swap区,现在还不能hibernate!

 


USER ISSUE
What is the difference between sleep, standby, suspend, and hibernate?
GENERAL INFORMATION
  Computers typically offer various power saving modes. The names for these modes will be something like standby, suspend, sleep, and hibernate. Typically the standby, suspend and sleep modes require that the computer be left on to some degree, and that it stay connected to power (battery or AC). While in these modes, the hard drive usually stops running, the display turns off, and the fans might even turn off. However, the computer is still keeping in active memory everything that was running and open just prior to being put in a low power mode. The hibernate mode allows you to turn off the computer completely and even unplug it from power. When it turns back on, the screen should show you exactly what you were were working on just prior to putting it in hibernate mode.
   Because standby, suspend and sleep modes keep all the information in memory , it is typically quicker to start working again after being in these modes. Resuming work from the hibernate mode typically takes more time because it requires starting up the computer and loading everything into memory from the hard drive again (although you don't need to manually start the programs and load the files because the computer will restore everything to the state it was in previously).
   Depending on the computer and configuration, some cleanup tasks may be performed at system startup and shut down. So, some people prefer to simply shut down a computer when the are done using it. Some people suggest that it is best to leave computers on. However, if we consider the computer to be like any other appliance, then it makes sense to simply turn it off when it is not in use just as we would with a television set, dish washer, microwave, coffee pot, or any other appliance.
休眠功能的特点
与普通开机过程比较,休眠状态有以下的特点:
  1.可以随时进入休眠状态,无须将所有工作储存起来,并关闭一个又一个的应用软件。因为休眠所保存的是当前的“状态”,所有打开的程序、设置及窗口排列等都不会改变。
  2.开机和关机的过程很快,相对正常关机和开机,休眠到硬盘(STD)至唤醒所需的时间可以快20%以上,而休眠到内存(STR)的关机和开机过程只需5秒钟。
  3.对笔记本电脑来说,当电池即将耗尽而又不能得到外接电源补给的时候,迅速进入休眠状态是保证当前工作不会丢失的唯一自保方法。
休眠功能的分类
   台式电脑和笔记本电脑的休眠模式也各有特色,一般而言后者的休眠方式比较全面和复杂。但总体来说都可分为STD和STR方式,而后者又细分成S1、S3及S1&&S3模式。
(一)STD模式(Suspend to Disk,休眠到磁盘)
   STD的特点是将电脑内存中的状态复制到硬盘,因为内存中的资料就是电脑当前状态的写照,所以保存这些资料就完整保留了电脑中的状态。STD在 Windows中称为“Hibernate”(休眠),要在控制面板的电源管理中进行设置(开始→设置→控制面板→电源管理→休眠→启用休眠功能)。其特 点是会在硬盘中永久占用空间作为保存内存资料之用。很明显,内存容量有多大,需要占用的硬盘空间就有多大。
  看到这里,大家一定会联想到,在STD状态下,电脑内存容量越大,进入休眠和唤醒的过程也就越慢。当然,对于内存中没有资料的部分,硬盘也不会全部读写,所以时间比完全读写要快一些,但总的来说速度仍然较慢。
  不过STD也有优点,就是当资料复制到硬盘后,即使电源完全中断,资料也不会丢失。因此对笔记本电脑来说,STD是最好的选择。
(二)STR模式:(Suspend to RAM,休眠到内存)
  STR是在进入休眠状态时,只保留内存和主板芯片组的供电,而关闭其他部分。由于所有资料本来就在内存中,因此速度之快超乎想像。无论是台式电脑或笔记本电脑都可以利用此方式作休眠,它在Windows中被称为“Suspend”。
   其中Suspend状态又可分为S1与S3。S1模式的休眠程度较浅,当休眠时,硬盘、处理器和其他设备都会停止工作,但处理器和显示卡的风扇仍然会运 转,机箱电源也仍然在工作。因此S1的省电程度较低,但进入和唤醒速度最快,兼容性也比较好(我的机器就是这个,suspend以后机箱里还有风扇的声音 并且洞口有风进入说明电源风扇还在转)。而S3就仿佛彻底关机一样,除了电源指示灯会闪烁之外,所有风扇全部停转。此模式的耗电最少,速度也够快。笔记本 电脑通常都以此模式运作,达到最省电和无噪音的效果。而台式电脑采用此模式后,基本上无须关机,不用电脑的时候直接在关机菜单中选择“Standby”就 行了。
  STR的缺点就是很容易因为第三方驱动程序的兼容性问题使得系统无法正常进入Suspend状态。此外,如果主板BIOS对ACPI 的支持不完善,也会使STR功能无法使用。其中S3模式出现问题的几率比S1模式多,因此很多主板都具备S1&&S3模式,并可让操作系 统自动选择。但另外一个重要的前提就是机箱电源的+5V Standby插头必须能输出750mA以上电流,否则计算机将“长眠不醒”。

  绝大多数笔记本电脑同时支持多种电源管理模式,通常当用户在Windows中选择“Standby”或者按下电源开关,就会进入 Suspend状态。而当用户合上屏幕,则会进入Hibernate状态。当然,不管使用哪种模式,即使电脑不进入休眠或待机状态,我们都可以设置当某种 设备闲置一定时间后就自动关闭,以便省电。
  只要大家充分了解和应用电脑的休眠功能,既能达到省电的目的,又可以让电脑在开机和关机时更加迅速,不是有一举两得的功效吗?

缩写:
S1 or S3  = standby    = 待机  = STR
S4           = Hibernate  = 休眠 = STD

 

=========12/27================
manage and configure disk drives and media
写道
palimpsest (from the gnome-disk-utility project) is a tool to manage disk drives and media:
* Format and partition drives.
* Mount and unmount partitions.
* Query S.M.A.R.T. attributes.
It utilizes udisks.
摘自:http://packages.ubuntu.com/lucid/gnome-disk-utility

 =======12/28===========
      扩展分区和primary分区的区别:

  Differing from other partitions, the first sector of extended partition is not a boot sector, but another partition table , which is called logical partition table.
写道
Commonly, there are only two partition entries in logical partition table. One points to a partition, called logical partition, whose boundary must be limited to the extended partition. The other entry, if needed, of the extended partition table points to the next logical partition table. Similarly, its boundary is limited to its parents extended partition. And the next logical partition table may also have two partition entries: one points to a logical partition; the other points to another logical partition table and the rest may be deduced by analogy. Therefore, many partitions could be created in extended partition.
对比阅读:
 http://book.51cto.com/art/201007/211948.htm

what is partition( or  volume)  Boot section http://www.easeus.com/resource/partition-boot-sector.htm  
写道
This is distinct from the master boot sector (or record) that controls the entire disk, but is similar in concept.
 



分享到:
评论
3 楼 Anddy 2010-12-29  
DKMS is a framework designed to allow individual kernel modules to be upgraded without changing the whole kernel. It is also very easy to rebuild modules as you upgrade kernels.
2 楼 Anddy 2010-12-28  
新建了swap区之后,
解决了hibernate的问题[虽然hibernate时会报错:error drm:init-ring-common]!!

参考帖子: http://ubuntuforums.org/showthread.php?t=287962 第三楼的解决办法。
1 楼 Anddy 2010-12-28  
中午在onshoestring帮助和提醒下解决了分区的问题,详细看帖。
http://forum.ubuntu.org.cn/viewtopic.php?f=169&t=311832
大致原因见15楼。

相关推荐

Global site tag (gtag.js) - Google Analytics