Friday 30 January 2009

Zombies, Daemons, and nobody

Anyone vaguely geeky would probably be able to predict from this title, exactly what I'm going to talk about. However, none of you are so here is a picture:

Yes, I know, it's a little bit dusty,
but I don't really do dusting, I'm afraid.

The above mentioned entities are all to be found in the box pictured above, and in similar boxes everywhere. At least as long as they're running Unix, Linux, or Mac's OS X. I'm not sure about Windows.

Zombies
All the work in your computer is done by processes, which in turn are made up of threads. And you thought that it was little goblins, or hamsters. These processes are created ("spawned"), using an asexual form of reproduction known as "forking". Be careful how you say that.

A process therefore has a single parent, though it can be made into an orphan, which doesn't necessarily involve the parent dying - it's more like being disinherited. Often this happens when processes are "daemonised" (see below).

Child processes usually die, kill themselves or are killed, before their parents. If their parents are on the computer's "Next of Kin" list, they will be informed of such events. The dead process becomes a zombie. Zombies don't actually do anything - they don't get any computer time, and they don't take up an awful lot of memory. They just hang around until the parent does something.


Users can type "kill" to kill a process on the system. This sends a message to the process telling it to die. If it refuses, you need to "kill -9", which tells the system to kill it anyway. It has been suggested that a game like Doom could be used as a fun way to do this...

Daemons

Daemons are programs which are constantly running (as processes) in your computer, waiting for something to happen. They usually provide a service, such as the "CUPS" daemon on this linux system. This sadly does not serve out alcoholic beverages or hold up breasts - it provides printing services to the web browser, word processor, etc. The "HAL" daemon has little in common with the rogue computer in 2001, and it notices when you plug and unplug devices, such as cameras, disks, etc.

daemon is also the name of a non-human user in many computers, since all processes have to be run by a user, even ones that people aren't involved with.

nobody

nobody is a user, too. In some ways it is almost the opposite of root, the all-powerful superuser, who can do anything. nobody is used when someone logs into a publicly accessible system such as a fileserver without having any access rights.

As I write this there are 119 processes in my computer. 2 are running, 117 are sleeping (they've got nothing better to do), and none are zombies. What a crowded place that little box is...

9 comments:

Anonymous said...

FIRST!!

Anonymous said...

You know what's weird? I think I understood all that!

That is the difference between a man and a woman (and others too). We would have dusted the tower off before taking a picture and just pretended like "yeah, my tower is ALWAYS that clean".

Brian o vretanos said...

I only realised how dusty it was when I looked at the photo. Then I thought that I should leave it because it would give people something to comment about.

And it worked! ;-)

Jean Knee said...

dust is a protective coating for expensive equipment.

so yeah, don't dust off your equipment even if you use it every day

kat said...

Yeah I'm with Bee, the women would have totally dusted and then pretended that it always looks like that.

Gosh how I miss Doom. Those were the days.

Unknown said...

My computer is full of zombies? Superb.

I have to say Jean Knee has a valuable point.

Brian o vretanos said...

Chris:

If you're computer fills up with zombies then you've got problems, since they can stop everything else working, and they are hard to kill. Apparently you have to kill their parents, and get them adopted by a process that will have them "reaped". I'm not making this up...

Jean Knee does have a good point. There's nothing wrong with dust on the outside of the computer, it's the amount inside that could cause a problem.

Brian o vretanos said...

Kat:

I think you can still get Doom. I remember playing it years ago, but I don't think I ever got very far.

Super Happy Girl said...

Yes, I know, it's a little bit dusty,
but I don't really do dusting, I'm afraid.


Ok Brian. This week(end) open that puppy up and take a picture of the inside.
I bet you (not dust bunnies) dust dinosaurs in there.

It'll be fabulous!!