• EDA, multi-cores, Chennai and the rest of my summer

    While my last summer in Jaipur was nothing more than a monotonous drag, this summer has been a lot more fun than I thought! For one thing, I'm working on a really interesting, fun and challenging project which is awesomely titled, 'Multi Core Electronic Design Automation', the aim of which is about trying to close down the so called 'design gap' as far as EDA tools of today are concerned. With the end of the unicore era, our processors are no longer becoming faster (wait, let me explain). Having two or four or one million cores isn't going to make your Quake I game run any faster because Quake I, isn't multi threaded and will utilise only _one_ core of your multi/many core architecture. So as they say, the free lunch is over and we've really got to change our approach to solving real world problems using computers. We need to make sure that our algorithms can be parallelised and they're scalable as far as an increase in the number of processing elements is concerned. EDA is a field that's been badly hit by the transition to the multi core age because Moore's law isn't exactly slowing down and hence, the complexity of the hardware to be designed is growing at a rate that is much faster than the rate of improvement in the tools that exist to design the said kind of circuitry. With the kind of time to market constraints that exist today, hardware designers are having a rather tough time keeping up and this is where the need to parallelise EDA tools becomes of utmost importance because these tools are yet to grow out of the unicore era. How do we make better use of the increased computational power that multi core architectures offer? What kind of changes do we incorporate into the algorithms used for VLSI design? These are the questions that are to be answered in this research and it's really fun to be giving this problem a shot!

    Apart from my project, we've had two LUG-Jaipur meetings here in MNIT in a gap of 2 weeks. You may check out the pictures from the event here. Furthermore, I'd been to IIT-Madras for the OPECG-2009 workshop (Optimising Performance of parallel programs on Emerging multi-Core architectures and GPUs, which is by the way, the worst abbreviation ever). The workshop was rather disappointing owing to the fact that they didn't keep most of their promises and ended up being more or less introductory. Since we'd already been working on parallel programming technologies, we found the whole workshop rather basic. But on a more positive note, I got to see IIT-M and Chennai in general. And the taste of good old south Indian food was quite a relief!

    Guess I'm done for the time being. I anxiously await the Sun Code For Freedom (CFF) results that will be out next week. It'll be interesting to see which awesome project ends up winning. :)

    Cheers!

  • Never heard of mobile etiquette have you?

    Mobile etiquette is something I've been wanting to write about for a while. Since I'm the essentially negative bastard that you all know and don't love (at all), I'll be pointing out _what_ doesn't count as good etiquette when it comes to using a cell phone. As with every other rant of mine, this article is the culmination of a bad experience as well, which I'll merely narrate (what does not qualify as etiquette is rather self explanatory). So let's go back in time to the afternoon of the 13th of May, 2009.

    * The screen fades into a bubbly distortion... and reappears in black and white *

    I'm on a Volvo bus en route to the Bangalore international airport and I have close to two hours to burn on the bus. I decided against reading Digital Fortress while on the bus, because the ride wasn't as smooth as I expected. Ah well, I can always stare emptily at the ever busy Bangalore commuters can't I? The bus comes to a stop at Shivaji Nagar bus station. A fat elderly man dressed in formals with a tie (the Bangalore based business man look, they're all old and have bellies that would put sumo wrestlers to shame, trust me) boards the bus and sits right behind me. Ten minutes pass by, Murphy suddenly wakes up in the realm of ether, and decides that my life is way too smooth...

    * The Nokia ring tone plays, the typical Bangalore based business man prefers this, I wonder why *

    I slowly lay back on the comfortable seating, the silence of the air conditioning filling the space, when suddenly...

    Fat-ass-business-man: "HELLO SIR!"....

    (I nearly slam my face on the head rest of the seat in front of me...)

    FABM: "YES SIR? I CAN'T HEAR YOU!"

    (Me: How can you if you're screaming so loud yourself?)

    FABM: "YES, I'M ON MY WAY TO THE AIRPORT, BLAH BLAH BLAH...."

    (Note: the BLAHs are in capitals as well, indicating the fact that he maintained the decibel level throughout the conversation. Finally...)

    FABM: "AH YES SIR, GOODBYE..."

    (I recline back into the comfort of my seat... peace has dawned upon my world again... when yet again...)

    * The Nokia tune plays *

    (Me: Holy fuck...)

    FABM: "BLAH BLAH BLAH"

    (Me: The deaf have all the fun...)

    This ridiculous cycle goes on for around an hour because I think his battery ran out of charge after that. I was glad no one came up with solar powered cell phones or I'd have had to endure this ear drum drilling for another hour or so.

    * Fast forward to an hour ahead *

    The airport looks just as majestic as it was when I came here a little less than a year ago for my CA induction programme. I guess I reached a little too early (2.5 hours before departure time). I take a seat directly opposite to the Indigo Airlines boarding pass counter and immerse myself into Digital Fortress.

    * An hour and forty five minutes later *

    I'm at Gate number 8, done with all the formalities and wondering why the security official found my Sun Token Card suspicious (I wanted to tell him it was a calculator, but jail wasn't on my 'places-to-visit-before-I-die' list). Anyways, I'm back to reading Digital Fortress (boring book actually, most things were rather obvious from the start). A few minutes later, a bunch of Kannada speaking people sit around me. Their hand baggage included gunny bags, cartons and sacks and it was at that precise moment that something dawned upon me all of a sudden. My face turned to an expression of horror as I remembered the common thread of unity that all passengers who travel with gunny bags, cartons and sacks share; Their over enthusiasm about traveling by flight :|. I turn to my right to find the guy sitting next to me punching numbers into his cell phone. He was so zealous about it, he mistyped the numbers the first time. And the second time, the call connected...

    * Life's a bitch... *

    Kannada-speaking-over-enthusiastic-guy-traveling-with-gunny-bags-sacks-and-cartons-number-1: "<LOUD KANNADA>"

    (The guy on my left to his friend on the phone, screaming into my left ear and his friend hearing it through my right)

    KSOEGTWGBSACN 2: "<LOUDER KANNADA, AMPLIFIED BY THE POINT BLANK RANGE>"

    The rest of the gang: "<COMMENTING ON THE CONVERSATION GOING OVER THE PHONE>"

    (Me: How would you assholes like it if I castrated you all with a U-238 coated chainsaw?)

    The torture goes on for the fifteen minutes that the prick spoke over the phone, and then this idiot screams the minute by minute details of the conversation into my right ear, while his friend receives the signals through my left. I started wondering whether I was dead and I was a ghost who they couldn't see. This went on for another five minutes when I finally blew my top, but strangely enough, I was polite:

    "Sir, would you like to sit here? I could go sit elsewhere?"

    "YES YES, THANK YOU VERY MUCH!"

    (Thanks for the parting present you bitch...)

    And I literally fled for the vacant seat next to a man who was too engrossed with his laptop, diagonally across the waiting hall from where I was sitting. It took my ears around twenty minutes to stop ringing. With this, I shall summarise what mobile etiquette is all about:

    1) If you're travelling, shut the fuck up and stick to messaging.

    2) If you still insist on speaking, shut the fuck up. If you can't STFU while you're around others, you might want to kill yourself before you breed. We don't want another generation of your kind.

    Because frankly speaking, no one really cares about that new deal that you struck, or whether your wife picked up the kids on her way back from the grocers or anything else for that matter. If you can't talk in a low voice, the least you can do is to ask to be excused, walk away from the crowd and carry on with your conversation. Please people...behave!

  • FOSJAM 2009 @ JECRC

    The Jaipur Linux Users Group (LUG-J) organised it's second event, FOSJAM 2009, on the 16th and 17th of this month at JECRC, Jaipur. Being one of the proud members myself, I knew I just had to be a part of it! The event had a participation of around 280 students from a multitude of colleges in Jaipur. The event also featured talks by familiar names from the Indian FOSS community which included Vivek Khurana (no_mind), Shakthi Kannan (mbuf), Atul Jha (koolhead17) and Varad Gupta. Although it was decided that I'd give only one talk (on Open HA Cluster of course!), I ended up giving two. On the 17th, the event got a little delayed and hence, I decided to take up the task of keeping all the participants busy. So after gathering them all into a hall, I had a long and informal session on FOSS, why it is the best thing in the world for students, how to go about contributing and the whole idea of community driven contributions. The students were quite enthusiastic and I also ended up answering technical questions from all kinds of corners like MINIX versus Linux, using Makefiles, python, the quicksort algorithm and a lot lot more! The event then continued as per plan and I really enjoyed meeting more and more students. I was also surprised at the number of students who recognized me from the previous workshops I'd conducted including Helios and Fotia. :)

    The Open HA Cluster talk started at 3:30 PM, and went on perfectly. I also got a good set of doubts from the students including what would happen if the cluster was partitioned such that there N/2 nodes in each partition (this was asked while I was explaining the split brain condition). There was another reasonably good doubt that I just can't manage to recall right now. :|

    The event was quite an experience all in all, you can check out the pics over here. By the way, my college (Malaviya National Institute of Technology, Jaipur) is now the official host for all LUG-J meetings, the next of which will happen on the 26th of this month itself. Looking forward to meeting ya'll again!

  • My one week long vacation

    On the 5th of this month, I reached Bangalore and was all set for my rejuvenation. I saw my nephew for the first time and he was far more adorable than he seemed in the pictures of him I'd seen. Really feels nice being an uncle :). The very next day, me, Suvha, Bharadwaj and Akshay set out for a day long trip to Srirangapatnam and Mysore and it was an awesome trip all in all! I suddenly transformed into this wannabe photographer, as me and Suvha went around taking as many snaps as possible (some of them were quite creative I'd say, for my standards at least). You can go through all the pictures here and here (split across two albums). The following Saturday, me and Aditya spent a whole day aimlessly roaming around Bangalore. To give you an idea of how vetti (jobless) we were, I'll tell you this. We were watching 'Fast and the Furious 4' at Inox at 10:30 in the morning :|. The movie sucked royally, and they actually managed to turn a wonderful series centered around cars and street racing into just another police-trying-to-nab-a-druglord story with just one race in the whole movie! Lunch at Cafe Masala followed (the place where we CAs were taken to during our induction training programme) where we made short work of the buffet over a span of 2.5 hours :P. I won't tell you about the rest of the day, since I really don't want to give my readers a mega dose of virtual sleeping pills because that's how boring it was. On the 11th, I went to the Sun office to get some of my work wrapped up. It was fun working at the office; I also got to meet a lot of my fellow CAs who were doing their summer internships at the IEC itself. After lunch, I worked on HA-Cron to fix the stale value(s) bug that it had during node shutdowns along with Swathi Devulapalli, one of the cluster engineers. Although we didn't manage to fix the problem, she helped me gain a whole new insight into agent development itself. (NOTE: I fixed it three days later after I got back to Jaipur, and HA-Cron works like a charm now, it's also out there contending for the CFF prize :) ). My flight back to Jaipur was on the 13th, and a book (Digital Fortress) kept me company all throughout. If you're reading this and you're saying, "DUDE! YOU STILL HAVEN'T READ IT?", then yes, I am ashamed. I left my reading habit around seven years ago. Anyways, it's back to Electronic Design Automation for me. Adios!
  • Port forwarding for internal webservers in case of a non-transparent proxy

    Assume that you're running a two interface firewall setup using Shorewall for your institute LAN. Suppose you have an internal webserver that you want to be made visible externally as well. To achieve this, you'd normally do a port forward using DNAT. Although this method gets a FAIL when it comes to security, it's usually the easiest thing to do. The suggested alternative would obviously be to get an extra NIC and setup a DMZ but anyways I'll be talking about a two interface setup here. Now this port forwarding thing works fine but what happens when a host in the internal network tries to access this website through the URL? The request will go out of the network, come back in and the response would follow the reverse route and this will take ridiculously long! There are two workarounds for this. The recommended method would be to configure your internal DNS to respond with the internal IP when a DNS query for the webserver's URL is received. The other method would be to have your gateway masquerade as the internal webserver, which is nothing short of a quick hack and note that this is also rather poor when it comes to security. As per the shorewall website, for a transparent proxy, you'll need to add the following rules.

    Example IP addresses:

    Gateway's external interface (eth0): 210.45.21.55

    Gateway's internal interface (eth1) : 192.168.1.1

    Internal Webserver: 192.168.1.10

    So here come the rules:

    In/etc/shorewall/rules:

    REDIRECT        loc     3128    tcp     www     -       !210.45.21.55

    DNAT              loc     loc:192.168.1.10      tcp     www     -       210.45.21.55

    In/etc/shorewall/masq:

    eth1:192.168.1.10        eth1           192.168.1.1      tcp     www

    In /etc/shorewall/interfaces, make sure you have the 'routeback' option enabled for eth1.

    Now here's the part that you won't find in the shoerwall documentation. In case you're migrating to a non-transparent proxy, add the following rule after the above mentioned DNAT.

    DNAT    $FW     loc:192.168.1.10:80      tcp     80      -       210.45.21.55