Project update

Posted: March 7, 2010 in B.E project

The weekly post for the project.Here are the updates.

The DEF-USE links

Finally was able to create these links.Not in the strucures that GCC maintains but created it from my programs.A simple data structure and easy to manipulate. So finally some progress made in this front. Of what remains is to integrate a lot of types of statements which can be easily managed with this. Still needs to be tuned further but progress indeed.

Detection logic is broken

The small parser that i had created to simulate the compilation has been broken. :(   So i am trying to fix it.because it failed to work properly, I had to hardcode a few things while creating the DEF-USE link. So its important to get the Detection logic working so that DEF-USE links also work in an automated fashion.

The Runtime function call

That needs to be done. The target for this week.

The next week

Unfortunately, the next week I will not be able to work much.Have to devote some time on something else which is important too. But hoping on getting some time to work. Lets see how everything works out for the upcoming week.

Cheers

X

Sandy

Dreams on Fire !!

Posted: March 2, 2010 in Personal

Did not plan on writing this post. But could not control writing it after reading something that I had been searching on the net for some time.With success finally.So here is what its all about.

Before I came to PICT, a  year earlier,  the devastating serial local train bomb blasts in mumbai took place. I was in 12th then. The bomb blasts killed 187 people and injured many others. But most importantly it changed a lot of people’ lives. About a year later, The Indian express  ran a daily story about the lives of each of those 187 victims. The stories were heart-rending, touching and shattering. I read them all. They were tales of agony, anguish ,pain and heart break.

One of those stories left a huge impact on me.It was about a 2nd year computer science student from VJTI. An poor labourer’s son, he had secured admissions in the prestigious college by standing 19th in the state’ entrance exams. His life revolved around studies and he aspired to go for higher education to the U.S and earn enough money to support his family.All of those dreams however, were bitterly cut short by the blasts. His name was Rupesh Kamble

In first year of my engineering, I kept a cutting of that article about Rupesh in my bag throughout the year. Reading it whenever I was short of confidence. Not many know this but then, I did not want anyone to know anyways. Recently one of my friends asked me , “Why did you choose Computers only?”. Well, there are a lot of reasons for that choice.Some logical while others illogical.But partly It was also inspired by this man.I did want to follow him.

My heart weeps for you – Rupesh

Here is the article that I am talking about:

http://www.indianexpress.com/news/corporation-labourers-son-was-trying-to-go-to-us-for-studies/12645/1

Symbol Table and DEF-USE links

Posted: March 1, 2010 in B.E project

Hmm..missed the routine post on the project scheduled for sunday but I guess I am not that late.Past experiences about Indian Standard time tell me – being late by about a day is not defined as late :) .okay.Enough for the sarcasm.Let me keep that for some other time. So here is the post that details the developments of the past few days with regards the project.

Symbol table generation

Since I have been working on the POC I will need this to be generated automatically somehow.Fortunately, I got a decent enough trick that can generate the symbol table. Not a full fledged symbol table like the one GCC constructs but concrete enough to test my algorithm work.

DEF-USE links

Dumping this information from GCC is a difficult thing to do.It requires a lot of effort which I am not able to put in :( .So I am trying to create a very simple scheme in which a DEF-USE link for each referenced variable is maintained.Although this is not complete and I had promised myself to complete this part at the earliest, this is now my top priority for now. Guess I will be spending the whole of the night today coding to do this.Hope I succeed.Fingers crossed.

Once i get the right DEF-USE links I know a simple way to create snapshots and that will be the point till which I think I can take the project to completion in this coming week. So hoping to fill in a post that details the developments of this week.Ciao!

Cheers

X

Sandy

What's going on with me?

Posted: February 28, 2010 in Personal

Again one of those introspective questions that I am asking to myself for the last few days.And I am unaware of the answer still. Yeh Kya ho raha hai?. Don’t know. But one thing is for sure, I am feeling extremely guilty for whatever I have been thinking lately.My mind is a complete hell.Although I am trying hard to not to act on it but the line is quite thin.

The last few days have been absolutely shattering.I have just not been able to control my meandering thoughts and all those silly assumptions that I tend to make from time to time(Its such a bad habbit).Its strange but am feeling really guilty.I must never make assumptions like the ones I am making these days.Its just uncontrollable. The more I think the more I am messing my head.

Trying to be as good to everybody and to remain calm because I know I might just explode at someone :( . Need help. “Is there no help for a widow’s son?”.

S.R.T…Take a bow!!!

Posted: February 25, 2010 in Sports

I am a big cricket buff.I just love to watch this game and love to think about it.I was a pretty decent  player in my school days too and that helped me to learn the game pretty well.Like any other person of my age, I have grown up watching Sachin Tendulkar lit stadiums all over the world with his firecracking yet artistic display of masterful batting. Records after records have tumbled in a career spanning close to twenty years and has still left his fans wanting for more.Fortunately, the hunger in the man has also not died. Sachin has not only left an indelible mark in the history of the game but an even more recognizable one on the minds of the people who have watched him play.

I am recalling a little story when I was a small kid.I remember it was the world cup-96 .I was merely 7 years old then, watching sachin bat. India were playing Australia and sachin batted like only he can.He played really well but got out when we were in a strong position just away from victory.However, from this position of strength india somehow lost the match. I was so upset that I started crying in my bed.My mother came to me and asked me what happened.She explained to me that somebody had to loose and unfortunately it was India today.Unfathomable for me, I stood up and told her on instinct,” But why should Sachin lose?He is the best.Nothing bad should happen to him”.

Such was the impression that he has had on all of us for the last 20 years.Now after achieving one more feat (highest individual ODI innings) he stands tall to be recognized as the best modern batsman this world has seen .Take a bow sachin!! You have been an inspiration for all of us through these years. Perhaps  Sachin is best described by the following quote from Mathew Hayden.

“I have seen God, he bats at no. 4 for India”

Viva Sachin!!!

Automated label addition

Posted: February 25, 2010 in B.E project

In the simulations that I have as proof of concept of my project I had always wondered if this was lacking.Slowly over the course of discussions with sarang sir I realized that this was important from the project’s standpoint.So worked on it today and could make it automated.Basically this needed a bit of parsing and was able to do it using regular expressions and precise grammar rules.

Used the lex and Yacc tool.(Since I am working on the simulation I am requiring a lot of work to be done in this direction, in GCC its just traversing the tree and adding the symbol to the symbol table and creating a new node of the type label.However since our GCC code is broken I cant work in it.)

Now the next task is to create a simple DEF-USE chain of the variables.If this is done (And I am guessing it is quite difficult to do it) then I can turn on to two simple things-creation of snapshots and adding the call to the PHI function.Lets see If I can do all of this in the next two days (Till Sunday).

Feeling a vacuum

Posted: February 22, 2010 in Personal

Really true! For the last couple of days there is this strange feeling of complete loss in me.Its strange. It is reminding me of my state of mind a couple of years before from now. The same strange thoughts, the same loneliness, the same spending restless nights and for the same reason too,I guess. All in a matter of two days.Everything it seems has come a full circle.Only the characters have changed.

Looking back, I know how stupid I was back then. The situation was different, the circumstances were different and in hindsight I am happy that nothing ever happened at that time. But I think that this might be different. Yes,  I hope this is different. But I need a start, a fillip, a push, “A one thing leads to another” , if that is how it needs to be told.

I am feeling restless. Anxious actually.I know my characteristic hesitancy is peeping its head out of the bag. Its clearly seen and its doing me no good. Why am I like this? Why have I always been like this? Why can’t I be a bit more bold? Why can’t I be the one to make the first move?.These introspective questions have never been answered. But like a ray of light in a dark alley I am still hopeful. Anticipative. I just pray something happens (A miracle, I will call it if it happens, indeed).I hope my situation improves. I hope something good happens. I am waiting and I know the OLD MAN up there is watching me.

Challenges

Posted: February 21, 2010 in General

It seems the next few days are going to be the most challenging for me.There are a lot of opportunities that have given me a glimmer of hope to try out different things both in my project and otherwise as well.Although I am not willing to disclose any of the things right now, since I am not interested in counting the eggs before they hatch, (have had a bad experience of that in the past)these can in fact be the glue that I have been looking for moulding myself correctly.

At the stage I am in, I distinctly remember a dialogue from one of my favourite movie ,The replacements, in which the coach after being asked, “What comes in between winning and losing?” replies, ” A big Heart” . In the context, I know I have to keep a very big heart and work really hard If I am to see these opportunities being made the best use of, by me.

Project Blues

Posted: February 17, 2010 in B.E project

A lot of time has gone by since I am writing a post related to my ongoing project.Just was stuck in so many other things.But now since the focus is again back on the project this post, I have decided, is my plan of action for the next month or so.

The status till now

Embarrassed to say this, but in terms of implementation the project is lacking a great deal.Till now I have only been able to make a proof of concept of the project.Because of the paucity of time here on also I have decided to work further on the proof of concept only for the project.

POA

1. Add to the POC the code to handle test cases like:

a. Pointers and arrays

b. IO

c. Breaking from Parallel when it is detected that it can be parallelized or

the overheads are too much to handle.(Although Some work in this

direction is already done more has to be done).

2. After handling all these test cases, I need to test and show results.Following are some of the things I am considering.

a. Improvement in the multi-core utilization as depicted by the System

Monitor.(This is what I do right now).Need to improve on this utilization

display to exclude whatever is done by the kernel for other processes

(process-specific System Monitor).

b. Timing results to show the way the sequential system executes and our

parallel system executes.(For the entire working program).This will

directly give the speedup.

c. To fine grain it even more, need to know discretely the time taken for

the execution of each of the instructions or blocks of instructions. This

will be important to test the results as well as in the future this can be

used as the feedback data at runtime that can be used to tweak the

compiler to learn from past efforts of parallelization.

Strategy

Work now for the next month or so to ensure that all of this is achieved.Each POA point is to be completed in a week from today.So a post for every week remarking the progress is on the agenda. Perhaps the time has come to buck up and go for the final dash to the finish line.

As first steps to fulfill this commitment, I have decided to be out of activity on twitter, Facebook etc for a month or so from now on. This will help me to not get distracted and ensure that I do not waste much time.

Have decided to work nights now since this will be required now more than anything else.Couldn’t do it till now because of health concerns.But now will have to slog for some time for the sake of the project.

Also will have to make sure that I do not end up multiplexing a lot on other things during this time.Need to focused and determined in completing the project with top priority.

And the final thing,  Not to lose any of the motivation.

The journey to and fro from IIT

Posted: February 16, 2010 in General

Well! Did not think I would ever write such a blog entry in my life ,would have never thought anything of this kind in my dreams too, but indeed this is true.Now I do have a small line in my resume that will say “prize winner at IIT”. Feels nice:-)

So here is the complete IIT experience

Background

I had never been to any IIT before.So when the techkriti festival (IIT kanpur’s annual technical event) were accepting possible ideas for their events.I sent them mine too , thinking that I’ ll be able to visit an IIT if i ever got selected.After some time came their reply that they had shortlisted our idea as one of the ideas that will be there for the final project competition.I was ecstatic and looked forward for the journey because I always wondered how the people in IIT were so good.Thus, this was the opportunity to find it out in person.

The Journey

It was hard to find tickets for the journey to kanpur since I only got the notification of shortlisting after I came from BITS goa. But shriniket (Who bagged a prize too at the event) managed to book my tickets. As a wonderful gesture he also brought home made food for me that I could eat during the journey.I owe him so much since he has helped me out so many times. The journey was good and not so much eventful as was the trip to Goa.

First feel of IIT

I reached IITk in the early hours of the next day.The day after I boarded the train from mumbai for kanpur.The first thing I noticed was the campus.It was big.Not so much green as BITS but more sprawling than BITS.After some formalities I turned to go to the place where I was accomodated.And then came the shockers!

I was accommodated in a flat in which approx 40 more people were accommodated. It consisted of only two bathrooms.Inside the flat there was no electricity and a lot of mosquitoes.Finally,after some help from the guard bhaiyya I was able to get electricity turned on in the flat(someone had turned the main switch off and no one had noticed it before me).But then I found that there was no light holder in our room or in the bathrooms.(After much effort my friend fixed that with the help of somebody).I did not take a bath (for five days) since there was no provision for hot water and we(me, Shrintya and Amey) could only get our turn for the bathroom in the morning at 6 O clock in chilling cold.I don’t quite know how we managed to live in there.

As I started roaming in the campus, I started to like IIT more.Probably because of the students there. Almost everyone wore a sweatshirt bearing an IIT logo and was cycling around to reach the college from the hostel.Participants all over India had come for the different competitions in the event. Seeing the enthusiasm among all the participants really impressed and motivated me.

On the campus way, anyone could see really big trees and seagulls(maybe storks, I dont really know) grazing on the green grass of the lawns. There were peacocks who called other peacocks with their customary mew call.The weather was cold and the ambience was noteworthy.I fell in instant love of the campus.

As the event went on, my love for the campus, the people and the students(the IIT ones as well as the others who had come as participants) only increased.

The Event

Although I won at BITS, I wondered If I really deserved it.Probably because of the way of judging, the mood I was in or many things else.However, here I must say the judging for the event was fantastic.There were people who intently listened to my idea, pointed to the loopholes of the idea,suggested where it could be improved etc. Everything was pretty systematically managed by the coordinators.I remember being the last one walking out of the room after explaining my project to about 20 odd people.I got only a consolation prize this time (A T-shirt and Rs.2000 cash) but the reviews I got from the judges and other people were really worthwhile.

The Return

The return from kanpur to pune was even more dramatic.Our return journey was from kanpur to Pune via Delhi and we had to board a diff train from Delhi.We had a buffer of approx three hours to accomodate any late arrivals and all. The problem was that the train from kanpur to pune got delayed by about an hour before we even boarded it. And it got delayed even more during the journey.With only 5 mins to go for the scheduled departure of our train from delhi, our train (The kanpur to delhi one)just arrived.We ran across the platforms and just about managed to board.Phew! It was a real tight finish.

Epilogue

“With great power comes great responsibility” is a very important dialogue from Spiderman .I have modified it as “With great expectations comes great responsibility“.As the bar of expectations and recognitions from all these competitions increases, the feeling of proving to everyone’s expectations in my mind is also getting accentuated.I am thus really motivated to do the good work from here on.If, till now, was good work(I dont think so personally) I want to ensure that even good work ensues.

When I was in IITk, I heard the news of the bomb blast in Pune that took nine lives and injured many.Pune, being my home city for the last four years, I was shocked and saddened after hearing the news.This prize is dedicated to those victims.My heart goes out for the the victims and their families.May all the victims rest in peace!

The Goa Experience

Posted: February 7, 2010 in General

Back from a four day stay in Goa . I went because I was selected for a project competition in a prestigious college.And luckily bagged the prize in the competition too.Without an iota of doubt in my mind, I think I bagged a prize I did not deserve.But my overall Goa experience was pretty mixed and deserves a mention and thus is this post.So let me start chronologically.

THE JOURNEY TO GOA

Everything was getting delayed the day we had to leave for Goa , even the train, as I was to find out later.In the morning, I had to go to RedHat to discuss the project with my external mentor and unfortunately that took some while, although It was really important and the time was right to invest.I rushed back home quickly, shaved and had lunch.Since we (I plus a couple of friends, Ketan and Aashish)were so late we decided to hire an auto. Huffing and puffing  we reached the railway station only to find out that the train got delayed too. After a short delay the journey did begin. Almost my complete class from PICT was there for the journey. Soon after boarding the train, we quickly began playing cards (Challenge and Judgement).We had eagerly waited for this.Slowly as the journey continued a lot of friends joined the game.At one point, close to twelve of us  were playing  judgement together . We sat in a cramped compartment and laughed all over when someone lost. It was a delightful scene.The memory of that game which lasted for close to two hours will remain etched forever.We will probably never get to do this again.

The beginning of the woes

As I reached Vasco  early morning the next day, I boarded a bus from the railway station to BITS goa campus. Reached there within half an hour and thus began a day full of woes. Firstly lost my sweatshirt.I had bought it just two months ago and I liked it too.Then I found out that there were accomodation problems on campus.Since I was the only one from my team who wanted to get accomodated these problems caused a bit of unwanted trouble. After much deliberation I(with Ketan and Mahesh Bingi)  decided to go to my friends’ place that they had rented near a famous beach.Went by a cab and that cost Rs.450 approx to panaji and from there to the room by bus.Damn. Was so tired.Spent some time on the beach (Calingut) and found out there was hardly any vegetarian food available by the beach side.Could not eat much as well.All in all this was a forgetful day.

BITS Goa

Shriniket had told me once that BITS Goa is one of the most exciting experience he had when he visited it the last time a couple of years back.Well, after being there cant find any reason to disagree with him.A wonderful, sprawling campus with lush green lawns and so many seagulls (I guess) flying around.It is near the airport. So often , aircrafts speed past the campus at relatively low heights. Its a very good college with very helpful people too. However, on the day of my competition I was feeling a bit off color. So could not enjoy it much.I just concentrated on the competition.I waited patiently on my desk to demonstrate my project to anyone who wanted to see it.Well, no one came, apart from the judges.The judges did come and they liked it too.I was able to convince one of the judges that I had a pretty good idea.He was happy to hear me out.He offered me to give a lecture on GCC internals to his class during the event.I was touched.But that did not fit in the schedule and was thus scrapped. Anyways it was an honour for me. Surprisingly, I bagged the prize which I believe I did not deserve at all.I mean, in terms of implementation and all I fell way behind than my other friends who were in the fray for the project competition as well. And they surely deserved to win.(Maybe they will win in next competitions coz this is not the only competition).Anyways since I never expected to win in the first place this is a bit of motivation for me to take the project to its completion in the right way.Moreover, my aim for the project is not to win in any project competition but something else.I will be happy if that aim is achieved.

Loopback

Finally, just roamed around some of the places in Goa and returned back.Was happy to have had a good time for four days and to have won.Now I know that the real work starts from here.However,Since I am not sure if I will be able to win any project competition again, this is the right time to thank a few people.Sarang sir, Satish sir, swati and a lot of other friends who helped me and wished me well.Thanks for your support.

Cheers.

X

Sandy

Nothing much

Posted: January 31, 2010 in General

Well, wake up today and just felt like writing something.With no topic in mind just want to write on something that makes me feel good.

There are many things that make me feel good so hard to single out something and start writing about it.But let me write this post about the two things in life that I love to do : Watching Sports and Reading books .

Over the years, since I don’t play much now, I have turned to read a lot.I remember so many nights spent alone reading novels or anything else.This passion of mine has inspired me to write this post. This post is also partly inspired from a recent chat that I had with one of my friends in which we were comparing two great sportsmen.The chat help me realize that I was such a Die-hard fan of Sports .

Well to begin with..Sports

I love a lot of games.Cricket,Soccer,lawn tennis,cycling, Basket-ball,Moto-Racing etc. And though I don’t get much time now to watch them all the while, I do make a point to  keep myself updated with the latest happening in the sports world. I also played Cricket for my District and school teams.I even was the vice-captain for my school team. Although I was only modest in my cricketing abilities, I loved strategizing during the game.Bowling changes,Field placements, tactics I loved them all and was pretty good at them too. I enjoyed directing my team members and setting different fields for different players. I honestly feel that I have never experienced the same joy again in my life.And from my childhood I have enjoyed watching all the games as well and always venerated a lot of sportsmen.

And now…Reading.

I am a reading enthusiast.Give me any book and I will make an effort to read it.Fiction, Non-Fiction it does not matter.Mostly I read books which are thrillers, historic in nature and have a lot of description of arts and culture.I also like a lot of books on physics and economics since they are my best subjects till date.Its amazing to read about a particular author and have a feeling of at-one-ment  with his/her thoughts.I have in my engineering days made a point to read at least two books in the whole semester.And so far I have done good on that promise to myself and hope I continue that too.

So now my picks like in …a BEST OF FIVE:

Sportsmen

These are my five picks but I have missed so many.

1. Roger Federer

2. Lance Armstrong

3. Steven Gerrard

4. Steve Waugh

5. Rahul Dravid.

Books:

1.  Angels and Demons (and the best till date)

2. Mrutyunjay

3. The chariots of the God

4.The Cosmos

5.Beyond Einstein

Daemon process-example

Posted: January 17, 2010 in B.E project

Hi,

Was contemplating on writing a daemon process that would provide the lone interface that would be required to call from gcc.Have not completed yet, however,this would be the skeleton of writing a daemon.

To begin with here is some theory of a daemon:

Theory

There are some programs which are not designed to be interactive.This means that they are only activated when needed.Such programs,it is said, run in the background,being invoked only on some event.Daemons were characters in Greek mythology: neither good or evil, they were little attendant spirits that, by and large, did useful things for mankind.This is analogous to the use of daemons in linux.

Relevance

I find daemons highly relevant to our project.The way I see it, these daemons can be invoked by generating an exception and then possibly by using a fork and a exec system call to activate the daemon.Thus,this is the only interface that will be needed.Once activated the daemon will periodically monitor the ready to execute queues and bind them to processors dynamically.Plus these will run in  the background and will be terminated on a TERM signal as well.These are all the things that we will be requiring.

Note:

1)The binding scheme can be made highly efficient by having a heuristic that can calculate on the basis of priority of processes (nice values of processes) and the cpu load (The kernel maintains this value) of the processes which process should be allocated to which process.Thus by making no changes to the scheduler itself we can customize the way the scheduler attends our needs in an efficient and elegant way.

Download the archive titled “14-1-2010.zip” which is a simple skeleton of writing a daemon.Right now it does nothing.But I am intending to make it functional quickly.

Aim (Till Tuesday)

1.Integration of all the piece of code fragments that I have developed till now.Although not assigned to me I think i know the code best and should complete it anyways.

2.Reading a little about removal of dependencies in if and else blocks.Intuitively I am thinking of def-use links.

Hoping to add the complete daemon working neatly interfaced with all the things in a day or two.

Summary for the week

Posted: January 15, 2010 in B.E project

Hi,

Just completed a small program for a daemon process.The daemon as of now is not doing anything of substantial value and hence I am not attaching the file right away.But have now understood how it ll work.Will demonstrate it.

So this is what I have been able to do till this time:

1.A daemon process that will work in the background.Its task will be to take a process id from the ready queue and associate hard affinity to it.

Note:

I have made a working daemon and a seperate program that sets the affinity.

//TODO To integrate these two.

2.The ready to execute queue is now modified as a priority queue.So deletion and insertion can now be done in logarithmic time w.r.t input size.This data structure will be used by two programs-spawner and daemon.Spawner inserts into priority queue and daemon deletes as well as reinserts the process as need be.

//TODO To integrate all of these.

So,in brief,now I have the spawner program,the set-affinity program,the priority queue and the daemon all ready but not properly interfaced together.

I will need 2-3 more days to interface all of these.I have waited purposefully for an approval on the proof of concept.

Thanks

slight delay

Posted: January 14, 2010 in B.E project

Hi,

Still working on the part of adding signals to the processor affinities code.

This will help to kill and cleanup asynchronously the processes depending upon the evaluated condition.

Even simultaneously working on creating a daemon that will do all this and would be periodically invoked to see if there are any more processes which have been added to the pool.

Will take some time doing and hence the delay.Will directly put the most complete version now.

Here are some of the online resources I am referring apart from the manual and info pages.

References:

http://www.freebsd.org/doc/en/books/handbook/basics-daemons.html

http://web.archive.org/web/20060603181849/http://www.linuxprofilm.com/articles/linux-daemon-howto.html#ss4.4

http://www.linuxprogrammingblog.com/all-about-linux-signals?page=1