Muli Ben-Yehuda's journal

October 31, 2004

the daily summary

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

Today was:

  • pretty dull at work, many meetings and lectures with far too many
    people who talk too much.

  • pretty good at home, where I actually studied some Computability
    (yay for Goedel numbers and Universal Turing Machines!) and had dinner
    with Orna.

  • not much hacking, but I did get around to testing that trident
    still works with 2.6.9. Amazingly enough, it does. This is the driver
    that just keeps on going. As soon as I post this, I’ll play a bit with
    movitz. Trying to decide what to do with it. Implement rudimentary
    multi tasking support (i.e. context switch)?

  • didn’t make it to the gym, but I did exercise at home, in front
    of the Last Samurai (yet another inspirational movie in my arsenal of
    inspirational movies) . I’ll be at the gym tomorrow morning.

All in all – a good day. I want more days like this!

Advertisements

Donald E. Knuth, Computer Programming as an Art.

Filed under: Uncategorized — Muli Ben-Yehuda @ 10:59 PM

Tonight’s reading is Donald
E. Knuth’s
Turing
award
lecture, Computer Programming as an Art.

“Therefore I want to address my closing remarks to the system
programmers and the machine designers who produce the systems that the
rest of us must work with. Please, give us tools that are a pleasure
to use, especially for our routine assignments, instead of providing
something we have to fight with. Please give us tools that encourage
us to write better programs, by enhancing our pleasure when we do so.”

Words to live by. I have rarely heard a better elucidated reason to
use free software.

serendipitous weekend

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

’twas a serendipitous, domesticated weekend. A fun weekend, by any measure. We spent Friday at home, cleaning in between bouts of watching the final chapters in the 3rd season of 24 (or was it the other way around?), Orna cooked delicious meals, and all was fine at Casa Orna & Muli.

On Saturday, we had lunch at Orna’s parents, and visited my grandparents in the evening (something we don’t do nearly often enough). They showed us their wedding album, which took place approximately 50 years ago. Incredible. Orna’s parents gave us two book cases, which we put in the living room, and immediately set about filling with books. We are now at the most unnatural state of having more book shelves than books. I immediately set out to rectify the situation by shopping first at thinkgeek (actually, I was looking for a coffee mug there) and then at amazon. Thinkgeek refused to accept all three of our credit cards due to some unknown yet consistent screwup at their credit card provider. It should not be this hard for me to give you my hard earned money, damnit! (still, I want the stuff enough that I’ll actually call customer service on Monday and attempt to order by phone).

On amazon, I bought volumes three and four of James Newman’s World of Mathematics, and Hawking’s On the Shoulder of Giants.

I went to bed reading Bertrand Russell’s My Mental Development, and fell asleep just before my brain exploded.

This morning started with a great gym workout, the first of two today. This one was aerobic, the second one, together with Orna in the evening, will be weights training. I’m looking forward to it.

October 26, 2004

the simple pleasures in life

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

It’s midnight, and I’m sitting on my parents living room couch, waiting for my turn in the shower. We just came back from the Lichi thai / japanese restaurant, where we’ve spent a fun-filled evening with Gilad, his coworker Polo (whome Gilad calls by a different part of his names), guy, Oleg and Tzafrir. Much fun was had.

The evening started with Gilad giving a talk to Haifux on the Astrisk open source PBX system. It was a pleasure to hear a Haifux talk on a subject I know nothing about. The subject itself is not the most interesting to me, but Gilad is a very good speaker, and the talk went very well.

When the talk ended, I reached for my cellphone to call Oleg, who was burning the evening oil at the office, to come and join us for dinner. There was a message waiting. From our land lord. Calling to say that water was flooding the apartment of the neighbours right below us, coming from our apartment. The neighbour turned off the water to our apartment. We drove home in a hurry, and discovered that the water heater’s piping broke and flooded select areas of the apartment, not to mention the apartment below us.

We made a few phone calls and someone will come to fix it in the morning. They suggested to come and shut down the water supply to our appartment, as an emergency treatment. Orna could not stop laughing. So until tomorrow at least, we are water-less. Rather than stay home and mop (ha ha, I made a pun) we went to the restaurant, had a great couple of hours, and then stopped at my parents place to shower.

Speaking of the shower – looks like Orna is done, and it’s my turn. The small pleasures in life, e.g. having working water supply…

[Orna edited this entry while I was enjoying the shower. Thanks, Orna!]

October 25, 2004

Locking user space memory

Filed under: Uncategorized — Muli Ben-Yehuda @ 3:10 PM

A common question is “how do I lock user space memory?”. The context is usually when the memory is going to be used for DMA to or from a device.

The best way is to have user space request the memory from your driver via an mmap() on a character device files. Sometimes, however, this is not feasible. In those cases, you have two choices:

– If you have control of the user space application, use the POSIX mlock() and munlock() APIs.

_ if you only have control of the driver side, use the get_user_pages() API in the kernel. lwn.net has an excellent article on get_user_pages, and common pitfalls.

October 21, 2004

Neal Stephenson on /.

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

Magnificent stuff.

Just in time, it seems my copy of The System of The World has arrived. To the post-office, then!

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.

Blog at WordPress.com.