cells(8)

来源:互联网 发布:什么软件可以修改数据 编辑:程序博客网 时间:2024/05/09 11:29
Cells virtualizes fbearlysuspend by making it namespace aware, leveraging the kernel-level device namespace and foreground-background usage model. In the foreground VP, reads function exactly as a non-virtualized system. Reads from a background VP always report the device as sleeping. When the foreground VP switches, all processes in all VPs blocked on either of the two files are unblocked, and the return values from the read calls are based on the new state of the VP in which the process is running. Processes in the new foreground VP see the display as awake, processes in the formerly foreground VP see the display as asleep, and processes running in background VPs that remain in the background continue to see the display as asleep. This forces background VPs to pause drawing or rendering which reduces overall system load by reducing the number of processes using hardware drawing resources, and increases graphics throughput in the foreground VP by ensuring that its processes have exclusive access to the hardware.

Cells通过使其感知名字空间来虚拟化fbearlysuspend,修改内核层设备名字空间和前后台使用模型。在前台VP中,读函数和非虚拟化系统一致。后台VP中,读总是上报设备在睡眠。当前台VP切换时,所有被阻塞在任意两个文件的VP中的进程被放行,读调用的返回值基于进程所在VP的新状态。在新的前台VP中的进程认为显示器被唤醒,在上一个前台VP中的进程认为显示器休眠。强制后台VP暂停画图或者显示,这样减少了使用硬件画图资源的进程,从而降低整个系统的负载,同时通过进程独占硬件的方式增强了前台VP的图像流量。

Wake locks are a special kind of OS kernel reference counter with two states: active and inactive. When a wake lock is “locked”, its state is changed to active; when “unlocked,” its state is changed to inactive. A wake lock can be locked multiple times, but only requires a single unlock to put it into the inactive state. The Android system will not enter suspend, or low power mode, until all wake locks are inactive. When all locks are inactive, a suspend timer is started. If it completes without an intervening lock then the device is powered down.

唤醒锁是一种特殊的有两种状态的OS内核引用计数:活跃和不活跃。当一个唤醒锁被锁住了,它的状态变为活跃;当解锁时,它的状态变为不活跃。一个唤醒锁可以被锁多次,但是只需要一次解锁就变为不活跃状态。android 系统在所有唤醒锁都是不活跃之前,不会进入挂起状态。当所有唤醒锁都是不活跃的,一个挂起计时器被启动。如果计时完成期间没有干扰锁,设备会被下电。