Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Monday, 30 September 2013

Linux is Multiuser, Multitasking Operating System

Many students who study Unix programming and shell scripting have a question - “How is Linux a mutlitasking operating system?”, as they work from a terminal which looks like DOS.



Let us start with basics.


A single-user operating system is a type of operating system that is developed and intended for use on a computer or similar machine that will only have a single user at any given time. This is the most common type of OS used on a home computer, as well as on computers in offices and other work environments.


There are two general types of single-user operating system:

1. Single tasking

2. Multitasking systems.



Single tasking systems are the systems which are designed to manage the computer so that one user can effectively do one thing at a time.

The Palm OS for Palm hand held computers is a good example of a modern single-user, single-task operating system. DOS is also one the examples.


Multitasking refers to an operating system in which multiple processes, also called tasks, can execute (i.e., run) on a single computer seemingly simultaneously and without interfering with each other. That is, each process has the illusion that it is the only process on the computer and that it has exclusive access to all the services of the operating system.

Windows 95, Windows 98, Windows NT workstations and older Mac system are the examples of single user multitasking operating system.


A multi-user operating system allows many different users to take advantage of the computer's resources simultaneously. The operating system must make sure that the requirements of the various users are balanced, and that each of the programs they are using has sufficient and separate resources so that a problem with one user doesn't affect the entire community of users.

Linux, Unix, VMS and mainframe operating systems, such as MVS, are examples of multi-user operating systems.


There can be more than one users on a Linux system who can login through terminals simultaneously. This way Linux is multiuser OS.


Next time when you login in your Linux/Unix classes, try to run who command. You may find more than one users logged from different terminals along with you. The processes of different users are separate from each other and they get the CPU share equally. The CPU preempts very fast and so Linux is a mutlitasking OS. In fact when you run ps command you will get the name of processes being run from your terminal. And in order to get all the processes being run by the OS type ps aux command.


Linux terminal can run your processes in background too. Append a '&' to your command and run ps. You will get the job being run in background and at the same time your terminal free for next job.
Read More

Thursday, 20 September 2012

‘Linux: A Virus-Free OS’ – Truth or Myth ?



Linux the term is altogether an alien word for many people. And of the handful of people switching or let’s say having their ‘tryst’ with Linux, have a very common misconception – ‘Linux is virus free.’ A very debatable sentence, lets take a look at some arguments.
For getting to our point lets take a look at how a linux system works. Linux works in a multi-user environment, where users are given privileges of different magnitude for different purposes. A typical user would have normal privileges, simple enough to help him use the system but not change major system settings.
To spread a virus around you’ll have to gain access to the core of a linux system and for that you’ll need to have root access.
Linux is centered around security and gaining root access is nearly impossible. But, as they say, impossible is nothing. Viruses for linux  are on the rise. One of the major reasons is due to the fact that linux is being spread and marketed at quite a fast rate.
To accommodate novice users, GUI’s are being integrated. And this is one of the causes of rise in viruses. How? The following is a quote from a foobar blog post:
Then you save an email attachment under Linux, the execute flag is normally NOT set and thus, the file can’t be executed just by clicking on it. So, no luck?
Not so fast. Modern desktop environments, such as Gnome and KDE, conveniently offer a nice “workaround” called ‘launchers’. Those are small files that describe how something should be started. Just a few lines that specify the name, the icon that should be displayed and the actual command to execute. Conveniently, the syntax of those launcher files is the same for Gnome and KDE. And those launchers don’t have to have any execute permissions set on them! Desktop environments treat those files as a special case, so when you click on them Gnome or KDE will happily execute the command that was specified within the launcher description and without the need for the execute bit to be set on the launcher itself. Now we are getting somewhere!
But don’t jump the gun yet. Most of the linux distros are still way safer than Windows systems. The reason being that as they are open source and have full disclosure, developers are quick to release patches/fixes.
Also the reason why Linux viruses are rare, is because of the simple fact that the world has too muchWindows Users. So if a hacker could write a code and hack (for eg.) 60% of the world’s computers (as they are Windows-based systems) instead of only a handful of Linux computers, what would he choose?
Read More