View Single Post
Old 10-20-2010, 09:51 PM   #14
Stonecold
Connoisseur
Stonecold will become famous soon enoughStonecold will become famous soon enoughStonecold will become famous soon enoughStonecold will become famous soon enoughStonecold will become famous soon enoughStonecold will become famous soon enough
 
Stonecold's Avatar
 
Posts: 95
Karma: 500
Join Date: Oct 2010
Location: Davis, CA
Device: Kindle 3 (B006)
Quote:
Originally Posted by Tiersten View Post
You're still causing the rest of the Kindle to power up and power down. Just because it is a soft switch doesn't mean that you're not causing other things to happen inside the Kindle.
Have you ever noticed how, if you put your Kindle into sleep mode and take it out seconds later, it "wakes up" almost instantly? And if you put it into sleep mode, wait a minute, and then wake it up it can take up to 5 seconds to actually respond. This is because it's not really powering down - it's just in standby. The important data related to the current GUI state is dumped into the Kindle's flash memory. Then, when you turn it back on, the data put into the flash memory is dumped back into the RAM, causing the Kindle to wake up at the exact spot you left it. However, it doesn't enter hibernation mode instantly. First, it goes into standby mode (the only power being used is being used to mantain the RAM). In standby mode, the Kindle's screensaver is literally that, a screensaver. All it's doing is notifying you that you pressed the power button. That's why you can wake the Kindle up instantly in the first 30 seconds or so of being in screensaver mode (at that time the screensaver is just a picture, and pressing the power simply removes the picture). After a little while, the Kindle assumes it's not going to be turned on for a while and begins dumping certain parts of it's RAM into it's flash memory. After that, if you turn it back on it'll take a longer time to start up because it has to extract "previous state" data from its flash memory and place it in its RAM as well as initialize certain processes. If I turn my Kindle on and off, all it's doing is showing me a picture and then removing that picture quickly. It's just as if I were quickly pressing the Next Page button on the Kindle's picture viewer. It's not really shutting down (or even hibernating) the second I press power.

The difference between putting a Kindle into screensaver mode (pressing the power button) and turning it off (holding the power button for 7 seconds) is that, in sleep mode, Kindle is still storing its firmware in its RAM. When you actually hold the power button to fully turn it off, it dumps a small portion of its RAM containing GUI state into its flash memory (just like putting it into sleep mode), but it also shuts down power to its RAM, causing the firmware in its RAM to fade and be lost. When someone turns Kindle back on from off mode, it has to copy its dumped GUI state as well as all of its firmware back to its RAM so that it can process data. In sleep mode, Kindle is still storing its firmware in its RAM and that take a small amout of power (that's why Amazon reccomends you turn your Kindle OFF if it's not going to be used for a long time. When it's off, almost no power is being consumed but it takes a while to boot back up).


Here are the summaries writen in third-person pseudocode:

Hibernation ON summary:
1. Power button is pressed
2. Kindle brings up screensaver image
3. Kindle waits to make sure you aren't going to turn it on immediately
4. Kindle dumps GUI state into flash memory
5. Kindle shuts down non-vital processes
6. Kindle mantains power to RAM to retain firmware
7. Kindle waits until power button is pressed again

Hibernation OFF summary:
8. Power button is pressed
9. Firmware in RAM is utilized and certain processes are initialized
10. Kindle retrieves previous GUI state from flash memory and places it in RAM
11. Kindle reads GUI state from RAM and opens processes that were closed upon shut down
12. Kindle deletes previous GUI state data from flash memory
13. Kindle removes screensaver image
14. Kindle is now ready to be operated again


Power OFF summary:
1. Power button is pressed and held down for 7 seconds
2. Kindle removes current image from screen and leaves it white
3. Kindle dumps GUI state into flash memory
4. Kindle terminates ALL processes
5. Without any active processes, the CPU immediately fails and power to the RAM is lost
6. Kindle is now OFF

Power ON summery:
1. Power button is pressed and the CPU receives power
2. The CPU initializes the BIOS which in turn loads the firmware from the flash memory which can take up to 10 seconds
3. The firmware instructs the CPU to scan the flash memory for previous GUI state data
4. The GUI state is loaded into the RAM
5. The CPU reads the GUI state in the RAM and opens processes that were terminated upon shut down
6. The previous GUI state data is deleted from the flash memory
7. The Kindle is now ON and is ready to be operated


Sorry for the long post. I kind of got carried away... I wrote this all on my Kindle, by-the-way, so there might be some typos. This took over an hour to write, so I had no time to proof-read. Excuse this post if it's a little hard to understand.
Stonecold is offline   Reply With Quote