Muli Ben-Yehuda's journal

October 19, 2004

Linux kernel books

Filed under: Uncategorized — Muli Ben-Yehuda @ 5:11 PM

No matter how much free information you can find on the net, nothing beats having a good book to curl with. Here are some very good Linux kernel books:

Robert Love’s Linux Kernel Development. This book is an excellent introduction, and covers the 2.6 kernel, unlike most of the rest, which cover 2.4.

Bovet and Cesati’s Understanding the Linux Kernel, 2nd Edition. This one is a very good introduction to the intricacies of the i386 kernel code, and a good overview of the major kernel subsystems.

Alessandro Rubini & Jonathan Corbet’s Linux Device Drivers, 2nd Edition. This is the classic Linux device drivers book, and is available for free from the above URL. A 3rd edition is in the works.

Mel Gorman‘s Understanding the Linux Virtual Memory Manager. This is an in-depth look at the implementation of the Linux VM, with extensive code walk-through. Indispensable reference for the fledgling VM hacker. It is also available for free on net.

More to come…

new Linux Kernel blog

Filed under: Uncategorized — Muli Ben-Yehuda @ 4:51 PM

I have a new blog at work, dedicated to the Linux Kernel and part of some e-learning initiative. Since this blog has been rather quiet lately, and I’m fairly fond of killing n birds (where n > 1) with one stone, I will be posting here everything non-confidential I post there. You’ve been warned…

Here’s my first entry:

Welcome, gentle reader.

You are reading Muli Ben-Yehuda’s Linux Kernel blog. I assume that if you’re reading this, you know what Linux is, and what a kernel is. I’ve been working on the Linux kernel for a few years now, and I plan to post here material that I’ve found useful. I won’t limit myself to just Linux or just the kernel, but rather plan to cover other interesting OS’s as well as interesting user space material. And yes, I do take users requests – your comments are appreciated!

(I’m not sure if comments are enabled, but you can always mail them to me at muli@il.ibm.com).

Note that everything posted here that is not IBM confidential will also be posted to my public blog, http://mulix.livejournal.com.

Cheers, Muli

October 6, 2004

From the “I didn’t know that” Dept

Filed under: Uncategorized — Muli Ben-Yehuda @ 5:29 PM

According to this lkml thread, select() can return that a file descriptor is available for reading, but reading from that descriptor will block, and this is perfectly valid. As ahu says, “Whenever using select for non-blocking IO always set your sockets to non-blocking as well.”

Good to know…

October 4, 2004

hidden treasures (thank you, Josef Raviv)

Filed under: Uncategorized — Muli Ben-Yehuda @ 4:19 PM

Orna recently said it seems that I confuse having books with having knowledge. She may be right; I would say that I regard having books as a precursor to having knowledge, a necessary but insufficient condition.

That’s one of the reasons I love working for IBM’s Haifa Research Lab. We have a big library, and a very comfortable arrangement for borrowing books. Once you borrow a book, it’s yours until you no longer want it. If the library doesn’t have a book you want, they’ll order it for you. I order new a book every month or two, and am slowly but surely building a very nice collection at work.

Yesterday evening I was waiting for a regression test to finish, and stopped by the library. There was a large stack of books on a table, just waiting for the right person to pick them. Turns out that the books belonged to the late Josef Raviv‘s estate, and were donated to the library. I picked up four gems:

Design of the UNIX Operating System (Prentice Hall Software Series), by Maurice J. Bach. A classic OS text.

Cryptography: A Primer, by Alan G. Konheim. The only book I haven’t read or at least heard of in the list.

Mathematical Theory of Communication, by Claude E. Shannon, Warren Weaver. The original ground breaking paper.

Computation: Finite and Infinite Machines, by Marvin Lee Minsky. Minsky doesn’t need any introduction. This book is from 1967, I wonder how relevant it is.

September 29, 2004

life’s little amusements

Filed under: Uncategorized — Muli Ben-Yehuda @ 12:41 AM

I just received an email from a VMWare recruiter. Those of you who know the sort of subjects I’ve been interested in lately might find it amusing, or perhaps ironic is a better word.

September 21, 2004

how to get around the hardware standards

Filed under: Uncategorized — Muli Ben-Yehuda @ 1:22 PM

Reading Rob Pike‘s Systems Software Research is Irrelevant.

Rob mentions that a large amount of work goes into supporting standards. These include application level standards (e.g. HTML / HTTP), system level (e.g. POSIX) and hardware level (buses, instruction architectures).

Solving the third one is easy – just run everything under a hypervisor. That makes the hypervisor a “standard” you must write to, but hopefully, it’s a much simpler standard.

Solving the first two is more difficult. I am especially interested in “magical POSIX compatibility” for a LISP operating system…

September 20, 2004

emacs geekery

Filed under: Uncategorized — Muli Ben-Yehuda @ 10:49 AM

I have no idea why I haven’t done this years ago.

(global-set-key "\C-x\C-f" 'find-file-at-point)

September 15, 2004

todoo.el 1.6

Filed under: Uncategorized — Muli Ben-Yehuda @ 10:19 AM

New todoo.el is up.

One conceptual problem that I’ve been struggling with wrt todoo.el is how to properly save the folding state whenever it changes. The problem is that changing the folding state does not make emacs think the buffer has been modified, so emacs will happily let you close it without saving. What I did at first was hook into todoo’s “save and exit” function, which is fine if you hit ‘todoo-save-and-exit’. But what happens if you just hit ‘kill-buffer’? lossage. So then I hooked into ‘kill-buffer-hook’, which fixed the ‘kill-buffer’ case. But what happens if you hit ‘save-buffers-kill-emacs’? again, lossage.

Last night the correct solution hit me in the face. If the problem is that changing the folding state does not cause the buffer to be modified – fix that. Just call (set-buffer-modified-p t) wherever we change the folding state. Did that, it works. Yay 🙂

But this is only half of the solution. The second half is saving the metadata whenever you save the data. ‘save-buffer’ has several hooks, including ‘after-save-hook’. Trying to get it to work led to some interesting effects, because my ‘after-save-hook’ called a function that ended up saving a buffer, which called ‘after-save-hook’, which called my function, etc, etc, ad infinitum. Fixing that was pretty simple – just nil the hook in the lexical scope of my function so that it does not get called again.

Then I hit another bug, that apparently existed since the first day. My code to serialize the folding state into the metadata buffer changed the location of the cursor on the screen. I never saw it, because the buffer was always destroyed after saving the metadata previously. Now that I saved the metadata on every save, it was very visible and annoying. I wrapped it in ‘save-excursion’ – no change. I saved and restored the point manually – no change. After some minutes of head scratching and debugging, the culprit ended up being a call to ‘end-of-buffer’, which effects the scrolling status of the buffer. Well, duh! the help for ‘end-of-buffer’ even says “Don’t use this command in Lisp programs! (goto-char (point-max)) is faster and avoids clobbering the mark.” And that works like a charm…

Ergo – todoo.el 1.6.

listening to music with my new headphones is such a joy

Filed under: Uncategorized — Muli Ben-Yehuda @ 9:48 AM

Currently listening to Rage Against The Machine’s “Know Your Enemy”, and the base is just amazing. Thank you for the headphones, ladypine!.

September 12, 2004

Filed under: Uncategorized — Muli Ben-Yehuda @ 6:06 AM

05:47 AM in the morning, and I’m awake. Un-fscking-believable. Does feel good, in a weird sort of way – its been a while since I’ve seen the dawn.

« Previous PageNext Page »

Blog at WordPress.com.