Shutdown..

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Post by AJ »

I guess you could cause a shorter HD life by spinning up / down all the time. The other thing on laptops is that battery life will be considerably shorter if you keep the HD spun up all the time.

Cheers,
Adam
User avatar
inflater
Member
Member
Posts: 1309
Joined: Thu Sep 28, 2006 10:32 am
Location: Slovakia
Contact:

Post by inflater »

JAAman wrote:anytime you are doing more than one thing at a time you are multi-tasking, plus, your users will either only be simple-minded idiot=users
Pardon me, but there's nothing wrong with using singletasking systems,... at least I'm pretty comfortable for (well, almost) any type of OS... :)
XBOX is single-tasking too :)
JAAman wrote:so what does your kernel do if the HDD suddenly stops working, taking your page file with it
I support no virtual memory in my OS! :twisted:
- well, at least now, we'll see in the future :)
My web site: http://inflater.wz.cz (Slovak)
Derrick operating system: http://derrick.xf.cz (Slovak and English :P)
User avatar
JAAman
Member
Member
Posts: 879
Joined: Wed Oct 27, 2004 11:00 pm
Location: WA

Post by JAAman »

Pardon me, but there's nothing wrong with using singletasking systems,... at least I'm pretty comfortable for (well, almost) any type of OS... Smile
XBOX is single-tasking too Smile
to keep this simple: this is exactly what i meant -- only simple-minded idiot-users use xbox...

xbox is designed for games (and only poor quality games at that... there has never been, nor ever will be, a quality game released for any console) -- not power users -- you will never find programmers or graphics people using it... or me either for that matter (i have quite a few programs running right now...)

you might as well use my refrigerator as an example... my refrigerator isnt used for those purposes either, but i dont call it an example of why nobody need multi-tasking...
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Post by Colonel Kernel »

Besides, the XBox is multi-tasking.

This is why I beat dead horses, because their ghosts keep roaming around the forum in the form of ignorant hearsay... :P

<edit>
My $0.02 on the original topic -- For desktop and laptop users, the best solution to the "shut down" problem is to have a sleep/suspend function that actually freakin' works. It only happens with tight OS/driver/hardware integration. IMO that's not a bad thing.

Yes, I'm making a thinly-veiled plug for Apple. :twisted: No, I don't work there.
</edit>
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
User avatar
AndrewAPrice
Member
Member
Posts: 2299
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Post by AndrewAPrice »

JAAman wrote:
Pardon me, but there's nothing wrong with using singletasking systems,... at least I'm pretty comfortable for (well, almost) any type of OS... Smile
XBOX is single-tasking too Smile
to keep this simple: this is exactly what i meant -- only simple-minded idiot-users use xbox...

xbox is designed for games (and only poor quality games at that... there has never been, nor ever will be, a quality game released for any console) -- not power users -- you will never find programmers or graphics people using it... or me either for that matter (i have quite a few programs running right now...)
It really depends on what it's designed for. A game console is designed to really only have one game running at a time, and to dedicate the entire system and all of it's resources to that one game. On the other hand, a desktop system is designed to be productive, e.g. having a web browser , a word processor, an IM client, and an MP3 player open.

There is nothing wrong with singletasking operatings systems, and they're quite useful in some circumstances: game consoles, embedded processors, etc. On desktop systems, the end user usually wants their 2/3 favourite programs running and to be able to switch between them, copy data between programs without closing and reopening the other for each small change, and most people do not want to purchase a second computer just so they can do research on one while typing on another.
My OS is Perception.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

JAAman wrote:there has never been, nor ever will be, a quality game released for any console
I take this is only an opinion, since I beg to differ. Some console games have far better gameplay, graphics and everything than the top range of computer games - and even that is hardly a comparison. I know of games running on a 14 year old 4-cpu NUMA system, I know games that have fewer glitches than the latest unreal tournament, and there are games that have very high replayability rates that surpass those of most computer games.

Now, do you dare to define "quality"? :wink:
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
madeofstaples
Member
Member
Posts: 204
Joined: Thu Apr 12, 2007 8:15 am
Location: Michigan

Post by madeofstaples »

jal wrote:
madeofstaples wrote:if an OS implemented such a design where it wrote any modified data to the hard drive as soon as possible in case of a shut down request... wouldn't that severely shorten the life of the hard drive, especially laptop hard drives?
Why?
I, myself, don't know enough details to explain exactly why, but my reasoning is that it would probably have to do with the reasons why this is a valid bug report.

jal wrote:And why especially on laptop hard drives?
I guess I just figured, from that bug report, that since it distinguishes the amount of cycles laptop hard drives can handle, it would be lower than desktop hard drives... however I guess it's just relevant because the bug is for a laptop power-saving mode, so maybe not
jal wrote:You might have a point for flash drives, but still, in general all modified data needs to get written, whether automatically or by the user.
err... If I open a document, modify it, and save it, depending on how much editing I do, your system could write to the hard drive hundreds upon hundreds of times. Current popular methods write only once.
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Post by Colonel Kernel »

MessiahAndrw wrote:It really depends on what it's designed for. A game console is designed to really only have one game running at a time, and to dedicate the entire system and all of it's resources to that one game.
It's not quite that simple. Consider the following:
  • The XBox 360 has three processor cores. In order to take full advantage of the hardware, games have to use multiple threads.
  • A lot of games are written to do low-priority things like audio on a background thread.
  • More and more games are also doing other things like AI and collision detection on background threads, again to try and speed things up.
  • There are multiplayer features like live voice chat that could be implemented separately from the game itself, which would be really hard to do without multitasking.
Consoles today are not as brain-dead as they used to be.
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
User avatar
AndrewAPrice
Member
Member
Posts: 2299
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Post by AndrewAPrice »

Colonel Kernel wrote:
MessiahAndrw wrote:It really depends on what it's designed for. A game console is designed to really only have one game running at a time, and to dedicate the entire system and all of it's resources to that one game.
It's not quite that simple. Consider the following:
  • The XBox 360 has three processor cores. In order to take full advantage of the hardware, games have to use multiple threads.
  • A lot of games are written to do low-priority things like audio on a background thread.
  • More and more games are also doing other things like AI and collision detection on background threads, again to try and speed things up.
  • There are multiplayer features like live voice chat that could be implemented separately from the game itself, which would be really hard to do without multitasking.
Consoles today are not as brain-dead as they used to be.
By multi-tasking I was referring to multiple independent programs running in their on memory spaces. Although you could argue that multi-threading is multitasking.

And I know the XBox 360 runs OS services, update programs, XBox Live, etc in the background.

I'm all for multithreading systems, I mentioned game consoles and embedded systems to stick up for the little guy who's writing a monotasking OS.
My OS is Perception.
User avatar
inflater
Member
Member
Posts: 1309
Joined: Thu Sep 28, 2006 10:32 am
Location: Slovakia
Contact:

Post by inflater »

MessiahAndrw wrote:I mentioned game consoles and embedded systems to stick up for the little guy
I'm almost 2 m tall, do you even dare to call me, little? :twisted:

(j/k, but with that 2 metres I'm serious, I have 190 cm :P)
My web site: http://inflater.wz.cz (Slovak)
Derrick operating system: http://derrick.xf.cz (Slovak and English :P)
User avatar
ByrdKernel
Posts: 2
Joined: Sun Dec 02, 2007 12:52 am

Post by ByrdKernel »

Ah yes...this reminds me of the old #osdev days, back on the original server (not freenode, either). The only difference is that I don't see Scott (from NZ) roaming around spouting that any code that works must be right, whether it's crap or not. (I'm sure Brendan's probably the only one that'll recognize any of that, unless KJ, Jim, Scott, or one of the others in the old crew are here in disguise.)

FWIW, and back on-topic, I think both methods need to be explored further, as well as the slow boot-up. Having a functional suspend and hibernate is vital to doing a halfway decent notebook-capable OS, but a proper shutdown that doesn't take a year is important for OS's of all stripes.

-Mike
User avatar
AndrewAPrice
Member
Member
Posts: 2299
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Post by AndrewAPrice »

On a modern computer, with ~100 drivers, servers, and programs running, it should realistically only take a few seconds to send a quit message. Most programs will quit straight away, a few will write to disk. Some drivers might wait until the hard drive spins down. All of this shouldn't take more than 5-10 seconds. Why does Windows take between 20 seconds to a few minutes (depending on the computer's speed)?
My OS is Perception.
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Post by jal »

MessiahAndrw wrote:OWhy does Windows take between 20 seconds to a few minutes (depending on the computer's speed)?
Not to mention network connections. At home, XP2/SP2 is done in a about 15 seconds, but at the workplace it takes about 5 minutes to shut down. Really annoying...


JAL
User avatar
mystran
Member
Member
Posts: 670
Joined: Thu Mar 08, 2007 11:08 am

Post by mystran »

Have you ever tried to shutdown a Windows 2k3 R2 running inside VMWare? Just the right amount of time to go have a cigarette break. :)
The real problem with goto is not with the control transfer, but with environments. Properly tail-recursive closures get both right.
Post Reply