• NetBSD: File system directories, part 1

    A file-system directory is an object that maps file names to nodes (i-nodes in UFS terminology). When given a file name, the directory must be able to tell whether it has that name or not and return the node number attached to it. File names are not stored in the nodes themselves as this allows for hard link creation flawlessly: you can have multiple directory entries pointing to the same file with no extra cost.

  • Got new laptop: iBook 12'

    I never blogged about this before, but around six months ago, I bought a second-hand iBook 14", G3 at 600Mhz with 256Mb of RAM. The machine has served me very well during this time although I felt its slowliness (specially under Mac OS X) to do common tasks: buildling stuff (university projects) and composing documents under OpenOffice.org. I also felt its weight when carrying it on my backback. However, a friend of mine offered to buy it for a reasonable price some days ago.

  • Java: The finalize method

    I recently discovered that Java has finalization methods for objects, just like C++. However, they do not behave the same way due to Java's garbage collection. In Java, a finalization method has the following prototype: protected void finalize();, which is inherithed from java.lang.Object. This method can do any task it wants to explicitly release resources owned by an object. In C++ you have the following expectation: a finalization method is called whenever the object ceases to exist.

  • Delta modulation

    In a previous post, I outlined how the Pulse Code Modulation (PCM) works (it was not the aim of the article, but it contains this information). Let's now see another modulation technique used for voice signals, the Delta Modulation (DM). The DM codifies each signal sample using a single bit, which is determined from the previous sample's value and the current one. The bit specifies whether the new sample is higher than the previous one, hence only describing the variation in the information (and not its contents).

  • Java: Dynamic class loading

    One of the things I like most about Java is its ability to load classes on demand. Given its interpreted nature, the virtual machine can detect when a class is not yet loaded and bring it to memory transparently; think of this as page faults and the MMU handling them. Even more, you can ask it to load a specific class based on its name, which allows you to design powerful abstract models painlessly.

  • USB mouse, pbbuttons and lack of udev

    When I have to do intensive "graphical" work on the iBook, I often connect an external USB mouse because I find the touchpad uncomfortable. However, I've been suffering a problem for a long time: the pbbuttons daemon did not recognize it, so it didn't detect activity and shut off the screen every now and then. I was so tired of this annoying behavior that I sat down and looked for the problem.

  • GNU Zebra

    This semester, I'm taking a course (PIAM) about Internet protocols at the university. One of its main subjects are Internet routing protocols, of which we've seen RIP and OSPF as IGPs and BGP as the EGP. In order to see their functionality in action, we set up a set of machines to simulate the Internet and/or isolated LANs, using the protocols mentioned above. You can imagine that we needed many routers to get this working (around 20), as all the class had to practise the same thing at once.