Why do smart phones freeze (or hang or lock up)?

2014/04/22

Old Nokia phones (also known as dumb phones or features) almost never froze! I had a Nokia phone which froze only once (worked fine after restart) in 7 years of use! That is pretty impressive.

However, most smart phones often freeze. Some freeze quite often while some other freeze only occasionally.

Let us understand why it happens.

All smart phones are mini computers inside. They have an Operating System (OS) which interacts with the phone hardware. Users interact with the phone via application layers.

The core of OS is known as “kernel”. This is low level assembly language core which translates users’ requests (via apps) so that hardware can process it. For example, when you dial a number (via dialler app) the request is sent to kernel which instructs the hardware to perform the phone dialing operation. Both Android and iOS runs on highly customized flavors of Unix OS inside them.

The old dumb phones also had similar concept but there was a big difference. Those phones were only allowed to perform few predefined tasks like dialing a number, receiving phone calls and sending texts (along with alarm, calendar etc.).

But modern smart phones are expected to do a lot of things! As a result, it is often very difficult to predict what each app will request to kernel. There are just millions of instructions possible. When many apps send some instruction to kernel, it may get overloaded (takes too long to process which manifests as phone slow to respond) or just get confused (manifests as phone freezing). The freezing often happens due to kernel going into an infinite loop (and does not know how to come out of that) or just bogged down by too much work.

When you use heavy weight apps in lower end (or budget) smart phones, due to slow CPU and small amount of RAM, the hardware gets overloaded. So, those phones often become slow over times. When you install newer versions of apps, they usually take up more space and thus strains hardware even more!

Different manufactures try to handle this problem in different ways. Apple implements a strict control of what its apps are allowed to do and what hardware goes inside the phone. That’s why iOS is more restrictive and iOS users see less frequent freezing. Internally, iOS apps work in a sandbox mode. Each app gets a space in phone storage and it can’t access anything outside of its own sandbox. Once you delete the app, all its traces are gone. This is also the reason why users can’t access iOS file system (unless you jailbreak). Apple also doesn’t allow usage of external memory card which is often responsible for corrupt file systems and thus causing problems.

Android system (even though derived from Unix) is more like good old desktop Windows OS in its behavior. Apps can often access an equivalent of Windows registry style things. Various apps dump garbage in cache, which fills up phone’s internal storage (like hard disk) and phone becomes slower over time. Even if you install an app in SD card, it still leaves traces in internal storage space due to OS design. Android also allows access to file system (just like desktop PCs) which means users can fiddle with its system and may accidentally delete system files!

Microsoft has taken iOS like “sandbox” approach in its Windows phone system. So, in theory, Windows Phones are supposed to crash less! However, these still allow external SD cards so such issues will remain to some extent. Also, as Windows phones have less market share at present, it is difficult to predict if they are indeed superior to Android or iOS.

From empirical evidence, it can be stated that:

  • Apple phones crash the least. However, internet browsing is often unpredictable and quite often iOS browser just crashes but this does not usually lead to entire phone freezing up.
  • Blackberries and Android phones crash often. Lower end Android models crash more if you fiddle with them too much for the reason described in this article.
  • Less matured OS crashes more. For example, Windows phones OS have good architecture but it is still maturing so it may crash unexpectedly.
  • Poorly designed OS will crash often. This is why Nokia’s Symbian based smart phones were notorious for freezing!

If you are an Android user, make sure you clear cache often, manage your applications so that it does not store too much data in phone’s internal memory and refrain from heavy browsing or playing hardware heavy games. This should lead to less crash, especially in budget hardware Android models.

If you are an iOS user (iPhone or iPad), there is not much you can do to prevent freezing (if that happens at all). Sometimes one or two rogue apps may cause problem. In that case, simply get rid of those apps. Some apps when updated, tend to make use of newer features of latest OS. If your OS is older version, you may see apps crashing (but not entire device freezing up).

Windows phones are still maturing so nothing can be advised at this moment.

Advertisements

What are different types of sharees?

2013/10/27

Sharee (also sari, saree) is a dress predominantly worn by Indian women. It is often difficult to classify a sharee for a foreigner. This article shows the classification.

20131027-081742.jpg

How a steam loco differs from diesel-electric loco?

2013/09/23

A diesel-electric (DE) loco is a constant power machine. We know that, Power = Force x Velocity. This means, when hauling heavy loads (especially on an uphill), a DE loco can increase draw bar pull by reducing speed. This also shows why most shunting locos are DE locos as they need to haul heavy load but at low speed.

 

However, due to the way a steam loco is designed (i.e. its boiler, piston and other mechanisms), a steam loco behaves as a constant force machine up to cruising speed (usually around 25 MPH or 40 km/h). Beyond that, a steam loco behaves like a constant power machine like a DE loco.

 

This difference is crucial. For a steam loco to haul heavy load (or on an uphill), if it can’t deliver enough draw bar pull, it has no way to increase the force like a DE loco, because for steam loco, force is constant at low speed. So, a steam loco won’t be able to climb a slope like a DE loco. It will literally run out of puff under such circumstance. However, once a steam loco has crossed its cruising speed, it will have no problem pulling heavy trains as it behaves in same way as DE loco i.e. constant power loco.

 

There are obviously other differences between these two types of locos. A DE loco is more thermally efficient than a steam loco. The later requires far more maintenance than the former and needs more crews to operate them.

 

No wonder, due to these reasons, most of old steam locos have been replaced by DE locos in all but heritage routes. Please note that a pure electric loco will also behave similarly as of a DE loco.

 

How different Linux distros are related?

2013/07/29

If you are new to Linux, you may be confused with so many different Linux distros (i.e. flavors) available.

Following hierarchy chart will help you to understand the relationship between them.

This chart is prepared based on how each distro manages its software installation (similar to add/remove programs in Windows). Note that 2 most common flavors are Debian and Red Hat (RPM). Many popular Linux distros are derived from it.

 

Linux Tree

There can be separate classification based on front end (or user interface) where same distro can use different interfaces like Gnome etc.

If you have never used Linux before and want to test the experience, I suggest you try any of the following (in no particular order).

  • Ubuntu (or any of its flavors)
  • Mint (may have issues with AMD computers)
  • Fedora (easy to run from USB)

Why airbags are marked as SRS?

2013/06/30

Airbags are Supplemental Restraint System (SRS) because they supplement the function of seat belts.

The seat belts are primary restraint system in case of an accident. So you must wear seat belts at all times. If seat belts are not worn, airbags may not be deployed in case of a collision.

Always wear seat belts!

Why rupee always falls against dollar, pound, euro?

2013/06/26
Historically, Indian Rupee always fell against strong currencies like Dollar, Pound or Euro.

 
During mid of 2013, rupee had almost a free fall. It now equals 1 $ = 60 Rs or 1 £ = 93 Rs.
 
So why suddenly rupee fell so low?
 
One reason is better economic outlook in USA. Large scale investors are now expecting better return on their investment from USA. Thus, their funds are going towards USA and less amount is coming to India. For many day to day products, India needs foreign currency (in the form of $, £, € etc.) so less foreign currency coming to India means more demand for $ £ € to buy goods/raw materials from outer world.
 
Incidentally, weakening of rupee should make export much more attractive as same $ will now buy more Rs. However, there is a catch. To produce many of those exportable goods, businesses need to import raw materials from outside India, which requires foreign currency! Since such import is getting more expensive, resulting goods (manufactured in India) is also becoming expensive – thus eroding the benefit of weakening rupee for export.
 
Weakening rupee also sometimes prompt foreign importers (who buy exported goods from India) demanding a re-negotiation on price (as they claim weakening rupee will benefit Indian exporters also we have just seen that may be the case always).
 
Non residents Indians (NRI) are happy because if they send foreign currency to India now they will get much better return (i.e. more Rs for every $ sent). However, such fun is only possible if they don’t want to take money out of India at a later date. If NRIs send money to India and invests in a scheme in India, when they convert money later from Rs to $/£/€, chances are – due to rupee weakening even more, they will get a very poor return.
 
So, in short, weakening rupee is not a good news for investors especially those who want to invest foreign currency in India and then want to convert that to their native foreign currency once their investment is matured. If rupee falls further between the time they invested and investment matured and considering rate of return and inflation, they may even get same/lower than what they originally invested in $/£/€ terms!
 
In theory, Reserve Bank of India (RBI) can intervene by imposing a temporary limit of foreign currency going out of India but that will irk lots of common public and goes against free market economy principle (which India has adopted since 1990s).

How bitcoin works?

2013/06/24

Bitcoin is a virtual currency. In real currency, you have notes and coins which you can exchange for goods or services.

Bitcoin is a string of characters like 31uEbMgunupShBVTewXjtqbBv5MndwfXhb, (the real bitcoin is different, but lets assume it for the sake of argument).

There is an algorithm (not secret) which validates whether a bitcoin string is valid or not and whether it has been used previously (in other transactions or not). This transaction ledger is known as blockchain (analogous to a bank account or credit card statement).

You must have bought goods with your credit card. When placing order online, the merchandiser establishes a connection with the bank to validate your card is valid and has enough credit to spend.

In a similar fashion, for each bitcoin transaction, a bitcoin bank (some designated computer servers) validates the bitcoin string you are using and ensures it has not been used before.

So how bitcoins are generated? One needs a massive amount of processing power (thus multiple computers connected together) to generate a new bitcoin (i.e. to generate a string which is valid as per bitcoin algorithm). This process is called mining. The bitcoin algorithm suggests that only 21 million strings can be generated which will be a valid bitcoin. So far 50% of those have already been generated. The rest 50% is expected to be generated in next 5-10 years.

Just like you stash cash in your wallet, bitcoins are stored in a digital wallet. If not careful, your cash may be stolen and someone can use it on for their own purchase. In a similar fashion, if you don’t guard your digital wallet, someone can steal your bitcoins! Bitcoin wallets have addresses (like your Paypal address is your email etc.) like this one – 1JArS6jzE3AJ9sZ3aFij1BmTcpFGgN86hA. When transacting with bitcoin, one must send a bitcoins to receiver’s valid wallet address. However, to prevent someone stealing your coins, there is a safeguard concept called private key. You can say this is like a real key to your chest. If someone has the key, he/she can open your chest and get all your money (i.e. bitcoins) out.

The bitcoin addresses can be calculated from private key but not the other way round. So it is important that you do not lose your bitcoin private key!

Buying and selling bitcoin is similar to buying/selling any other currency. Its exchange rate also fluctuates like any real currency.

Why Microsoft created Windows 8 Metro interface?

2013/04/21

There was nothing wrong as such in Windows 7. However, unless businesses can make working things obsolete via upgrade to newer versions they won’t make enough money!

So Microsoft introduced Windows 8. However, unlike previous versions of Windows, they tried to force new Metro interface which is more suitable for touch screen devices. Most users were unhappy and wanted to revert to Windows 7 like interface. But why Microsoft introduced it in first place?

Metro and legacy Windows applications are not compatible. An app designed for Metro interface won’t run in traditional Windows environment. Metro apps can only be downloaded via Windows Marketplace. Now this is a very crucial difference. In earlier Windows, you could download apps from literally millions of websites. However, in Metro interface, your only option is Windows market place. This is similar to Apple’s AppStore concept. Microsoft did at because they wanted to capture 30% of all app sales. They can only do it if those apps are sold using their own app store only.

The trouble for Microsoft started when consumers did not like Windows 8. In fact various statistics show PC sales have been slowed down because consumers shunned Windows 8. Now Microsoft is caught between devil and deep sea. Backtracking from their Metro interface means potential loss of profit in future and acceptant strategic failure. However, if they continue to force Windows 8 Metro interface to consumers they may face continued backlash.

This is also the reason why Microsoft does not offer any option to start Windows 8 straight into legacy desktop! Because they want consumers to adopt their new Metro interface. Some consumers are using third oath apps to make Windows 8 behave like Windows 7.

But now you know why Microsoft did not offer these simple options themselves!

Why museums don’t allow flash photography?

2013/04/12

Not all museums prohibit flash photography. But some of them do. Some museums prohibit photography altogether but that is due to commercial reason.

So why flash photography is wrong?

There are several reasons behind this.

Some old artworks are made on perchments or some fragile materials which may fade quickly if exposed to strong lights. Thus frequent exposure to strong flash lights may accelerate the fading process.

Such artworks are often kept in dimly lit rooms. All the visitors eyes are accostommed in dim light. Now if suddenly flashes start going off then it becomes irritated to other visitors nearby. This is another reason i.e. to avoid disturbance to other visitors (it is similar to why you should not talk in loud voice inside museums).

Sometimes museum authories claim that flash interferes with their intruder detection sensor systems. However, not much detail is know if that is true.

How come bridge cameras can offer so much zoom?

2013/04/05

Nowadays many compact cameras can offer 25x-30x zoom. But having similar kind of zoom is not possible in DSLR cameras where it is mostly limited to around 11x-15x.

The reason why compact/bridge cameras can offer this (at a reasonable price) is these cameras have much smaller sensors compared to DSLR cameras. Thus, these cameras need much smaller lenses to cover that sensor. If you notice lens specification of these cameras they are usually at 4-100 mm range. While in DSLR, these are 18-200 mm range. Since DSLRs have much bigger sensors, they need massive lenses to offer long zoom range. This makes the lenses heavy and expensive.

So even though you can get away with very long zoom in smaller cameras, the image quality will be much inferior compared to DSLR’s APS-C or full frame sensors.

Image