Older blog entries for johnnyb (starting at number 31)

1 Jun 2002 (updated 1 Jun 2002 at 21:09 UTC) »

A rant on Zombie processes.

I am really tired of so many people who are in top levels of support not knowing jack squat about what a zombie process is. System administrators, DBAs, Sun support staff, and so many others are completely clueless about what a zombie process is.

A zombie process is a process that has terminated, but has not been "waited" on by its parent. wait() is the call that the parent process uses to collect status information about the child. When a process dies, exits, whatever, it has status information that can be collected. The operating system keeps it in the process table as a zombie process so it retains it's records, and it just waits there until it's parent calls wait().

So, what do you do about zombies? Well, they aren't really a problem unless you have a lot of them. In that case, any linear scan over the process table is going to start taking a lot of time. Usually, the reason for them is that the parent isn't set up to handle the SIGCHLD signal correctly (this is the signal sent to the parent when a child dies, so it knows it needs to call wait() when it has a chance). You can't kill a zombie process because it's already dead. However, you can kill off all of the zombie processes parents until it finds one that will wait() for it. Eventually, it will get to the init() process, and the init process doesn't do hardly anything except call wait() continually, so then the zombie will go away.

So many support people have told me the only way to get rid of zombies is to reboot. Ack! What are these, former Windows admins?

And then the other day, I called Fujitsu Global Services because we had a process that we could not kill that was taking up 25% of CPU time. They transferred me to Sun support, who said it was a zombie process. AHHHH!!!!!!!!!!! Zombies don't use CPU time, because they are not running. Eventually, I showed them where in the process table it said it was active, and they finally believed me. Why doesn't Sun support know what a zombie process is!!!???

Anyway, I have run into so many people who should know better that know jack squat about what a zombie process is, that it is really, really irritating me.

I'm waiting for a good GUI to do XML publishing. I'd write one myself - I have a pretty clear idea of what needs to be done - but I lack the time at this point.

What I want is this - be able to edit my documents as a tree (I don't want ANY tags to be just plain text), but also inline some of the tags (just do a superscript with the tag name). So, for example, the tree on the left would expand out book/chapter/sect1 and maybe para, but things like emphasis and productname would be inside the text itself. Double-clicking on them would bring up the properties.

In addition, there would be a pane to modify the style sheet. By default this would be CSS, but you could, if you were an advanced user, translate the CSS style sheet to DSSSL, where more advanced processing could be done.

In addition, the DSSSL implementation would include hooks to read Processing Instructions (I don't know why these aren't used more - the br tag should have been replaced by a processing instruction in XHTML but for some reason it wasn't).

Finally, there would be a preview pane that you could switch to (or view interactively) which would show what the final output would look like.

Anyway, I use docbook constantly (see the book I'm writing at http://www.eskimo.com/~johnnyb/computers/Programmi ngGroundUp/ ), but I think a GUI interface would do wonders for the XML publishing market, because the separation of the content generation verses the typesetting is just an amazingly useful feature.

Plus, openjade uses TeX, which produces awesome-looking documents.

Added a few updates to the book, but mostly minor edits. Hopefully I'll have another big block of time to write soon before baby #2 comes along!

Updated my chapter on functions in my book. I covered most of the C calling convention, and am now to the point where I need to update my section on recursive functions.

I've been thinking a lot about meta-information. I've been perusing standards such as RDF, thinking about how to apply them functionally. A lot of the work has been largely theoretical, with a lot of the people aiming toward making computers sentient beings. Not quite, but almost.

Anyway, I've been thinking of practical uses of metadata repositories and RDF-like things.

I've come to the conclusion that GNOME needs to incorporate meta-data into it's API and GUI, and doing so will enable it's users to combine information like no other system.

Let's start with the basics. Let's say I'm running a project. I want to know all of the information that has come in for this project in the last 3 weeks. Current tools only let me query the filesystem. However, if applications were allowed to store metadata centrally, a user could search information within emails, files, their calendar, and any other tool that supported metadata. The user simply has to tag (or set up rules to autotag) information that comes in as relating to the project, and then if they need to search for such information, they can do it all from one place.

Anyway, I've got some more ideas on this, and I will post them as I have time.

Did some more work on my book. Started the "Optimization" and "Robust Programming" chapters. If anyone has any good things they want to say to newbies on these points, please let me know.

I need to work some more on the files chapter, but I'm having trouble doing so without completely overwhelming the reader.

Okay, got the new version of the book uploaded. Take a peak at http://www.eskimo.com/~johnnyb/computers/ProgrammingGroundUp/. It has all of the chapters I will include at least mentioned.

The one thing I wanted to do, but don't think I'll have enough space to is an introduction to object-oriented assembly language programming. However, if this book sells well, I might follow it up with "Data Structures from the Ground Up" which includes object-oriented programming.

Any suggestions are welcome. Let me know if this is something you would be willing to pay for in "real book" form. I'm thinking about setting the price at $39.95. Anyway, take a read and let me know what you think!

9 May 2002 (updated 10 May 2002 at 00:00 UTC) »

Working on my book. I should have an updated PDF out soon. I decided to put a basic chapter on memory at the beginning since it is so basic to everything done on the computer. Originally I was going to try to introduce it a piece at time as the example programs came across them, but decided the issues were too overreaching to not just present at the beginning. Hopefully, it will be a short enough chapter that noone will mind waiting for the real code.

In addition, I am looking into self-publishing options. I found a place called Gorham Printing (http://www.gorhamprinting.com/) which seems to have good rates since I'm not going to need any services besides printing. I'm just at a total loss as to how many to run. I'd like to run the first one as small as 25, but that's too few to get enough reviewers. Anyway, 100 is likely. That should get to all the reviewers I want, plus have a few to sell. The only problem I see is turnaround time for reprintings. I don't want to delay orders, but I don't want to overinvest, either. Probably going to charge $39.95.

If anyone has done this before, please let me know what you think!

I'm thinking of self-publishing my book Programming from the Ground Up when I am done with it. Looking for reviewers if anyone's interested. It's a ways off, but if there's enough interest, I might take some time off work to finish it up. Anyway, I'm also trying to re-figure chapter organization. I put memory management _way_ too early, and I need a segueway into OOP. The C introduction needs to be at the very end of the book, I probably need an intro to pico as an appendix, and I probably want to have at least one program doing GUI programming w/ Gtk+ or GNOME. Anyway, it's been a fun project so far, and I hope others will enjoy it.

21 Apr 2002 (updated 1 May 2002 at 00:03 UTC) »

Just finished a review of The UNIX Guide to Defenestration on my web site. You can read it at

http://www.eskimo.com/~johnnyb/computers/reviews/defen-review.html
A very good book overall.

22 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!