Device drivers in Java?

The following tweet by @DSpinellis:

#USENIX @AnnualTech M. Renzelmann Decaf: Moving Device Drivers to a Modern Language (Java). He says performance impact is 1%

talks about “Decaf: Moving Device Drivers to a Modern Language” which describes a system where large parts of a driver can be written in a better language than C, the example here being Java.

I was certain that this was not the first time I had read about such an idea. This weekend I was able to go through my archive and find out the reference. Back in January 1997 in the NT Insider (Volume 4, Issue 1) Peter Viscarola, while criticizing the multitude of startups founded by anyone who could code a Java applet (this was a pre-dot-boom era remember) wrote:

It’s obvious that we are missing a real opportunity here to capitalize on the convergence of these trends. We need to immediately fund a start-up company to develop a package for writing Windows NT drivers in Java. THINK of it! We could have processor architecture independent device drivers that don’t even need to be recompiled in order to support X86, PPC, and Alpha machines! Amazing! We could create a visual driver development environment, complete with cute animated assistants. And, the drivers could probably have a visual component to them, so you could actually see your toaster-oven driver doing its work. Cool! THEN we could all be challenged, and have fun, and get rich at the same time. Wow! Why didn’t I think of this before?

It would be nice if we could see Peter’s views on the subject 12 years later.

Practical Reusable Unix Software

(I think I bought mine sometime in 1997. The price tag says £26.50 which means that I had UrBaN buy it for me.)

Το βιβλίο γράφτηκε το 1995 και είναι ενδεικτικό των εργαλείων, αλλά και της φιλοσοφίας που επικρατούσε στην AT&T Research εκείνη την εποχή. Χάρη σε αυτό έμαθα για το graphviz (που με βοήθησε να φτιάξω ένα από τους πρώτους χάρτες του 6BONE αλλά και του irc.gr), το UWIN (οπότε και κατάφερα ένα από τα πρώτα native ports του netcat), τη vmalloc (που πάντα ήταν χρήσιμη όταν κάποιο πρόγραμμα είχε προβλήματα memory allocation – π.χ. το CLP(R) με κάποιες GLIBC της εποχής). Το σημαντικότερο όμως που μπορεί να προσφέρει αυτό το βιβλίο ακόμα και σήμερα, 14 χρόνια μετά και με μερικά από τα εργαλεία που παρουσιάζει όχι και τόσο χρήσιμα, είναι ο τρόπος σκέψης: ορισμός προβλήματος, προσέγγιση, αρχιτεκτονική και λύση. Και αυτά in a system administrator’s way.

Το βιβλίο είναι διαθέσιμο σε μορφή PDF και το software που περιγράφει (αλλά και άλλο νεώτερο) βρίσκεται στο http://www.research.att.com/sw/tools

[via]

Windows shutdown

This is a photograph that I took while passing by a colleague’s desk:

shutnever

I know that at the end of the day everyone wants to go home (or for a walk, or whatever) but please wait the extra seconds to make sure that your computer actually shut down. What if it was Friday?

reboot before dist-upgrade

[ Παρόλο το debianism του τίτλου, αυτό είναι ένα γενικότερο post ]

Πριν από δραστικές αλλαγές στο λειτουργικό σύστημα ενός server, καλό είναι να γίνεται ένα reboot. Ειδικά εάν έχουν περάσει αρκετές ημέρες (μήνες, χρόνια) από το προηγούμενο reboot. Οι εξαρτήσεις στο πολύπλοκο περιβάλλον που ζουν οι servers φτάνουν σε σημεία που δεν μπορούμε να ελένξουμε ή δεν θυμόμαστε πάντα από μνήμης (Documentation; Τι είναι αυτό;).

Για αυτό ένα reboot πριν μια θεμελιώδη αλλαγή επιβάλλεται. Downtime is an option, αρκεί να μπορούμε να έχουμε μια ιδέα τι το προκάλεσε. Μετά π.χ. από ένα dist-upgrade από Etch σε Lenny, δεν είναι σίγουρο πως θα μπορεί να εντοπιστεί το πιθανό πρόβλημα στην αναβάθμιση του software ή σε μια άλλη εξάρτηση που έχει προστεθεί στην πορεία και δεν μας περνάει από το μυαλό.

Αλλάζουμε μία μεταβλητή (από όσες ελέγχουμε) τη φορά και θυμόμαστε πως συνήθως εάν ένα ext3 filesystem δεν έχει γίνει fsck για περισσότερες από 30 μέρες, θα κάνει fsck στο επόμενο reboot. Είσαι σίγουρος πως αυτό θέλεις να είναι το reboot του dist-upgrade;

Fear of rebooting.

XandrOS presto

I have been a XandrOS user ever since their first released version of desktop Linux. The reason that I stopped using XandrOS 4 was that I could not compile ns2-2.31 on it (which meant switching to Ubuntu and later to Debian/Etch; this desktop now runs OpenBSD). So when XandrOS emailed me an offer to install Presto, I gladly did.

If there is one way for Linux to conquer the desktop, distributions like Presto are the way to go. If most of the time that you use your computer you browse the web why not use an operating system that boots faster (11 seconds on my HP 530 laptop) and consumes less energy while at the same time your documents are accessible? Everyone seems to be riding the green computing wave and judging from my laptop’s battery, Presto is greener than Vista. Plus their email support is exceptional and they follow back when they haven’t heard from you for a day or two.

Presto installs as a three-click (next, next, install) application from within Windows. I can’t wait for a standalone installer for my Aspire One A110L.

crypt(3) archaeology

There seems to be a bug biting crypt(3) on Lenny amd64. On such platforms when using crypt(3) with the traditional DES scheme you get a segmentation fault. You do not get this when using the Modular Crypt Format ($digit$ password hash style). Fortunately, for the problem I was facing, I located and used the crypt(3) implementation from the Seventh Edition Unix. It is available from The Unix Heritage Society thanks to Henry Spencer.