Collection of Distributed Systems Papers - My Reading List

>> Friday, October 31, 2008

After my oral qual, thought of putting out my reading list which has set of selected scholarly papers, book chapers, presentations, etc.

Hope this will be useful for some one.

In addition to these, I also read couple of good papers related to clouds.

Read more...

How to Shoot Yourself In the Foot and more

>> Thursday, October 23, 2008

Today when I went to pickup some of the papers I printed, I found an interesting article on the table near the printer titled "How to Shoot Yourself In the Foot". (I assume this was printed by someone from programming language group :) ).

Then I searched for that title soon after coming home and found this interesting article on the Web. There were many hits for the same thing but this particular site is interesting as it had lot more interesting jokes, like If cars were like computers , Hacker test, The Qualifying Examination, Hacker test etc.,

And this professor also has an interesting list of book recommendations, films, etc., in this main site here.

Read more...

Hacking with Bits in C

>> Saturday, October 18, 2008

Recently one of my friends came and ask me this interesting question.

"Write a one line C code to check whether a given number is a power of two. Can you do that within 10 mins?"

Here is the answer : bool f = !(v & (v - 1)) && v

If you happen to have the answer bool f = (v & (v - 1)) == 0 , it will give 0 also as an answer, which is wrong.

I then found more like these, bit hacking codes, here.

Read more...

Getting Dual Monitors Working with Ubuntu on Your Laptop

Most of the forums will give information on how to get the dual monitors work with a desktop. But I didn't find any resources on doing this on a laptop.
Also, here dual monitors mean, I am using my VGA output to plug-in another monitor.

Even though doing this is damn easy, it is not properly mentioned anywhere. Here we go.

1. First backup your xorg.conf
cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak

2. Open up xorg.conf in your favorite editor
sudo gedit /etc/X11/xorg.conf

Most of the time, you will see something like this, towards the end of it.


Section "Monitor"
Identifier "Configured Monitor"
EndSection

Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
EndSection

Even though I ran a config tool, it didn't change my xorg.conf.

3. Replace the above part with the following.


Section "Device"
Identifier "Configured Video Device"
EndSection

Section "Monitor"
Identifier "Laptop LCD"
EndSection

Section "Screen"
Identifier "Default Screen"
Monitor "Laptop LCD"
Device "Configured Video Device"
DefaultDepth 24
SubSection "Display"
Depth 24
Virtual 2720 900
EndSubSection

EndSection



4. You need to change the line starting with "Virtual".
the value 2720 in the line Virtual 2720 900 is sum of horizontal values 1280 and 1440 of my two monitors and the vertical I left the higher 900.

You can get the monitor sizes by going to, System -> Preferences -> Control Center and then click on Screen Resolution. You should see two monitors in that.

Then save xorg.conf file.

5. Now reload X by pressing ctrl+alt+backspace. This will log you out, so make sure you save all your work before pressing that.

6. Once you login back, type xrandr --output VGA --left-of LVDS . You should now see its working.

7. Now if you leave it like this, then you will have to execute step 6, each and every time you login. Not only that, since you have configured the xorg.conf statically, you might have problem with the displays, if you try to start without the extra monitor.

So you have to do the following to get the real "plug-n-play" capability.

To do this get the script from here and save in to the file "/etc/X11/Xsession.d/45custom_xrandr-settings".

That's it.

As you can see, this uses a basic trick. This will create a one large window merging two screens. That is why you set the virtual line in the config file, as the sum of horizontal values, so that each monitor will show a portion of it.


Resources :

[1] : http://www.thinkwiki.org/wiki/Xorg_RandR_1.2#Now_automate_it_on_login
[2] : http://ubuntuforums.org/showthread.php?t=875045#post_message_5943883

Read more...

Good Resource on C Shared Libraries

>> Monday, October 13, 2008

I am having some trouble these days with shared libraries and JNI calls. This guide gives very good concise information on working with shared libraries. Yet to find a better resource on JNI, other than java tutorial.

Read more...

Good Distributed Systems Papers - Part 2

>> Tuesday, October 07, 2008

While preparing for my exam, I encountered couple of very good papers on various aspects of distributed systems. Thought of listing it here for the benefit of everyone, including me :). (One might also wanna look at my previous blog also listing some good papers. )

Read more...