An evening well spent – BOSUG meet
Posted by Balachandran on September 13, 2009
Hello folks, BOSUG met after a long time and I went for the meet, again at Sun offices Bangalore. It was again an interesting evening, well spent, learning lots of new things. Moinak and Anil spoke on interesting things that held my attention all through the evening.
The turn-out was even lower than the last time. We had about 10 people, including the Moinak and Anil. Moinak started off with his talk on filesystems. He opened up OpenSolaris source and initially went through the way it is organised before jumping into the fs/ directory. For the sake of simplicity, he took up a read-only file system, hsfs that is used in CD-ROMs(iso9660 formats). He went to the code at a higher level, without going into too much of specifics. But still, covered most part of hsfs and explained all operations defined for that. He also explained how the code handles simultaneous device request for same data, by uping a semaphore and then directing the second of the requests to the cached copy of the data in the memory. Only now I understood that even for a read access, if it is to a device, it does a lock and unlock, so that other processes accessing the same data need not access the device, even if the requests are simultaneous. They can access the memory location to which this data has been stored by the process that had read it from the device. The reads from the memory are of course simultaneous. But the coolest aspect was when he took Sriram’s laptop and wrote an DTrace 1 liner and generated a funcation call flow text output for doing a “ls” command on a iso9660 type device(in this case, an opensolaris CD) and explained why all thse calls were there in brief(for most of the calls that were made. After a long time, realised that I should have learnt that great, cool stuff called DTrace. It is really amazing.
Then, Moinak spoke about spec files and how they are used for generating packages. He also pointed out the that they were used both by Fedora’s RPM and by Belenix. He opened up a few spec files and went through them. They way to add CFLAGS and LDFLAGS were also explained by him.
Then, Anil explained the debian version of the “spec” files. He explained how Debian packages were built and that sources would also have a folder named “debian” in them and that would have all the necessary files. The files that he went through were the “control” file and the “rules” file. It is in these files that the sources to be built from and the packages that would be obtained are defined. From a single source, many packages can be built. Anil also explained the basic difference between the Debian’s type and other “spec” files. In Debain, we need to do “apt-get source pkg-name” to get the source and have it locally before building the package. But in the other “spec” files, we can also specify the site from which the sources are to be downloaded.
Anil then spoke about CHDK, a firmwire for cannon cameras, that can make the camera do wonders. The image that he showed were really breath-taking. Effectively, what this project has done is that a new firmwire that can boot from the SD memory card has been developed. With this, the camera even allows users to write small scripts to automate tasks. We can make the speed as great as 1/60000.. Something that is really amazing. He showed images that we captured using that camera that had captured a droplet of water rising from the surface of a cup of water, if its surface was disturbed. He spoke about a lot of other great features, that were really hard to believe.
In all, it was an excellent evening, well spent with a lot of technical “chit-chat” with the other guys at the end. But, it got very late by the time I reached home though.