转自:http://blog.sina.com.cn/s/blog_4b6e98810100n37k.html

休眠(Hibernate),将系统切换到该模式后,系统会自动将内存中的数据全部转存到硬盘上一个休眠文件中,然后切断对所有设备的供电。这样当恢复的时候,系统会从硬盘上将休眠文件的内容直接读入内存,并恢复到休眠之前的状态。这种模式完全不耗电,因此不怕休眠后供电异常,但代价是需要一块和物理内存一样大小的硬盘空间(好在现在的硬盘已经跨越TB级别了,大容量硬盘越来越便宜)。而这种模式的恢复速度较慢,取决于内存大小和硬盘速度,一般都要1分钟左右,甚至更久。
 
  睡眠(Sleep),是Windows Vista中的新模式,这种模式结合了待机和休眠的所有优点。将系统切换到睡眠状态后,系统会将内存中的数据全部转存到硬盘上的休眠文件中(这一点类似休眠),然后关闭除了内存外所有设备的供电,让内存中的数据依然维持着(这一点类似待机)。这样,当我们想要恢复的时候,如果在睡眠过程中供电没有发生过异常,就可以直接从内存中的数据恢复(类似待机),速度很快;但如果睡眠过程中供电异常,内存中的数据已经丢失了,还可以从硬盘上恢复(类似休眠),只是速度会慢一点。不过无论如何,这种模式都不会导致数据丢失。
  正因为睡眠功能有这么多优点,因此Windows Vista开始菜单上的电源按钮默认就会将系统切换到睡眠模式。所以我们大可充分利用这一新功能,毕竟从睡眠状态下恢复,速度要比从头启动快很多。而且睡眠模式也不是一直进行下去的,如果系统进入睡眠模式一段时间后(具体时间可以设定)没有被唤醒,那么还会自动被转入休眠状态,并关闭对内存的供电,进一步节约能耗。

A 'Sleeping' computer awakens quicker than one which is hibernating.  The downside of Sleep is that you lose unsaved data in the case of a complete power loss, this is because the information is stored in RAM.  Hibernate on the other hand, saves the contents of memory into a physical file called hiberfil.sys, thus you would not lose unsaved data.One more point, Windows 7 has a setting called 'Hybrid sleep', which combines sleep and hibernate as described above.
  If I work with the Aero graphics at maximum brightness, my AS4741G's battery will not last much more than 90 minutes.  Therefore, anything that I can do to conserve battery power, will increase the time I can use my laptop away from the mains electricity.  As with all task's, micro-management is counter-productive, in the case of the laptop you have to balance the hesitations from coming out of 'Sleep', with the battery wastage when you get up from the laptop in order to perform some other task in the room.

Windows 7's Sleep saves data to memory (RAM) and then switches to minimal power mode.  The disadvantage is a 5 second delay while Windows 7 manages the switch back to normal power mode. In the event of a power failure you would lose any unsaved data which is stored in RAM.  You may also have to re-enter your password to resume after sleep, however that is another configurable setting.  See 'Require a password on wakeup' from the task list menu.
  Windows 7's Hibernation stores unsaved data, including information about open programs, to a special file called hiberfil.sys. This means that your data is safe even if you switch of the mains and take out the battery.  When the machine restarts, it loads the data stored in hiberfil.sys and thus returns the machine to the precise state when you set it to hibernate. Incidentally, hiberfil.sys is a hidden file, which is always found in the root of the c: drive. To see the file, you may need to adjust your Explorer's settings.  Press the Alt key, then click on the View tab and now scroll down to Hidden files and folders. Select the radio button next to Show hidden files and folders.
   If you figure out the role of Microsoft's hiberfil.sys, then you understand why Hibernation sometimes is not an option.  For example, there may be insufficient disk space on the C: drive to create this huge file, or some older Bios software cannot manage suspend to disk or suspend to RAM.  You if you wish to use the Hibernate option, be careful that a Disk Cleanup operation does not delete hiberfil.sys, and thus at least temporarily, remove the option to hibernate. (Solution issue the command line instruction: powercfg -h on)
   In the case of Window 7's Hybrid Sleep, it gives you the speed of Sleep, combined with the resilience of Hibernation.  If all goes well then your machine comes out of Hybrid Sleep in less than 5 seconds, if all goes badly, then it takes relatively ages for the desktop to return, but at least you can recover your unsaved data from hiberfil.sys.
   If you were of a mind, you could choose a different combination of Power Settings everyday of the year, and never repeat the same setting twice.  For this reason, Windows 7 groups settings into Plans for example,  Power Saver, High Performance, or Balanced.  The advantaged of these pre-configured Plans is that you get consistent and compatible settings for: 'Turn off the Display', 'Put the Computer to Sleep' and 'Adjust Display Brightness'.

Hibernate与Sleep的区别的更多相关文章

  1. 简述 Hibernate 和 JDBC 的区别、优缺点

    1.hibernate是一个开源的.采用面向对象的思想实现ORM映射框架,它对jdbc进行了一层封装,对于数据库的连接.关闭.数据的持久化(增删改查).事务的管理都进行了封装,使得程序开发的时候可以用 ...

  2. Jdbc、Mybatis、Hibernate各自优缺点及区别

    文章出处:Jdbc,Mybatis,Hibernate各自优缺点及区别 先比较下jdbc编程和hibernate编程各自的优缺点. 1.JDBC 我们平时使用jdbc进行编程,大致需要下面几个步骤:  ...

  3. 对比JPA 和Hibernate 和 Mybatis的区别

    1.JPA.Hibernate.Mybatis简单了解 1.JPA:本身是一种ORM规范,不是ORM框架.由各大ORM框架提供实现. 2.Hibernate:目前最流行的ORM框架,设计灵巧,文档丰富 ...

  4. Hibernate 和Mybatis的区别

    Hibernate 和Mybatis的区别   1.hibernate 入门门槛高,是一个标准的ORM框架(对象关系映射),不需要程序写sql,sql语句自动生成,对sql语句进行优化.修改比较困难. ...

  5. hibernate和ibatis的区别

    通过别人的资料,进行自己关注的一些扼要点的整理 共同点: 1. 不同点:1. 自动化程度上,hibernate是全自动化的orm框架,提供了对象到数据库的完全映射和sql的内部自动生成,其对象映射是指 ...

  6. jdbc,mybatis,hibernate各自优缺点及区别

    先比较下jdbc编程和hibernate编程各自的优缺点.    JDBC:    我们平时使用jdbc进行编程,大致需要下面几个步骤:    1,使用jdbc编程需要连接数据库,注册驱动和数据库信息 ...

  7. hibernate与mybatis的区别和应用场景

    mybatis 与 hibernate 的区别和应用场景(转) 1    Hibernate : 标准的ORM(对象关系映射) 框架: 不要用写sql, sql 自动语句生成: 使用Hibernate ...

  8. hibernate与ibatis的区别

    Hibernate 是当前最流行的O/R mapping框架,当前版本是3.05.它出身于sf.net,现在已经成为Jboss的一部分了 iBATIS 是另外一种优秀的O/R mapping框架,当前 ...

  9. Mybites和hibernate的优缺点和区别

    Hibernate 是当前最流行的O/R mapping框架,它出身于sf.net,现在已经成为Jboss的一部分. Mybatis 是另外一种优秀的O/R mapping框架.目前属于apache的 ...

  10. Hibernate get load的区别

    这两个函数都是用来从数据库中加载对象,其区别说起来主要有以下两点: 1.如果数据库中不存在该对象,那么load是抛出一个ObjectNotFound的异常,而get是返回一个空指针 2.加载机制不同 ...

随机推荐

  1. 新建HomeController控制器 继承BaseController

    CRC这个缩略词,在我看来可以有两种理解:一种是Cyclic Redundancy Check,即循环冗余检错技术:另一种则是Cyclic Redundance Code,即循环冗余校检码.在计算机网 ...

  2. 用VB把xlsx转换为xls

    Sub Test()Dim wb As Workbook, mPath As String, f As StringApplication.DisplayAlerts = FalseApplicati ...

  3. redis 2

    http://www.infoq.com/cn/articles/tq-redis-memory-usage-optimization-storage 在Ubuntu下安装reids redis-2. ...

  4. 云锁Linux服务器安全软件安装及防护webshell、CC、XSS跨站攻击设置

    无论我们在使用电脑,还是使用VPS/服务器的时候,最为担心的就是服务器是否有安全问题,尤其是网站服务器再遭受攻击的时候如何得到防护.对于大 部分站长用户来说,我们可能只会使用基础的环境,如果真遇到问题 ...

  5. 使用PhotoShop

    详细请看:http://blog.sina.com.cn/s/blog_73dc36510101ahim.html

  6. 第五十四节,socketserver通讯模块实现并发操作,真多线程并发

    socketserver通讯模块实现并发操作,基于select.epoll.socket.多线程,实现的正真多线程多并发 socketserver通讯模块底层调用的socket模块,只是它作了处理基于 ...

  7. springMVC+Java验证码完善注册功能

    这篇文章简单的写了一个java验证码,为之前写过的springMVC注册功能加上验证码,验证码的作用就不多说了,防止机器人程序恶意注册什么的.. 其中User.java,加上了password和cod ...

  8. iOS开发下架在AppStore中销售的app

    1.登陆开发者账号 2.选择itunes connect 选择我的app 3.选择要下架的app 4.价格与销售范围 5.销售范围 6.点击存储 //如果想要重新在AppStore中进行销售只需要选择 ...

  9. Web安全知多少

    随着Web2.0.网络社交等一系列新型的互联网产品的诞生,基于Web环境的互联网应用越来越广泛,企业信息化的过程中,越来越多的应用都架设在Web平台上.Web业务的迅速发展吸引了黑客们的强烈关注,接踵 ...

  10. MVC5笔记【一】

    一.global.asax文件的作用:全局性配置文件 理解什么是路由? 有什么作用: 路由主要提供一个路由表 请求的时候被加载,请求url要去路由表当中去对照 规则 解析规则 控制器/动作放方法,转移 ...