Sunday, April 18, 2010

Why Linux is almost free of viruses?

 I have used both Windows and Linux as my desktop machine for a reasonable period of time. The one thing I noticed is that windows is always affected by viruses. The anti virus software has to be updated very often. In linux this problem is not there. Neither it has any anti virus software, nor it is affected by virus.

So I checked for the possible reasons and found some valid points.

 In Linux, there will  be a 'root' account and a number of  user accounts. The root user will have all powers, while normal user does not. Usually the root account is not used by normal users. So even if an infected file or virus is accidentally copied, it will not affect the system. Because since it does not have root privileges, it cannot access any system resources.

And another thing that comes to mind is that the virus writers need attention. Since Linux is not used in many desktop PCs,  they will not get much attention even if they are able to make a 'super virus' which  can infect any Linux PC. If they want to get it, they have to attack windows PCs.

And consider that some flaw is there in Linux system through which hackers will be able to attack it . But it is an open source system where thousands of developers collaborate to build it. So patches will be posted immediately to fix these flaws. Being an open system have this advantage of easily patchable.

Most of the Linux users are pretty much experienced guys who knows what is what, while most of windows users are not. So the so called 'social engineering' in which users are tricked into doing things are easy in windows. An inexperienced user can be easily tricked into revealing his user credentials, password etc.

 Even if some malware comes through e-mail attachment in Linux, it cannot affect the system easily. Because it will not have execute permission. To give its execute permission,  it has to be saved. Then user has to login as 'root' and set the execute permission for this. While doing all these, it is normal that he verifies the attachment. So it is unlikely that he will give execute permission for suspected attachments.

But don't think that Linux is completely virus free. 'Bliss' is an example of Linux virus. But it is not spread in a large manner.

Saturday, April 17, 2010

Linux or GNU/Linux

 When you are telling 'Linux', do you actually mean 'Linux' or 'GNU/Linux'? May be most of the time GNU/Linux.  You don't get what I am telling? But that is the fact I am talking about.

Linux is the name of the Kernel, the original version was written by Linus Torvalds.  And then there came GNU foundation, aimed at promoting free software. Their plan was to make a free operating system which is unix like. They were able to develop some utilities and libraries.But what missing was a kernel, which handle the hardware resources inside OS. 

 Linus Torvalds had wrote an initial version of a kernel based on Minix, another unix like OS. He did this as a hobby, actually  he didn't like a Minix, which he was using. So he just wanted to make a new one. The name he gave to this kernel was 'Linux'. So combining the kernel Linus had and the user space utilities GNU had, a new OS was developed. 

There should be a name given to the new OS. The name that somehow became popular was 'Linux'. After some time, there came a thought among the GNU people that calling it 'Linux' will disregard the efforts made by GNU people. They tried to popularize the term 'GNU/Linux' instead of Linux. But it never became popular. May be because it is difficult to say. Anyway people continued to use the name Linux. 

So now we are using the term Linux for 'Linux' and 'GNU/Linux'.

Tuesday, February 9, 2010

How Google earns Money??




 I was very much curious how Google earns money from its products. For me, Google search operations seemed to be a free service. And even gmail, g-talk, picassa, youtube and so on. Everything seemed free and does not generate any revenue for Google. And i was particularly interested in Android and Chrome. They are quite open source in nature. The device manufacturers or users are not paying anything to Google. So i thought of doing some 'Google search' on this subject and found these facts.

Advertisements 
 Just try searching the word "mobile phone" from Google. Apart from normal search results, you will see an entry with rose color background, which is at the top. And also there is list of entries on the right pane, titled 'sponsored links'.  These links will be very much relevant to your search key word, ie "mobile phone".

 Login to your gmail account and open a message. You will see sponsored links on the top and right side of the message. This ads will be based the message content. Don't you wonder how Google  displays these ads according to the content of the webpage. 

AdWords 
 Suppose some company, say Nokia, want to display their ads when somebody search some keyword, say "mobile phone". Then what they have to do is, register this keyword with Google's AdWords.  And they have to specify the maximum amount they are going to pay per click. When somebody searches this keyword, their ad is displayed along with other bidders who registered for the same or similar key word. The ordering of the listing is based on the 'bid price' of the advertiser and the 'relevance' of the keyword to the registered 'keyword'. 

AdSense 
 Suppose we have a website, and it became somewhat popular. We want to generate some revenue out of it. What we can do is, register for Google's Adsense. We know that a set of advertisers have registered with Google. AdSense is a Google program which displays advertisements on our website. These ads will be administered by Google. And these ads will based on website content and geographical location of the user. A part of the revenue from these ads will be given to us by Google.

We can say that AdWords and AdSense are inter-linked.  The ads registered for AdWords are displayed in Adsense.

 Android and Chrome 
 Google product like Android OS, Chrome OS and Chrome browser present an interesting case.  Take the case of Android and Chrome OS. Any device manufacture can download a version of them, make their own changes and then include in their products like mobile phones. Google is not getting any money from it. But they are spending a lot of money for the research an development these products.  The case of Chrome browser is also similar.

 So the answer is, Google does not want to earn money directly from these products. They want to do it indirectly. 

 What is chrome OS? It is an OS used for Netbooks. What is Netbook? It is a mini laptop used mainly for web browsing. What is Android? It is a OS used for smart phones. One main use of them is internet usage. Similarly there is Chrome Web browser.

 The common factor in these is 'internet'. So Google want to be main player in internet usage. And it wants people to spend more time in internet. More time in internet means, more money earned from advertisements. Google know that netbooks and smartphones will increase the internet usage. So they want their products to be used there. So they can control the web world and will have more options in displaying ads.

 Also keep in mind that,  in future desktop applications will be replaced almost completely by web applications. And Cloud data storage is coming up. So Google want to be in the thick of things and to be the control point of the web. 

 Stats
   Google got 5.51 billion from Q1 2009.  Some stats are available in the link http://investor.google.com/releases/2009Q1_google_earnings.html. 

Google- An Advertising Company?
 So Google sells the traffic on internet and earns money. The more time you spend on net, the more google gets money. We can say that google is an advertising company rather than a technology company. Because it earns revenue from ads rather than selling technology.



Wednesday, November 18, 2009

The meaning of Hacking...

We all hear about hackers everyday. They are attacking banks or they are getting some secret information from pentagon etc. And they intrude into our system to get passwords for bank accounts.

At the same time, we hear about Hackers' symposiums such as 'Linux Hackers Meet'. So what is this about? Hackers can meet somewhere and discuss future plans? (such as which bank to attack?). Or does the word 'Hacking' has any other meaning?

If we read any Computer Science books, we can understand that they use the word 'hacking' as 'clever fix for a problem'. It is not about 'hacking' into any banks or computers. An example is the book 'Hacking Linux Kernel'. This book is about going into details of linux kernel.

Richard Stallman defines 'hacking' like this

"Playfully doing something difficult, whether useful or not, that is hacking."

 So initially this word is used to denote doing something clever. But later media used the word 'hacking' instead of 'evil hacking'.

  So whenever we this word in the media, we can understand it as 'evil hacking'.  But if we are seeing it in computer books, we can infer 'clever fix'.

Monday, November 2, 2009

Android, is it a new OS or just a linux distro?


  Android is fastly gaining popularity in the mobile market. New Android phones like Motorola's DROID are coming up.

There is a general perception that Android is new Operating System. But some others argue that it is just another linux distribution(distro). So what is android actually?

What is linux distro?

A linux distribution is a full package consisting of OS, libraries and utilities. Fedora, SUSE, Debian are examples of linux distro. A distro will have a linux kernel as the base. Then GNU libraries and applications constitute the application space. The applications (mainly C applications) communicate to the linux kernel via GNU libc.

                             

What is Android?

Android also have Linux kernel as the base. But Google do not use GNU libraries or utilities. Here they use bionic libc and some utilities which are different from that of normal linux distribution.
  There are mainly two reasons for this.  The first one is that they want to have minimum footprint for the libraries, because it is going to be used in mobile phones which have limited resources. GNU libraries and utilities are known to have bigger footprint.

    Another reason is that they want to avoid GPL licensing. Google want to allow the use of proprietary software and libraries, which is not possible if they use GPL licensing. So they adopted BSD licensing.


  The applications constitute browser, contacts etc.
Application Framework provides components common to the applications. This includes Resource Manager, Activity  Manager, Window Manager etc.
Android libraries constitute Bionic libc, SQ Lite for data storage, Open GL for graphics handling, Media Framework for handling audio, video etc.
Run time libraries include libraries to give run time support for java applications.  This include Dalvik Virtual Machine.
 A detailed explanation is given in the Android developer’s site.

Verdict
  In Android the linux kernel constitutes the OS part. From a layman's perspective, it can be a new OS. Because he sees only the application components, which are quite different from normal linux distributions. But if you are a programmer, especially driver developer, you will not agree that it is not new OS. You will say that it just a different kind of distribution.

 So my argument is , Android is a platform (or software stack) optimized for mobile phones.  It is not a distribution like Fedora or debian.  It is not a new OS also. If we check android developer site, nowhere it is claimed that it is a new OS.

Monday, October 26, 2009

GPL, LGPL ..

    Most of the open source softwares  are licensed under GPL or LGPL now.
  So what is GPL or LGPL?

     They are 'free software licenses' used for the open source programs. Here the word 'free' means freedom to do anything, not free of cost. These are good examples of CopyLeft practice.

  GPL(General Public License) is license published by Free Software Foundation to protect open source softwares.  Suppose if we are publishing a software or code under GPL, then anybody can copy, modify and redistribute this software or code. But they are obliged to publish the new version in GPL license only. That is, they also need to provide the same freedom to whoever they are giving it. And if  somebody is using the GPL licensed code in their software, they are obliged to release the source code also.

  LGPL(Lesser General Public License)  is a weak version of GPL. If we have released our code under LGPL, then independent open source or proprietary software can link this code to their software. For Example, a non (L)GPL program  can link to a LGPL library. So LGPL is normally used for libraries.  So if a proprietary software is using an LGPLed shared library, then that software is not required to give the source code. But if we are using LGPLed code as static library, then that software is required to give either source code or object files.

  So usually libraries are published under LGPL and other codes are published under GPL. But now people like Richard  Stallman are suggesting to license some libraries under GPL. This will cause proprietary softawares to abandon these libraries. So he believes, this may give edge to free software programs over proprietary programs.

GPL v2 and GPL v3

  GPL v2 was launched in 1991. But there were allegations that some vendors are misusing loopholes in GPL v2. One example is the distribution of the free software in a device which cannot execute modified versions.

  One popular Digital Video recorder company used GPLed code to build their software and they made it availble through their website. But if somebody wants to modify it and run on their device, it required one cryptographic key which company is not providing. So this make it virtually impossible for anybody to modify their software.


  GPL v3 was launched in 2007 in a view to close these kind of loopholes.