An operating system (OS) is a system software that manages computer hardware and software resources and provides common services for computer programs All computer programs, excluding firmware, require an operating system to function.
Single Processor vs Multi Processor System
Single processor system
A single-core processor is a microprocessor with a single core on a chip, running a single thread at any one time. The term became common after the emergence of multi-core processors (which have several independent processors on a singlechip) to distinguish non-multi-core designs.
- Maximum systems use single processor systems.
- Single Processor Systems perform only one process at a given time, and it carries out the next process in the queue only after the current process is completed.
- OS monitors the status of them and also sends them next executable instruction.
- It relieves CPU of disk scheduling and other tasks.
- It is suitable for general purpose computers , as it cannot run multiple processes in parallel.
Multi Processor System
Multiprocessing is the use of two or more central processing units (CPUs) within a single computer system. The term also refers to the ability of asystem to support more than one processor or the ability to allocate tasks between them.
- Also known as parallel or tightly coupled systems as they can run multiple process in parallel to each other efficiently.
- Two or more processors will be in close communication with each other with shared memory, storage and power supply.
-->In these days rather than using multi processor systems, people tend to buy single processor with multiple cores. This can be more efficient as internal on-chip communication is faster than communication between different processors.
-->Multi-core processors also use less power than that of multiple single core processors.
Multi Processor
-->Multi-core processors also use less power than that of multiple single core processors.
Multi Processor
Advantages Of Multi Processor Systems
Economy of scale
Multi Processor Systems cost less than a number of individual single processor system. In the case of multi processor system expenditure for system cabinet, memory power supply, accessories are saved as these systems share resources like power supply, memory and also space.
Increased throughput
As there are a number of processors, more work can be done in less time. These multiple processors run parallel to each other increasing the performance of the system.
Reliability and failure-free
Failure of any processor will not affect the functionality of the system, as there are a number of processors. We can expect failure free service from multi-processor system.
Difference Between Symmetric and Asymmetric Multiprocessing
There are two types of multiprocessing, Symmetric Multiprocessing and Asymmetric Multiprocessing. Multiprocessing system has more than one processor and they can execute multiple process simultaneously. In Symmetric Multiprocessing, processors shares the same memory. In Asymmetric Multiprocessing there is a one master processor that controls the data structure of the system. The primary difference between Symmetric and Asymmetric Multiprocessing is that in Symmetric Multiprocessing all the processor in the system run tasks in OS. But, in Asymmetric Multiprocessing only the master processor run task in OS.
Symmetric Vs Asymmetric Multiprocessing
BASIS FOR COMPARISON | SYMMETRIC MULTIPROCESSING | ASYMMETRIC MULTIPROCESSING |
---|---|---|
Basic | Each processor run the tasks in Operating System. | Only Master processor run the tasks of Operating System. |
Process | Processor takes processes from a common ready queue, or there may be a private ready queue for each processor. | Master processor assign processes to the slave processors, or they have some predefined processes. |
Architecture | All processor in Symmetric Multiprocessing has the same architecture. | All processor in Asymmetric Multiprocessing may have same or different architecture. |
Communication | All processors communicate with another processor by a shared memory. | Processors need not communicate as they are controlled by the master processor. |
Failure | If a processor fails, the computing capacity of the system reduces. | If a master processor fails, a slave is turned to the master processor to continue the execution. If a slave processor fails, its task is switched to other processors. |
Ease | Symmetric Multiprocessor is complex as all the processors need to be synchronized to maintain the load balance. | Asymmetric Multiprocessor is simple as master processor access the data structure. |
What is a clustered operating system?
A computer cluster consists of a set of loosely or tightly connected computers that work together so that, in many respects, they can be viewed as a single system. Unlike grid computers, computer clusters have each node set to perform the same task, controlled and scheduled by software.
Clustered systems are another form of multiprocessor system. This system also contains multiple processors but it differs from multiprocessor system. The clustered system is composed of multiple individual systems that connected together. In clustered system, also individual systems or computers share the same storage and liked to gather via local area network. A special type of software is known as cluster to control the node the systems.Other form of clustered system includes parallel clusters and clustering over a wide area network. In parallel cluster multiple hosts can access the same data on the shared storage. So many operating systems provide this facility but some special software are also designed to run on a parallel cluster to share data.
What is the use of Windows clustering?
A cluster is a group of independent computer systems, referred to as nodes, working together as a unified computing resource. A cluster provides a single name for clients to use and a single administrative interface, and it guarantees that data is consistent across nodes.
Difference Between Single Processor Systems & Multiprocessor Systems
OS as a Resource allocater
An operating system is a program that manages the computer hardware.The OS acts as a manager for these resources so it is viewed as a resource allocator. The OS is viewed as a control program because it manages the execution of user programs to prevent errors & improper use of the computer.
What are the resources allocated by the operating system?
In computing, resource allocation is necessary for any application to be run on thesystem. When the user opens any program this will be counted as a process, and therefore requires the computer to allocate certain resources for it to be able to run.
What is system resource management and operating system?
Resource management is the dynamic allocation and de-allocation by anoperating system of processor cores, memory pages, and various types of bandwidth to computations that compete for those resources. The objective is to allocate resources so as to optimize responsiveness subject to the finite resourcesavailable.
operating system acts as a Resource Manager
Modern computers consist of processors, memories, timers, disks, mice, network interfaces, printers, and a wide variety of other devices. In the alternative view, the job of the operating system is to provide for an orderly and controlled allocation of the processors, memories, and input/output devices among the various programs competing for them.
When a computer (or network) has multiple users, the need for managing and protecting the memory, input/output devices, and other resources is even greater, since the users might otherwise interface with one another. In addition, users often need to share not only hardware, but information (files, databases, etc.) as well. In short, this view of the operating system holds that its primary task is to keep track of which programs are using which resources, to grant resource requests, to account for usage, and to mediate conflicting requests from different programs and users.
Resource management includes multiplexing (sharing) resources in two different ways:
- Time Multiplexing
- Space Multiplexing
1. Time Multiplexing
When the resource is time multiplexed, different programs or users take turns using it. First one of them gets to use the resource, then another, and so on.
For example:
With only one CPU and multiple programs that want to run on it, operating system first allocates the CPU to one long enough, another one gets to use the CPU, then another and ten eventually the first one again.
Determining how the resource is time multiplexed – who goes next and for how long – is the task of the operating system.
2. Space Multiplexing
In space multiplexing, instead of the customers taking turns, each one gets part of the resource.
For example:
Main memory is normally divided up among several running programs, so each one can be resident at the same time (for example, in order to take turns using the CPU). Assuming there is enough memory to hold multiple programs, it is more efficient to hold several programs in memory at once rather than give one of them all of it, especially if it only needs a small fraction of the total. Of course, this raises issues of fairness, protection, and so on, and it is up to the operating system to solve them.