»
首页
|
手机数码
|
汽车资讯
|
游戏硬件
|
评测专题
|
手机壁纸
|
海淘值得买
|
度假
|
求职招聘
|
广告联系
» 您尚未登录:请
登录
|
注册
|
标签
|
帮助
|
小黑屋
|
TGFC Lifestyle
»
Apple 专区
» 都在说界面,来点干货,OS X内核级改进
发新话题
发布投票
发布商品
发布悬赏
发布活动
发布辩论
发布视频
打印
[新闻]
都在说界面,来点干货,OS X内核级改进
mayokaze
大侠
帖子
712
精华
0
积分
9650
激骚
136 度
爱车
主机
相机
手机
注册时间
2011-1-11
发短消息
加为好友
当前离线
1
#
大
中
小
发表于 2013-6-12 00:33
显示全部帖子
How OS X “Mavericks” works its power-saving magic
http://t.co/LGChQzyl97
那些只看到UI和外观设计的对手活该败呀(
Apple execs talk up the new features in OS X Mavericks.
At yesterday's Worldwide Developer Conference (WWDC) keynote, Apple made some bold claims about the future of battery life in its laptops. A new 13-inch Macbook Air, for instance, should now run a full 12 hours on a single charge, up from 7 in the previous model. Assuming that testing bears out Apple's numbers, how did the company do it? The obvious part of the answer is "Haswell"—but that turns out to be only part of the story.
The power efficiency gains found in Intel's new Haswell CPUs should provide modest gains in battery life, and such gains were widely expected. Back in January, Intel claimed that the new Haswell CPUs featured the "largest generation-to-generation battery life increase in the history of Intel" and said that the chips were the first of its architectures designed "from the ground up" for Ultrabooks and tablets. The new chips run at lower clockspeeds and at lower wattages.
Less expected was the announcement of OS X 10.9 "Mavericks" and its own focus on mobile power usage. While Apple made a few comments during the keynote about the new technologies meant to enable longer battery life, more information appeared later in the day with the separate release of a Core Technology Overview (PDF) document that offers a high-level look at some of the Mavericks internals.
The overarching goal of the power efficiency changes is of course longer battery life, but Apple claims that it can acheive this without harming "and in some cases even improving" overall system responsiveness. Three main technologies make this possible.
First up: compressed memory. Not ordinarily thought of as a power management tool, compressed memory "automatically compresses the least recently used items in memory, compacting them to about half their original size." When the items are needed, they are uncompressed and presented to the requesting program.
Apple claims that this compression/decompression cycle within memory is faster than swapping the information out to disk, even when that disk is an SSD, thanks to its use of the old WKdm algorithm. (And running Mavericks on older laptops with mechanical disks should result in even more dramatic savings.) A 2003 academic paper (PDF) comparing the speed of three "live RAM" compression algorithms concurs, concluding, "WKdm compresses and decompresses extremely fast, outperforming the other two [tested] algorithms in both respects." This frees overall memory, increases speed (compared with swapping to disk), and lowers disk wear, but Apple claims that it also "reduces the need to read and write virtual memory swap files on disk, improving the power efficiency of your Mac," despite the small increase in CPU usage due to the compression and decompression.
The second technology is App Nap. The new feature clamps down harder on apps that aren't in the foreground. (One of our Mac-using editors notes that the current version of Safari consumes about 15 percent of CPU resources when running in the background, so these power losses can be significant.) The default scenario is to aggressively throttle resources when "an app's windows are not visible and the app is not playing audio" (though devs can override this behavior). When an app is "napping," OS X throttles its program timers, limiting their frequency to generate "significant improvements in CPU idle time when running applications that frequently check for data."
Disk and network activity are both more limited than before, too. A napping app receives the "lowest priority" for disk and network access, which is meant to reduce disk power usage but also to make foreground apps more responsive. "I/O throttling reduces the chance that a background process will interfere with the I/O activity of an app that you are actively using," says Apple.
Mavericks will also lower the UNIX process priority of any napping app so that it receives a smaller slice of CPU resources. Together, the changes should exert more control over background apps and keep their power consumption in check—though with opt-out controls for any apps designed to run at full power in the background.
Finally, Apple introduces something called Timer Coalescing, which only operates while a machine is on battery power. OS X programs are constantly setting timers that can activate the CPU, the disk, or the network link to do everything from checking DHCP WiFi leases to running Software Update to triggering an audible alarm. (Most of these timers result in action that is invisible to the user.) Because apps don't coordinate their timers at all, an idling Mac can be constantly awakened by firing timers, keeping CPUs and disks out of their lowest-power idle states.
Non-coalesced timers. Note the power use line across the bottom.
Apple
Timer Coalescing attempts to enforce some order on all this chaos. While on battery power, Mavericks will routinely scan all upcoming timers that apps have set and then apply a gentle nudge to line up any timers that will fire close to each other in time. This "coalescing" behavior means that the disk and CPU can awaken, perform timer-related tasks for multiple apps at once, and then return to sleep or idle for a longer period of time before the next round of timers fire.
Apple has never guaranteed developers that timers will run at exact times, either, so this isn't necessarily a break with convention. Apple currently tells developers that "because of the various input sources a typical run loop manages, the effective resolution of the time interval for a timer is limited to on the order of 50-100 milliseconds," and it notes that busy apps may have their timers affected even more. Current apps that set a 0.1s timer, for instance, only get something within +/- 0.00001s or so, and Apple sounds like it will get even more "approximate" with timer scheduling in Mavericks.
Apple claims the technique can "dramatically increase the amount of time that the processor spends idling, and it uses this illustrative chart to show the possible improvement in power usage.
After Timer Coalescing applied. Power usage line shows more overall idle time.
Apple
The new technologies exist alongside some kernel-level adjustments to the way CPU resources are used—Mavericks prefers to use as few cores as possible, leaving others totally idle so long as demand allows it. Paired with the Haswell improvements, Apple is making some dramatic claims for battery life improvements—and we'll be putting them all to the test.
本帖最近评分记录
撸一管
激骚
+1
最骚 Rated by wap
2013-6-12 15:07
撸一管
激骚
+1
最骚 Rated by wap
2013-6-12 15:07
撸一管
激骚
+1
最骚 Rated by wap
2013-6-12 15:07
撸一管
激骚
+1
最骚 Rated by wap
2013-6-12 15:07
撸一管
激骚
+1
最骚 Rated by wap
2013-6-12 15:07
UID
183074
帖子
712
精华
0
积分
9650
交易积分
0
阅读权限
30
在线时间
4072 小时
注册时间
2011-1-11
最后登录
2023-9-20
查看详细资料
TOP
mayokaze
大侠
帖子
712
精华
0
积分
9650
激骚
136 度
爱车
主机
相机
手机
注册时间
2011-1-11
发短消息
加为好友
当前离线
2
#
大
中
小
发表于 2013-6-12 07:00
显示全部帖子
Interrupt coalescing Linux 2.4就有了,compressed memory学术界早有论文,app nap大多是类unix内核早有的唯一的创新可能只有按需渲染,但那又怎样?我很高兴从10.6以后终于有一次如此多干货的升级(10.7的沙箱姑且算一个)。其实谈到省电,新版safari默认屏蔽非居中flash其作用可能比上文提到的3个加起来都大:D
UID
183074
帖子
712
精华
0
积分
9650
交易积分
0
阅读权限
30
在线时间
4072 小时
注册时间
2011-1-11
最后登录
2023-9-20
查看详细资料
TOP
mayokaze
大侠
帖子
712
精华
0
积分
9650
激骚
136 度
爱车
主机
相机
手机
注册时间
2011-1-11
发短消息
加为好友
当前离线
3
#
大
中
小
发表于 2013-6-12 11:03
显示全部帖子
OS X和iOS内核一直是同一个版本号,我没说界面不重要啦,只是几年没管底层了今年终于大更新了一把怎么也值说一说吧
UID
183074
帖子
712
精华
0
积分
9650
交易积分
0
阅读权限
30
在线时间
4072 小时
注册时间
2011-1-11
最后登录
2023-9-20
查看详细资料
TOP
mayokaze
大侠
帖子
712
精华
0
积分
9650
激骚
136 度
爱车
主机
相机
手机
注册时间
2011-1-11
发短消息
加为好友
当前离线
4
#
大
中
小
发表于 2013-6-12 13:54
显示全部帖子
再加一条,Intel集显终于支持OpenCL了,版本比官方驱动还高,懂的人知道其价值
Device Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz supports OpenCL 1.2
Device HD Graphics 4000 supports OpenCL 1.2
顺便OpenGL也更新到4.3了
更正,是4.1
[
本帖最后由 mayokaze 于 2013-6-12 22:59 编辑
]
UID
183074
帖子
712
精华
0
积分
9650
交易积分
0
阅读权限
30
在线时间
4072 小时
注册时间
2011-1-11
最后登录
2023-9-20
查看详细资料
TOP
mayokaze
大侠
帖子
712
精华
0
积分
9650
激骚
136 度
爱车
主机
相机
手机
注册时间
2011-1-11
发短消息
加为好友
当前离线
5
#
大
中
小
发表于 2013-6-12 22:41
显示全部帖子
引用:
原帖由
cloudchilya
于 2013-6-12 18:03 发表
本人技术小白,求大概解释下。。。。
简单来说就是从现在开始,苹果在售的所有Mac终于全部标配支持OpenCL1.2的显卡,OpenCL在Mac平台的可用性大大提升
UID
183074
帖子
712
精华
0
积分
9650
交易积分
0
阅读权限
30
在线时间
4072 小时
注册时间
2011-1-11
最后登录
2023-9-20
查看详细资料
TOP
控制面板首页
密码修改
积分交易
积分记录
公众用户组
基本概况
版块排行
主题排行
发帖排行
积分排行
交易排行
在线时间
管理团队
管理统计