Friday, April 22, 2011

Basics on motivation towards Parallelism


“My desktop/laptop is not responding well” is one of the common thoughts that would have occurred with most of the computer users. But computers have come long away from few Hz processors to GHz processors [Hertz (Hz) of a processor is one of the major factor which affects the speed/responsiveness of the computer]; still we live unsatisfied when it comes to responsiveness of the computers.

Then why not the processor manufacturers can increase the frequency [measured in Hz] of the processor to improve the responsiveness of the computer?

Following are some of the reasons for limited frequency in processors:
  1. Unfortunately frequency of the processor is directly proportional to the power consumption by the processor.
  2. When more power is consumed lot of heat will be dissipated, we need a proper cooling mechanism to overcome the excessive heat energy generated at processor. Nowadays with laptops there is only 3 inches of window which is used for air cooling :)

In what other ways the speed of the processor can be improved?

Processor performance can be improved by executing the programs [any application that runs in your computer, for example solitaire game, internet explorer browser] in parallel. 

Okay, what is parallel execution?
The parallel execution is all about executing more than one task at a given point of time by the computer. Normally, computers might have single processor; nowadays modern day computer comes with muti-core processors or more than one processor in a computer. Okay when we have more than one processor, it is logical to think about performing more than one task at a given point of time, but how come the parallelism in single processor are achieved; it’s through multiprocessing and multithreading [a pseudo parallelism technique].

Parallelism in single processor
Multiprocessing is like running more than one process at same time. This is like running the browser [internet explorer, firefox, chrome, etc.,] and games [solitaire, Minesweeper, etc.,] concurrently. One can view the n number of process running in the windows operating system through Task Manager [Press Ctrl + Shift + Esc].

Multithreading is achieved with in a process. For example, one can download movie and watch the movie simultaneously. There are two tasks involved; one is downloading the movie from internet and the other task is playing it in windows media player. There is only one processor available, then how can one processor perform more than one action at same time. Consider an analogy to this activity like reading a book and rewriting the book in another diary. How one can do both reading and rewriting at the same time; either one can read or write at a given point of time. But, it can be achieved by reading one line from the book and writing it to another diary. If both the activities are done at a rate in which both reading and writing are undistinguishable.

Similarly, the processor downloads few bytes of movie and plays it for few seconds, this activity is repeated until entire movie is downloaded and played. The processor switch between movie download and playing the movie happens in such a way that user feels that both are occurring simultaneously. This is a kind of pseudo parallelism, where one task is happening at a given point of time, but it makes us feel like both of them are happening concurrently.

Parallelism in multi-core processor [Single Processor]
A single processor can have multiple cores; each core can execute the tasks independently. Tasks can be run in different cores to improve the performance, provided that both of them are independent. Going back to the example on running browser and games concurrently, browser can be run on core 1 and game on core 2 because both of them are independent. But if there are two tasks that are dependent on each other, they cannot be run in different cores, atleast some of the components of the programs which are closley coupled.

So, the motivation towards parallelism is to make the computer faster which is nothing but the relentless thoughts of humans to run faster and faster.

Wednesday, April 13, 2011

IPL boon or curse?

IPL Overview

It was argued that IPL would flourish the cricket talent in India. In contrary it has brought fight among two Indian players @ cricket ground itself that too on the first edition of the IPL. Ok, let us assume that it shines unrecognized cricket players of the nation but then Why the same kind of talent flourishing was not being brought up in other games, because the people of India supports cricket than anything else in which corporates have seen an another opportunity to ruin the common man. Players are traded like horses and corporates pay them based on their popularity among Indian fans.


Do you still believe that IPL is an entertainment?


This IPL is all about Corporates trying to capitalize entertainment for the benefit of itself.
The definition of "Entertainment" from WordWeb dictionary is "An activity that is diverting and that holds attention". Cricket is an entertainment if it was played an average 20 - 30 matches in a year, but in IPL the game was played on everyday continuously for 50 days. It looks like it is not an activity that is diverting but it has become a major business activity for BCCI and corporates. In addition to IPL, it is usually followed by Cricket League T20 which spans over 3 weeks of time. These entire league saga takes about 3 months of players time and in the remaining 9 months they have to represent the team INDIA. It makes them to play in close schedules without much rest. I can hear someone saying that "BCCI didn't ask the players to play in IPL. It's the players who wants to play in IPL to earn more money". Yes that is absolutely true but this is what is expected from players as they are also human being like you and me who have the family to look after.

A Blockbuster business of corporates


Each and every team has equal share among 55% revenue from IPL's Media and Sponsorship rights which is apart from the individual sponsorship obtained by them. In addition to the above the team owners or franchise are allotted with 20% of the tickets. For this year's IPL4 season, Rs. 6 lakh is charged for 10 seconds advertisement in broadcasting television channel. It is expected that the television channel could raise about Rs. 1000 Crore this year through advertisement alone apart from this they receive money television viewers. Each team has individual sponsors which also accounts to the revenue of the team owners. Please remember that every penny spent on these advertisement and by the sponsors are recovered from consumers of those products through someway or other way. The intent is not to quote that at the end of IPL all the consumer products prices are getting increased but this is also one of the factor for increase in the price rise of the consumer products which eventually accounts to some percentage in increase in inflation.

Loss of Money

It's the tax payer's money used to construct the cricket Grounds, the BCCI pays minimal rent for these grounds to take the maximum advantage which paves the way for the corporates to earn more money and spend them like anything to the cricket players all over the world. Players of other countries are getting onsite offers[working away from their home country usually to make money in short term] for 3 months in a year to play in IPL through which they earn more than what they used to earn for the whole year if they play for their nation. India has about one-third of poor people of world poor, but we have accepted and encouraging these corporate horse trading games through which they provide onsite offers to players of developed countries like England and Australia.

Bandh on one day[12 working hours] in India causes loss of about Rs. 13,000 crore. People are wasting their time by watching IPL and taking their time off, right from commercial shops to software industry. This decreases the productivity. If there is a consensus among readers that entire time spent by Indian people on watching one season of IPL and CLT20 as one day bandh, it accounts to a loss of 13,000 crore rupees.


So, I would say that IPL is a curse on India and request every responsible Indian not to encourage the so called cricket entertainment mania IPL and CLT20.