Archive

Archive for the ‘Viewpoints’ Category

Area vs Time: A look at algorithmic complexity in Hardware and Software

Many of us would have studied in our college that implementing something in hardware will be faster than implementing the same in software. What i see from this situation is a time complexity being converted into area complexity. And the benefits provided by pipelining, and reduced control overhead resulting from special purpose control implementation (As opposed to more generic&bulky control logic required by a general purpose CPU).

My own recent expeditions in this area suggest something that is not so obvious. The inverse proportion between Logic Area and Time starts after a discontinuity. Some algorithms will benefit substantially if a very minimal part of the algorithm is implemented in hardware. Beyond that point the Area vs Time relation will be an inverse proportional relation.

I would call these minimal logic that brings in huge value add as a ‘primitive function’. Now a little bit of theory. A general purpose processor does some sort of data manipulation function (eg. add, subract, multiply, divide, compare shift etc..) between two registers. Basically for a simple RISC 32 bit processor, whose instruction set is capable of taking 2 32 bit register operands and producing 1 32 bit register output, there is some combinational logic between the 64bit input and 32 bit output, depending on the current instruction. The typical instruction set of a RISC is <256 instruction. Is this enough to do all the possible function mapping from a 64 bit input to a 32 bit output domain?. No certainly not. You can always have one function that mirrors one of the 32 bit input to the output.

So for any of the general purpose processors, it is not possible to implement all the possible function mapping from a 2 word space to a 1 word symbol space. Instead it just implements the most commonly used function mappings like add, subtract, boolean operators, shifts etc. If you take the case of mirroring of bits in a 32 bit word, it will sure take at-least 32 cycles to do it in a general purpose CPU. But implementing a mirroring in hardware doesn’t consume much logic. But instantly reduces the time required for computation of the mirror by a large amount.

So if you are tasked with implementing custom hardware constrained by area, the first thing to ask is: is my CPU capable of supporting all the primitive logic function, relevant for the algorithms in use.

TODO: To be updated with some rough sketches indicating my idea

Advertisements
Categories: Philosophy, Tech, Viewpoints Tags:

Two questions for better living

August 28, 2012 Leave a comment

I see many facebook posts showing the frustration of people towards the social, political and economic system, and the decision makers. Getting frustrated or angry is of no use in the long run. Agitations triggered by feeling at a thoughtless second in the life won’t change the system for good. When I feel like thinking that somebody is under performing, I ask myself the following two questions.
1. Could I have done better if I were at the exact same situation?
2. If yes, then why not?

99% of the time, my answer to the first question itself will be a ‘no’ or ‘probably no’. If you can’t do it, never expect somebody to do it.

Categories: Viewpoints Tags:

Are you blocking your way?

http://www.flickr.com/photos/carquinyol/6158405614/Recently I did a comparison between the present me, and the me 6 years back, when I was beginning as an Engineer. What I found is that the rate of progress that I made at that time is substantially larger than the one I am making now-a-days. I couldn’t find any external reason. The only possibility is that my own thoughts and believes are causing the drag.

Six years back, my attitude was like, ‘I have nothing I can be proud of; I have nothing to loose’. But these days it seems to me that I am too conscious about the way different people perceive me. This was too big a revelation to me. I felt that I am more complex than I ever imagined (One of my guiding philosophies is ‘Sense and Simplicity’. I always wanted me and thought myself to be simple.).

There is a feeling like ‘I have a reputation, and I don’t want to spoil it’ running in the sub-conscious. This I felt is the reason why I am more conscious about what people perceive me as, rather than what I really am. This is the same thing that is stopping me from doing many things (may a-little-bit-risky things). This precisely should be the system that is causing all the drag that I am experiencing.

So what’s the way forward?. Destroy this ‘ego’. More obscurely as ‘March in the path of self destruction’ (not ‘self-destruction’; the hyphen changes the whole meaning by 180 degree). Involve in things that can really hamper your public image, and let your image be gone. Fear of height comes when you look downwards. Make yourself believe that you have nothing to loose, no social reputation, and always look up. This is the way you can overcome the fear of height, even if you are at a height.

Do you know what the best condition a man can ever get? To have a bunch of people around, who doesn’t give you any respect. This I would call as ‘Impedence matched’. Some call as ‘wavelength matched’ or ‘same frequency’. This bunch of people will look at each other, and they grow together. There is minimal drag.

Thus I am in the path of a bit transformation. Don’t know if the mission will be scrapped before the completion. But anyways, it has already begun. Let me see if I can ‘Destroy the temple and rebuild it in three days’ (Well.., I think it will take me more than even three months – but lets not alter the beauty of that quote..).

Image under creative commons license – http://www.flickr.com/photos/carquinyol/6158405614/

Brand and Quality

Premium brands are believed as symbol of quality, and price to be proportional to durability by many a people of the modern world. Rarely do people think as to how much their belief is correct. I tried to question the believes of a few people, who strongly believed brand means quality. Their main argument is the durability. But when the question of whether it is wise to pay four times to get twice the durability, many fall silent.

The Indian middle class is very much interested in durability of whatever they buy. Sometimes the durability expectations will be even double the expected use period of it. Indeed there was a time when I was a child, when Indian brands were symbols of quality, and they were actually delivering the quality and durability. When the international brands came in, though all those rules changed, still people have the perception, that the more expensive something is, the better it is.

Some brands tries to forcefully sell their products even when the consumer don’t really want it. Some operating systems are bundled with every laptop, and people are forced to choose that. In fact, many people have a limited choice of hardware, once they decide not to have that operating system, sponsored by some monopolies.

Another trend, is the selling of food at unreasonably high price, even when no value addition is done. Many people will have the experience of getting into a hotel, and forced to take some bad tasting food from there, and pay a huge bill. In my view, it is better to leave the hotel, after seeing the menu, if you are not satisfied, even if you have to burn the same amount worth of petrol to get to a more satisfying place. Such shops should fall victim of the market forces and competition. Such shops are successful at city like areas, where there is a high chance of new people coming in every day. If you take the food today, feeling unsatisfied, somebody else will do that tomorrow, though you wont go there again.

Why are there artificial distinctions being imposed for the software? Like different versions of Operating systems, one for business, one for Home etc., with different price points and features, when the company will have less expense, if they have a single version of the product, with single pricing?. It seems the motive is to give people a feeling of choice and freedom to choose, so that they will not exercise, the instinct for freedom, to choose something they don’t sell. People wants to be free to choose. The success of business it seems in maintaining a monopoly and giving artificial choices to the consumers.

When will there be an end to all these and more bad practices in the market? May be on that day that never comes, when all the people on the earth are fully aware of the market!!!

Categories: Viewpoints Tags: