Thursday 16 August 2012

Defence of Minhas Air base Kamra, 16 August 2012

On 16th August 2012, the minhas base of Kamra was attacked by a group of terrorist. PAC Kamra and Minhas Air Base are situated in the Attock district next to the GT road. Kamra is considered to be a very important strategic area for the air force. Fighter air-crafts like Mirages, Mishaq and JF-17 are built here.

There are many questions raised after this incident among the civilians. My friends used to argue with me why the airbases and cantt have so much security. According to them armed forces are supposed to take care of the country, and what they are actually doing is giving the security to themselves. I hope this answers their question. We are at the mid of the war against terrorist and there are many threats that the forces receive and face. The military assets are very important for the armed forces, they cost a lot in terms of time and money and to take care and protect them is equally important. If the assets are safe then the military can work on the safety of the country. This is the reason why there is high security check-posts at the entrance of the base or cantt. My friends who have visited the bases or cantt may have witnessed it.

The other question is that where was the security or were the forces not aware of it. There were 9 terrorists and all of them were shot dead. Only 1 security guard was shaheed and one injured. The security guard who become shaheed was the one who tried to shop the terrorist at the first check post and he opened fired when they didn't stop. He was shot dead on that occasion. Even the Base commander who is the senior most officer at the base also got shot at his shoulder. The terrorist were not allowed to enter beyond a limited area. They even tried to attack the residential area of the base but were stopped at the earliest. The terrorists could only damage one of the hangers only because that was the closest to the wall through which they entered. More damage could have been done if preparations were not made beforehand. What else the people want?




This kind of resistance is remarkable and worth mentioning in the defence of the forces. No one knows what their actual plans were. They might have come to destroy the factory or something like that. If anything get destroyed or damaged then its a shame for the country, its nation and its security forces. It should be taken into notice that those terrorist were also professional and they were fully equipped with weapon. They had also done their homework before the attack. Despite that, the forces gave them a tough day and failed their attempt to damage any further property. Without any preplanned preparation this would have been impossible.

We must think before saying anything about anyone. The soldiers of our forces are the ones who put their lives in danger in order to try to provide safety to our country and people. The reason behind any successfully mission lie in the leadership quality of the leader. In this operation as well we see that the base commander, Air Commodore Azam, led the operation from the front. When the hanger was set on fire, he himself ran towards it. At that occasion he got a bullet in his shoulders. The Chief of Air Staff called him and told him to go back home. Despite that order he returned to the field to control the situations. These kind of attitude by the leader greatly boost the morale of the soldiers. We must look at this before criticizing the senior level officers.

It is our country and our armed forces. We must talk and spread good about them. They work so hard for the protection of the country putting their lives in danger. What they need from us is our support and encouragement to boost up their morale level. In the end I would like to salute to all the soldiers of armed forces.

Long live Pakistan Armed Forces.
Long live Pakistan.
Pakistan Zindabad.

Written by:
Ahmed Ahsan Khan

Saturday 11 August 2012

Energy Crisis of Pakistan and its solution (2/2)


..... Continued from here

There are many ways by which we can resolve this problem of energy shortage. We need to explore more energy resources like wind, solar, biofuel, tidal, wave and geo thermal energy in Pakistan. Last year the students of SCME, NUST produced a biodiesel which costs only Rs.25 per liter which is roughly Rs.70 to Rs.80 cheaper than the original prize of diesel. It gives the same quality of performance as compared to normal diesel. According to the institute, all their motor vehicles and generators are being run by this biodiesel. The main advantage of this fuel is that it is a green fuel. The fast track process is used to produce this diesel in 5 minutes. The biodiesel is made from the oil of the seeds of Jatropha plant which is processed in order to produce the fuel. 1 hector of plant can produce 2000 liters of fuel. The plant is harvested twice a year therefore we can produce 4000 liters per year of biofuel from 1 hector of Jatropha plantation. If the government takes measurements to help these researchers then they can produce this diesel on a large scale to help overcome the energy crisis.

Other method include continuously updating the equipment i.e. dams and power generators, and developing new power generators. We are a confused nation. In one year, we have drought and after a month or so, when it rains, all the low-lying area starts to get flooded in big cities like Lahore and Karachi. We can use this flood-water to produce short term power supply and distribute to the surrounding houses for domestic usage. Not only this, we can store this water to make it of use in other sectors.

To conclude, I must say that we as an individual should stand up and take some responsibilities ourselves. We are to this country as a cell is to human being. We should make sure that we don’t waste water and electricity. We must run our ACs on 26 degree centigrade, for example. The completion of Thar coal power plant will bring a new revolution in the country. This would help us in the struggle to overcome the energy crisis. Pakistan has great potential and if exploited properly we can achieve any big target in front of us. I hope and pray to Allah that he help us bring prosperity and success in the country in years that follow. Ameen.   

Written by:
-         Ahmed Ahsan Khan.                   

Energy Crisis of Pakistan and its solution (1/2)


Energy crisis is any great shortfall in the supply of energy to an economy. This may include the shortage of oil, gas, electricity or any other natural resources. Energy plays a very important and vital role in the socio-economic development of a country. Energy is used by the agriculture, industrial, defense forces and on the other hand normal citizens are its domestic users. The short fall of energy not only affects the lives of the common people, but also our industry, commerce and defense sector, therefore can be safely termed as national security concern.

The reason for this shortage is many and all these can be solved by taking responsibilities and giving awareness to the illiterate public of our country. The main reason of this crisis is the high population growth rate which we have. The more population means that more energy resources will be needed. To meet this requirement of this increasing population is a difficult task for the government. Pakistan started with the population of roughly 40 million in 1947 and now after 65 years we have our population touching 178 million in 2012, which means we have an average of 2.12% population growth every single year. Pakistan has one of the highest growth rates in the region in the year 2011 of 1.8% as compared to South Asia’s 1.44%, India’s 1.37%, Bangladesh’s 1.2% and World’s 1.15%. Awareness has to be given to the illiterate public to make sure that we reduce our population growth rate.

The other reasons which become the factor of these shortages include aging of the equipment, unable to meeting the demands of new industries, high international market value of the fuel, wastage of energy and mismanagement of energy resources etc. We may observe in the big cities like Karachi and Lahore that the market places open after noon and they sit in their shops till late night. They use a lot of electricity after sunset. People should wake up early, do their business in the day light and spend some time with their families in the evening. This would reduce the huge requirement for electric supply. We can use this saved electricity in other sectors avoiding load shedding.

The government has also done a lot of work since our independence in the field of energy. WAPDA was created in 1959, before that energy was supplied by companies on regional basis. In 1959, the power generation capacity was 119 MW only. When WAPDA came into picture, by 1964-65 the electricity generation capacity rose to 636 MW in first 5 years of WAPDA’s operation. In 1970s, the capacity increased to 3000 MW with commissioning of Mangla and Tarbela dam. In 1990-91 the capacity was 9000 MW, but it was less than required, resulting in load shedding for long hours. In 1994, government invited IPPs to invest in power generation plants. They installed 6000 MW of generating capacity in a short span of time accounting for more than 30% of the installed generation capacity. As a result of IPPs, Pakistan once again turned into electricity surplus and even offered to export electricity to India. In 2002, national economy picked up and since then it has grown to an average of 5% for next 5-6 years. The demands of electricity increased, the country was once again facing serious energy shortages. The country is currently facing power shortage of approximately 5000 MW. Presently Pakistan has installed total capacity of 20190 MW, WAPDA’s share is 56.5%, IPPs share is 30.1%, Nuclear 2.4% and KESC 9.5%.

Continued....... 
Read more here

Tuesday 7 August 2012

Short Stories of Albert Einstein


Albert Einstein, as everyone knows about him, was the biggest mad scientist of the early 20th century. He has many achievements under his name like the theory of relativity, discovery of photons and the connection between mass and energy in the form of E=mc2. He was born in 14 March, 1879 in a German city of Ulm.
He was very romantic by nature. He was married twice and both of them were love marriage. The first marriage with Mileva was not very successful, after a separation of about 5 years they divorced and Einstein married Elsa. It was reported that Einstein promised Mileva that when he will win the Nobel Prize he will give her all of the winnings from the prize; this is because she was hesitant to sign the final divorce paper. With that offer she agreed to fill the divorce papers. When he received the Nobel Prize, he gave her all the prize money as promised. His level of romantic personality can be judged by one of his quotes which go on like this: “Any man who can drive safely while kissing a pretty girl is simply not giving the kiss the attention it deserves.”
When he published his theory of relativity most of the public couldn’t understand it but they had fallen in love with this man for one reason or the other. They seemed to love the idea that his theory was so incomprehensive. As Einstien put it, “now every coachman and waiter argues about whether or not relativity theory is correct.” According to one story when Einstein’s theory of relativity was announced, Eddington, an astronomer who confronted Einstein’s theory was leaving the Royal Society meeting where it was announced. He was stopped by some fellow scientists who told him, “There’s rumor that only three of the people in the world understand Einstein’s theory. You must be one of them.” When the astronomer paused but didn’t say anything, the other scientist went on, “Don’t be modest Eddington.” Eddington simply looked at him and said, “Not at all. I was wandering who the third person might be.”
When Einstein was in Oxford an American Educator, Abraham Flexner paid him a visit and offered him a position at his new Institute. It was called the Institute of Advanced Studies. It was established near Princeton University, although not affiliated with the school itself. It was designed as a sort of haven where gifted scholars could work without the pressure of academic demands and teaching duties. In the course of their discussions, Flexner asked Einstein how much he thought he should make. Einstein suggested three thousand per year. Flexner was quite amused because he had more in mind. Flexner told him, “Let Mrs. Einstein and me arrange it.” When they were done, an annual salary of 15 thousand dollars was given to the scientist. They were on their way to New Jersey.
Einstein was famous for his absentminded attitude. He was most of the times completely lost in his thoughts. One famous story recounts someone calling the institute. The unidentified caller asked to talk to the dean. When the secretary told him he wasn’t there, the caller asked if he could give him Dr. Einstein’s home address. She of course said she couldn’t, at which point the caller whispered, “Please don’t tell anyone, but I am Dr. Einstein. I am on my way back home and I have forgotten where my house is.”
Einstein died at the age of 76. Newspaper around the world noted his death and the USA president, Eisenhover declared: “No other man contributed so much to the vast expansion of the 20th century knowledge. Yet no man was more modest in the possession of the power that is knowledge, more sure that power without wisdom is deadly.”
Source: From the book “They called me Mad” by John Monaham.
By:  Ahmed Ahsan Khan.
   


Sunday 5 August 2012

Microprocessor: its working and concept of pipelining and superscalar

My last article was on microprocessors and the current and future trends of multi-core microprocessors and its drawbacks. I was pointed out by one of my readers that without the proper knowledge of the working of microprocessors, the concepts of pipelining and superscalar, it’s hard to understand the shift from single core microprocessors to multi-core microprocessors. So this is what this article is about. I am going to describe you the working of microprocessors then we will discuss about the concept of superscalar and pipelining.

Let’s first talk about the working of the microprocessors. A basic microprocessor has a CPU, Memory storage Unit and I/O devices which is connected through a data bus and an address bus. The CPU contains ALU, control Unit and a clock which describes the frequency at which instructions are processed. The execution of a single machine instruction can be divided into a sequence of operations called the instruction execution cycle. Before executing, a program is loaded into the memory. The instruction pointer (IP) contains the address of the next instruction. The instruction queue holds the group of instructions which is about to be executed. When the next instruction is called, the address is taken from the IP and the IP is updated with the new address from the instruction queue. Executing a machine instruction requires three basic steps: fetch -> decode -> execute. Taking the data from the memory uses two more steps: fetch operands and store output operands. Therefore there are six steps in the Instruction Execution Cycle for a single machine instruction:
Fetch instruction -> decode -> fetch operands -> execute -> store output operands -> next instruction -> fetch instruction again and so on.



Instruction Execution Cycle

After completely understanding the working of the microprocessors it will be easy to under the concept of pipelining and superscalar architecture. What is pipelining? Pipelining is the technique used to make CPU run faster. Pipelining is the implementation technique whereby multiple instructions are overlapped in execution. It takes advantage of parallelism where the instructions are not dependent on each other. The six-staged non-pipelined execution will take n*k cycle to process when n is the number of instructions and k is the number of execution stages. On the other hand, the six-staged pipelined execution will take k+ (n-1) cycles to process. The concept can be further explained using the following diagram.
Six Stage non-pipelined Execution


Six Stage pipelined Execution

A superscalar CPU architecture implements a form of parallelism called instruction level parallelism within a single processor. It can be thought of having 2 pipelines. It therefore helps provide a faster CPU throughput than would otherwise be possible at a given clock rate. The throughput of an instruction pipeline is the rate at which an instruction exits the pipeline. In a single pipeline execution if the execution stage requires more than one cycle then we have wasted cycles. In general for k stages (where one stage requires 2 cycles), n instructions require (k+ 2n- 1), cycles to proceed. On the other hand in 6-stage pipelined processors wasted cycles are removed, so n instructions can be executed in (k+ n) cycles, where k indicates the number of stages. This can be further explained using the following diagram.
Six stage single pipelined non-scalar execution
Superscalar six-stage pipelined execution
The concept of parallel computation is as old as 1958 when IBM researchers discussed the use of parallelism in numerical calculation for the first time. The difference between multi-core processors and superscalar is that superscalar architecture has multiple fetch, decode and execute block in the same processors whereas a multi-core processor is a single computing component with two or more independent actual processors (called cores). These multiple cores can run multiple programs at the same time, increasing overall speed of the computer. This is the main reason why there was the use to shift from single core to multi-core microprocessors which was discuss in the previous article.
Written by:
- Ahmed Ahsan Khan.

Friday 3 August 2012

Microprocessor: Current and future trends in multi-core microproccessors and its drawback

 Intel microprocessor 4004

Microprocessors are multipurpose, programmable device that accepts digital data as input, processes it according to the instructions that are fed in its memory, and provides the result as the output. Microprocessors operate on numbers and symbol represented in binary number system i.e. 0 and 1.

The first microprocessor was created by Intel in 1971 (Intel 4004). And the first microcomputer was created in 1972. Intel was founded in 1968 by Gordon E Moore (Physicist and Chemist), Robert Noyce (Physicist and co-inventor of ICs (Integrated Circuit)) and Arthur Rock (investor). The company was named Integrated Electronics, Intel for short.  

Intel has shifted its design from single core to multi core processors in 2004. There have been some reasons due to which this shift has been taken. According to Moore’s law, the number of transistors that is used in the microprocessors would double every two years. But as time passes, assumption about performance and power consumption were also made and it shown to advance similar lines. 


During that period there was one more visionary at work, Dennard. He predicted that oxide thickness; transistor length and transistor width could be all scaled by a constant factor. The density of the processors also increased. This scaling is what gave Moore’s law boost. It’s the reason the general purpose microprocessors was able to overtake and dominate other types of computers. Due to advancement in circuit technology and performance limitation in wide-issue, super-speculative processors, chip multiprocessors (CMP) or multi-core technology has become the mainstream in computer design.

For the past 7 to 8 years, Intel and AMD have emphasized multi-core CPUs as the answer to scaling system performance. It’s a fact that adding more CPU cores never result in perfect scaling. A multi-core processor is a single computing component with two or more independent actual processors (called cores). These multiple cores can run multiple programs at the same time, increasing overall speed of the computer. Dual core processors have 2 cores, tri- has 3 cores and quad- has 4 cores and so on.

The main trend that Intel followed in their development was to make faster and smaller processors. The general trend in processor development has moved from dual-, tri-, quad-, octa-core to ones with tens and hundreds of core. In addition to that, multicore chips mixed with simultaneously multithreading, memory-on-chip and special purpose heterogeneous cores promise further performance and efficiency gains, especially in processing multimedia, recognition and networking applications. There is also a trend of improving energy-efficiency by focusing on performance per watt with advanced fine grain or ultra-fine-grain power management and dynamic voltage and frequency scaling.

There has been some reason why this shift has not been able to produce the desired result. One of the biggest reasons is that in any parallelized program, performance is ultimately limited by the amount of serial code. Serial code can only be executed by only one processor as the instruction is read one by one. This is known as Amdahl’s law. Other factors, like the difficulty of maintaining concurrency across a large number of cores, also limit the practical scaling of multi core solution.

The improvement in performance gained by the use of a multi-core processor depends very much on the software algorithm used and their implementation. The pace at which development of parallel programming has been increased is very slow as compared to the increased number of multi-core processors being made and brought into the market. Parallel programming languages have been introduced for example, Cilk++, OpenMP, fastflow and MPI that can be used on multicore platforms.

Having multiple cores on a single chip gives rise to challenges and problems. Power and temperature management are two concerns that can increase exponentially with the addition of multiple cores. If two cores were placed on a single chip without any modification then the chip would consume twice as much power and generate a large amount of heat. In the extreme case, if your processor overheats, your computer may combust. For prevention we run the multicores at a lower frequency to reduce power consumption. These are some of the reasons that were faced by the microprocessor industry while developing the multicore processors.   

Written by:
- Ahmed Ahsan Khan.

Wednesday 1 August 2012

Alexander the great's 3 last wishes


Alexander the great was the Greek king during 300 BC. He is considered as the most successful commander in the history of man-kind with all unbeaten battles. His was tutored by Aristotle who was a Greek Philosopher until the age of 16. When Alexander was 30 years old, he conquered a large piece of land that stretched from Lonian Sea (now connecting Italy to Greece) to the Himalayas, northern part of Indian subcontinent. It was one of the largest empires in the ancient world.
During the time when he was dying while on his way back home he made 3 wishes to his general to be done after his death. The generals promised to follow his wishes after he pass away. The wishes were:
1.     “My physicians alone must carry my coffins.”
2.     “I desire that when my coffins is being carried to the grave, the path leading to the graveyard must be covered with all the gold, silver all the precious treasure which I have collected during my kingship.”
3.     “My last wish is that both my hands be kept dangling out of my coffin.”
It’s hard to believe that these are the wishes made by someone who conquered half of the world in such a short time. It shows the limit of modesty and down to earth personality of a person one can possess. There is some deep reasoning behind the wishes which he had made.
1.     He wanted physicians to carry his coffins because he wanted to show the world that no one can save anyone from death, not even his doctors and physicians. A man should not take his life for granted rather he should be prepared that one day he will face death.
2.     The second wish was to tell the people that despite a person collect so much of treasure in his life time, not a single bit of it will go with him once he died.
3.     And the third wish was to show the world that once a person is dead he goes from the world empty handed.
He is quoted to have said:
"I am dying from the treatment of too many physicians."

Written by: 
-  Ahmed Ahsan Khan