Tag Archives: cluster system vs distributed system

What are the different types of Operating systems?

In last post I have mentioned about Operating system and  types of kernel. In this I will be describing about various types of operating systems. I am not getting into all the details . I am just giving what is what.

There are generally various types of Operating systems , categorized based on the

1)    How the data is entered into the system

2)    Number of users, OS  can support

3)    Number of Tasks, OS can run in parallel

4)    Response time for a service 

5)    Special purpose systems

6)   Type of architecture of the computer 

1)    How the data is entered into the system

1.a  Batch Operating system

In olden days  from 1955-65, the most common devices were card reader and tape driver. The common o/p devices were printer, tape driver and punch card. The user does not directly interact with computer system. The programmer responsibility was to prepare the program, data or any information that is to be processed and  punch it on the cards, finally submitted to the computer operator. At some time later, when the computer finish the task whatever job it was running, and operator finally print the result. And hand over to the programmer. Much computer time was wasted while operators were walking around the machine room. The method adopted to reduce the waste time was batch system. The operating system used at that time was very simple, as its main job is to transfer the control automatically from one job to next. The basic idea behind this was to collect the similar information and read them onto a magnetic tape. After collecting a batch of jobs, the tape was brought into the machine room, where it was mounted on the tape driver. OS runs the series of jobs sequentially without user intervention. Now a days batch system have been almost replaced by GUI systems , although the internal functions of an operating system are done even now through batch system ,if a task is indeed repetitive, a batch process can be used to automate much of the work in any OS. Example : Mainframe OS

1.b  Interactive Operating system

An operating system that allows users to run interactive programs. Pretty much all operating systems that are on PCs are interactive OS’s

2 & 3) Number of users  OS can support and Number of Tasks OS can run in parallel 

a. Single-user, single task –

     As the name implies, this operating system is designed to manage the computer so that one user can effectively do one thing at a time. DOS and The Palm OS for Palm handheld computers is a good example of a modern single-user, single-task operating system.

b. Single User – Multi-Tasking OS

This OS allows a single user to simultaneously run multiple applications on their computer. This is the type of operating system found on most personal desktop and laptop computers. The personal editions of Windows (Microsoft) and Macintosh (Apple) platforms are the most popular single-user, multi-tasking OS. For example, it’s entirely possible for a Windows user to be writing a note in a word processor while downloading a file from the Internet while printing the text of an e-mail message.

 C. Multi-User OS

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.Unix,Solaris,Linux,Windows NT are examples of multi-user operating systems.

4)    Response time for a service 

a. Real time operating system(RTOS)

This OS is intended to serve real time application requests.

When an application makes calls to the OS how much  time the service takes to send a response back is variable. In RTOS we implement the services in such a way that irrespective  of the load, the  response time is fixed.

If the response time is fixed then application can be designed deterministic  and predictable behavior .

There are mainly 3  types of RTOS.

In hard real-time systems, the most critical type, failure to meet its time constraints will lead to system failure (imagine a nuclear reactor control system or Missile).

In firm real-time systems, the time constraints must be met in most cases, but can tolerate missing a low number of deadlines (consider a food processing plant control system).

In soft real-time systems, the performance is degraded when time constraints are not met but the system will not catastrophically fail (this is often the case with real-time animation of visual displays)

Example : RTlinux, VXWorks, Windows CE, QNX

5)    Special purpose systems 

a. Embedded OS

Embedded OS runs on  a computer system designed to perform one or a few dedicated functions, unlike general purpose OS.

Industrial machines, automobiles, medical equipment, cameras, household appliances, airplanes, vending machines and toys (as well as the more obvious cellular phone and PDA)

Example : embedded Linux, Android,iOS

Embedded OS  often comes with RTOS capability.

6)   Type of architecture of the computer 

6.a. Multiprocessor Operating system

At any given time there is a technological limit on the speed with which a single processor can operate. If the system workload cannot be handled satisfactorily by the single processor. The response is to apply multiple processors to the problem and is known as multiprocessor environment. This also provides  the Increased reliability and economy of scale.

An Operating System capable of supporting and utilizing more than one computer processor is called a Multiprocessor Operating system

Multiprocessor systems are broadly divided into

6.a.1 Tightly-coupled:

Processors work in close association, possibly sharing memory / node peripherals.This is the typical multiprocessor model

6.a.2. Loosely-coupled :

Each processor has its own memory and copy Of the OS. This is  again classified into  Multi computer (cluster) , distributed  systems (wide area Multi computer)

The tightly-coupled   multiple-processor systems in use today are of two types.

Asymmetric(Master/Slave) and

Symmetric.

 6.a.1.1 Asymmetric(Master/Slave)

A master processor controls the  OS and other processors
either look to the master for instruction or have predefined tasks. This scheme
defines a master-slave relationship. The master processor schedules and
allocates work to the slave processors.

This arrangement allows the parallel execution of a single task by allocating several subtasks to multiple processors concurrently. Since the operating system is executed by only master processors this system is relatively simple to develop and efficient to use.

The problem with this model is that with many CPUs, the master will become a bottleneck. After all, it must handle all system calls from all CPUs. If, say, 10% of all time is spent handling system calls, then 10 CPUs will pretty much saturate the master, and with 20 CPUs it will be completely overloaded. Thus this model is simple and workable for small multiprocessors, but for large ones it fails.

 6.a.1.2 symmetric

The most common systems use symmetric multiprocessing (SMP), in which each processor performs all tasks within the operating system. SMP means that all processors are peers; no master-slave relationship exists between processors.

since there is no master,  it introduces its own problems. In particular, if two or more CPUs are running operating system code at the same time, disaster will result. Imagine two CPUs simultaneously picking the same process to run or claiming the same free memory page. The simplest way around these problems is to associate a mutex (i.e., lock) with the operating system, making the whole system one big critical region. When a CPU wants to run operating system code, it must first acquire the mutex. If the mutex is locked, it just waits. In this way, any CPU can run the operating system, but only one at a time.

This model works, but is almost as bad as the master-slave model. Again, suppose that 10% of all run time is spent inside the operating system. With 20 CPUs, there will be long queues of CPUs waiting to get in. Fortunately, it is easy to improve. Many parts of the operating system are independent of one another. For example, there is no problem with one CPU running the scheduler while another CPU is handling a file system call and a third one is processing a page fault.

Virtually all modern operating systems—including Windows, Windows XP, Mac OS X, and Linux now provide support for SMP.

6.a.2. Loosely-coupled :

Each processor has its own memory and copy Of the OS. This is  again classified into  Multi computer (cluster) , distributed  systems (wide area Mult icomputer)

6.a.2.1 Multi comupter (Cluster) :

A cluster consists of two or more computers working together to provide a higher level of availability, reliability, and scalability than can be obtained by using a single computer.for the end users it appears as single computer(appliance).

Clustering can be structured asymmetrically or symmetrically.

In asymmetric clustering, one machine is in hot-standby mode while the other is running the applications. The hot-standby host machine does nothing but monitor and record the active server state . If that server fails, the hot-standby host becomes the active server.

In symmetric mode, two or more hosts are running applications, and are monitoring each other. This mode is obviously more efficient, as it uses all of the available hardware.

6.a.2.2 Distributed system(OS) :

These are similar to the multi computers in that each node has its own private memory with no shared physical memory in the system. However distributed systems are even more loosely couple than the multicomputer.

  To start with the nodes of a multicomputer  generally has a CPU,RAM,  a network interface and perhaps a hard disk for paging . In contrast ,each node in a distributed system is a complete computer with a full  complement of peripherals .

Next, The nodes of multicomputer are normally in a single room so they can communicate by a dedicated high-speed network. Where as the nodes of distributed system may be spread around the world.

Finally, all the nodes of a multicomputer run the same operating system share a single filesystem and are under a common administration. Whereas nodes of a distributed systems may run different operating systems , each have their own file system and be under different  administrators.

Network operating system vs distributed system operating system

at the first glance network operating system appears like distributed operated system . here is the difference.

A network operating system provides an environment in which users, who are aware of the multiplicity of machines, can access remote resources by either logging in to the appropriate remote machine or transferring data from the remote machine to their own machines.

 A computer running a network operating system acts autonomously from all other computers on the network, although it is aware of the network and is able to communicate with other networked computers. A distributed operating system provides a less autonomous environment: The different operating systems communicate closely enough to provide the illusion that only a single operating system controls the network.

Here is the comparison of Multi processor systems (OS).

Item Multiprocessor Cluster(Multicomputer) Distributed system
Node configuration Cpu CPU, RAM, net interface Complete computer
Node  peripherals All shared Shared exc, May be disk Full set per node
Location Same rock Same room Possible worldwide
Inter node communication Shared RAM Dedicated interconnect Tradition network
Operating systems One , shared Multiple, same Possibly all different
File systems One, Shared One, Shared Each node has own
Administration One organization One organization Many organizations

For some of the sections i have referred

1) Operating System Concepts – Silberschatz, Galvin, Gagne

2) Modern Operating Systems -Tanenbaum

3) Distributed Operating Systems -Tanenbaum

in Next post  I will talk about  virtualization operating systems.

/Suresh