Friday, December 30, 2005

Analogy

In the class today my faculty who teaches me java, gave an analogy for locking by threads while using shared resource. The concept is every thread must obtain a lock on a shared resource before using it and it should release it when the thread has performed it's task so as to avoid deadlock condition and phantom values read by other threads. In this way The example which he gave which was in turn given by his faculty goes like this… thread is you and shared resource is the toilet. You have to lock it from inside before you use it. In this way everybody will be able to use it without any conflicts. Be in a queue and wait for your turn. An excellent analogy to explain the concept. But still I feel just in case if a thread takes too long to finish off with the shared and locked resource other threads will have to wait till it finishes. It is fine with threads to use the resource whenever it is freed, but are we going to need the same resource like a toilet after waiting in a queue for so long?

Thursday, December 08, 2005

I'm on DeviantART!

Check it out - http://bottlehed.deviantart.com

So far, i've uploaded two wallpapers. I'll be putting up stuff as and when i'm done with them.

Sunday, December 04, 2005

Splendid...Stupendous...Sunrise…

Normally I go to sleep at around 3 in the morning, but today I was awake till 5 and realized the world around me has started stirring with the sense of a coming day. My hostel is in the Rajeev Gandhi Information Technology park, Pune. Surrounded by rural area the nature here has its own charm. Me and Kushan, my friend, decided to go out and have a cup of tea at a roadside hotel which opens at the wee hours. It was 9 degree Celsius outside, I had just checked it on the net, in the darkness and cold we went to the hotel, had 2 plates of 'garam bhaji' (pakoda) and tea. By this time the first light had fallen on the soil…well not exactly, it was still in the sky...and I could imagine what heaven is all about…cold air, aroma of soil mixed with that of green leaves and dew, layer of fog fallen on the bushes and trees. It was just amazing. I have never seen such a beautiful and spectacular morning before. The sun was yet to rise, I decided to catch the sunrise in the camera. I went up in the room got hold of the camera and started capturing the magnificence of the morning and tender orange flames before sunrise. I urge you to have a look at it in the photo album section, the name of the album is- "Sunrise. November 26,2005" .
Do try to catch the sunrise from wherever you are, it comes live everyday. You may have to make an effort to get up that early.. Or try my way, go for a walk before you go to bed...