Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
About
Team
Rules
Stats
Status
Sitemap
Chat
Downloads
Forum
News
Our Projects
Major Community Projects
Recent Posts
Unread Posts
Replies
Tools
SourceCoder3
Other Things...
Omnimaga Radio
TI-83 Plus ASM File Unsquisher
Z80 Conversion Tools
IES TI File Editor
Free RAM areas
Comprehensive Getkeyr table
URL Shortener
Online Axe Tilemap Editor
Help
Contact Us
Change Request
Report Issue/Bug
Team
Articles
Members
View the memberlist
Search For Members
Buddies
Login
Register
Omnimaga
»
Forum
»
Calculator Community
»
Major Community Projects
»
Discontinued
»
KnightOS
»
Hibernation
« previous
next »
Print
Pages: [
1
]
2
Go Down
Author
Topic: Hibernation (Read 28493 times)
0 Members and 1 Guest are viewing this topic.
SirCmpwn
Guest
Hibernation
«
on:
March 02, 2011, 10:16:38 pm »
So here's what I think I can do with KOS to hibernate:
1. User requests hibernation
2. The kernel takes control, shuts down multithreading and kills interrupts. It is now the only running process. Because it halts interrupts, all threads are suspended in their current state.
3. The kernel creates a file: /tmp/hibernation.data (filesystem is in ROM)
4. In this file, it dumps all RAM (which contains executing programs, each program's stack, the thread table, allocated memory... everything that makes KOS tick)
5. Then, it turns off the calculator.
*some time later
6. The user turns on the calculator.
7. During boot, the kernel sees that /tmp/hibernation.data exists, and loads the contents into RAM (remember that at this point, multithreading has not been initialized, or memory management)
8. The kernel deletes /tmp/hibernation.data and skips most of the initialization process.
9. Simply enable interrupts, and you're right back to the state you left it off from!
Logged
DJ Omnimaga
Clacualters are teh gr33t
CoT Emeritus
LV15
Omnimagician (Next: --)
Posts: 55943
Rating: +3154/-232
CodeWalrus founder & retired Omnimaga founder
Re: Hibernation
«
Reply #1 on:
March 03, 2011, 11:37:32 pm »
Seems good to me. SOmetimes it's good to not have to wait 2 minutes for an OS to boot everytime you want to use your laptop or computer. Not that it would take this long on a calc, unless you're TI, but it would be good. I like how newer Casio calcs do that.
Logged
SirCmpwn
Guest
Re: Hibernation
«
Reply #2 on:
March 03, 2011, 11:38:36 pm »
Yeah, it won't take long either way. And sleeping the calc would be instantaneous.
Logged
DJ Omnimaga
Clacualters are teh gr33t
CoT Emeritus
LV15
Omnimagician (Next: --)
Posts: 55943
Rating: +3154/-232
CodeWalrus founder & retired Omnimaga founder
Re: Hibernation
«
Reply #3 on:
March 03, 2011, 11:42:13 pm »
Sleeping a calc?
j/k I know what you mean.
(although this reminded me so much of "Please SD-Card insert"
)
Logged
SirCmpwn
Guest
Re: Hibernation
«
Reply #4 on:
March 03, 2011, 11:43:13 pm »
A winner is you.
Logged
Eeems
Mr. Dictator
Administrator
LV13
Extreme Addict (Next: 9001)
Posts: 6266
Rating: +318/-36
little oof
Re: Hibernation
«
Reply #5 on:
March 03, 2011, 11:48:18 pm »
One question, are you going to set aside the necessary space required for the temporary file? That seems like a lot of space.
Logged
/e
SirCmpwn
Guest
Re: Hibernation
«
Reply #6 on:
March 04, 2011, 12:34:13 am »
I was thinking of using the swap sector.
Logged
DJ Omnimaga
Clacualters are teh gr33t
CoT Emeritus
LV15
Omnimagician (Next: --)
Posts: 55943
Rating: +3154/-232
CodeWalrus founder & retired Omnimaga founder
Re: Hibernation
«
Reply #7 on:
March 04, 2011, 12:47:12 am »
Wasn't the swap sector used by OS 2.55MP, though?
Logged
SirCmpwn
Guest
Re: Hibernation
«
Reply #8 on:
March 04, 2011, 12:49:48 am »
No, every OS needs a swap sector to modify flash, a sector of ROM that isn't used for anything.
Logged
DJ Omnimaga
Clacualters are teh gr33t
CoT Emeritus
LV15
Omnimagician (Next: --)
Posts: 55943
Rating: +3154/-232
CodeWalrus founder & retired Omnimaga founder
Re: Hibernation
«
Reply #9 on:
March 04, 2011, 12:51:15 am »
Oh wait what was I thinking? We're talking about another OS here lol, not a shell. X.x Disregard my question
Logged
Eeems
Mr. Dictator
Administrator
LV13
Extreme Addict (Next: 9001)
Posts: 6266
Rating: +318/-36
little oof
Re: Hibernation
«
Reply #10 on:
March 04, 2011, 01:43:49 pm »
Did not know about the swap
Makes sense now
Sounds like a perfect use of it
Logged
/e
ztrumpet
The Rarely Active One
CoT Emeritus
LV13
Extreme Addict (Next: 9001)
Posts: 5712
Rating: +364/-4
If you see this, send me a PM. Just for fun.
Re: Hibernation
«
Reply #11 on:
March 06, 2011, 02:10:52 pm »
Sounds like a great idea. KOS is going to be great.
Logged
If I'm wrong, please correct me!
Unfinished Projects:
Elmgon
14%
Basic
Movement Demo
Homescreen Game Pack
80%
Basic
Latest Release
Cube Droid Saves the Galaxy
65%
Axe
Demo
Detonate
70%
Axe
Completed Projects:
Exodus
|
Midnight
|
Drifter
|
Axe Snake
|
Jump!
|
Factory Theta
|
Spider
|
Plot Drop
|
Papi Jump
|
Numb3rs
|
Nibbler
|
Boost
|
Duel Tile Map Editor
|
Homescreen Map Editor
|
Key Group Check
|
Oasis
SirCmpwn
Guest
Re: Hibernation
«
Reply #12 on:
March 06, 2011, 04:20:33 pm »
I still haven't picked a swap sector
I need to do that today.
Logged
jnesselr
King Graphmastur
LV11
Super Veteran (Next: 3000)
Posts: 2270
Rating: +81/-20
TAO == epic
Re: Hibernation
«
Reply #13 on:
March 06, 2011, 04:45:22 pm »
Quote from: ztrumpet on March 06, 2011, 02:10:52 pm
Sounds like a great idea. KOS is going to be great.
I didn't think you could pick a swap sector. In which case, what does TI use?
Logged
SirCmpwn
Guest
Re: Hibernation
«
Reply #14 on:
March 06, 2011, 04:54:24 pm »
I have no idea, but I don't really care what TI's doing.
Logged
Print
Pages: [
1
]
2
Go Up
« previous
next »
Omnimaga
»
Forum
»
Calculator Community
»
Major Community Projects
»
Discontinued
»
KnightOS
»
Hibernation