DEV Community

Cover image for Operating Systems and its Types: Understanding the Basics.
Kinjal Shah
Kinjal Shah

Posted on • Originally published at kinjalshah.hashnode.dev

Operating Systems and its Types: Understanding the Basics.


Introduction

An operating system is made up of a collection of system software that performs several critical functions, such as providing access to the computer hardware and serving as an interface between the user and the hardware. It is a computer program that acts as a manager for all the other programs and hardware on a computer. It makes sure all the different parts of the computer work together properly. It helps you run software programs, manage files, and communicate with other devices like printers and networks.

Definition

The operating system (OS) is a program that manages all the resources of a computer system, including hardware and software. It provides an environment that allows users to run their programs efficiently and conveniently hiding the underlying complexity of the hardware and acting as a resource manager.

Why OS is important?

The need for an operating system is evident when we consider what would happen without it.

  • Applications would become bulky and complex, as they would need to include hardware interaction code within their code base.

  • Resource exploitation would occur, as a single application could monopolize resources, leading to system crashes and other issues.

  • There would be no memory protection, which could lead to data loss and corruption.

OS provides the foundation for a computer to function properly. It manages all the resources of the computer, including the central processing unit (CPU), memory, and input/output (I/O) devices like the keyboard, mouse, and display screen. Without an operating system, it would be difficult to run applications, manage files and folders, and connect to the internet or other networks.

Thus operating systems are essential for modern computing and have a significant impact on the usability, security, and functionality of a computer system.

Functions of the operating system

  • Resource Management: The OS manages all the resources of a computer system such as the CPU, memory, and input/output (I/O) devices. It allocates these resources to different programs as per their need and ensures that the resources are not compromised.

  • Process Management: The OS manages all the system and user processes running on the computer system. It creates, terminates, and schedules processes as needed.

  • Memory Management: The OS manages the memory of the computer system. It allocates and deallocates memory to different programs and processes as needed. It also manages the virtual memory of the system.

  • File Management: The OS manages the files and folders on the computer system. It includes creating, deleting, and renaming the files. It also manages access of the user or program that can access the file.

  • I/O Device Management: The OS manages the input/output (I/O) devices on the computer system. It provides device drivers to communicate with these devices. It also manages the sharing of these devices among different programs and users.

Types of operating systems

Single-process operating system

Single-process operating system allows to run only one program at a time. All the computer's resources are used to execute a single program or process. After that program or process finishes executing, the OS loads and executes another program or process.

Advantages of Single-process Operating System:

  • Easy to use and understand.

  • Minimal resource requirements as only one program runs at a time. This makes them suitable for small devices.

Disadvantages of Single-process Operating System:

  • Limited functionality as single-process operating systems performs only one task at a time. They are not suitable for large systems that require multitasking.

  • Inefficient as it increases CPU idle time when the program is in a wait state.

Batch operating system

Batch Operating System processes jobs with similar needs in batches. The operator collects jobs from different users and makes a batch of similar jobs. The operator submits it to the operating system and it executes them one after the other batch.

Advantages of Batch OS:

  • Efficient as it processes large amounts of data with minimal human interruption.

  • Quick and accurate in handling repetitive tasks.

Disadvantages of Batch OS:

  • Difficult to find the status of jobs because of no interaction with the user in batch processing.

  • High starvation of jobs as they are processed in the order they are submitted, so if a high-priority job is submitted after a large batch of low-priority jobs, it will have to wait in the queue.

  • Difficult to detect errors until the entire batch has been processed.

Multiprogramming operating system

Multiprogramming OS runs multiple programs on a single CPU. The operating system manages the resources and allocates them to different programs or processes based on their priorities and requirements. It uses context switching to switch the process when the current process goes to the wait state. Hence, the CPU is never idle.

Advantages of a multiprogramming OS:

  • Increased throughput and less starvation as the CPU runs multiple programs.

  • Increased Productivity as the CPU is never idle.

Disadvantages of a multiprogramming OS:

  • Increased complexity in managing multiple programs and their resources.

  • Increased overhead due to context switching.

Multitasking operating system

Multitasking OS is a logical extension of multiprogramming OS. It runs multiple applications or processes concurrently on a computer system. It uses context-switching and time-sharing to do multiple tasks simultaneously.

Advantages of multitasking OS:

  • Improved efficiency as multiple tasks is performed simultaneously.

  • Increased throughput as it performs various processes without interrupting its workflow.

  • Better resource management and less starvation as it manages system resources more efficiently.

Disadvantages of multitasking OS:

  • Increased overhead as the system needs to manage multiple tasks.

  • Increased security risks due to multiple processes and users.

Multi-processing operating system

Multii-processing OS have more than 1 CPU in a single computer system. It helps in performing multiple tasks simultaneously. This results in better utilization of available hardware resources and leads to improved system performance.

  • Advantages of multi-processing operating system:

  • Increased throughput as multiple CPUs work in parallel.

  • Less starvation as multiple CPUs helps to utilize available resources better making the system more efficient.

  • Improved reliability due to multiple CPUs. If 1 CPU fails, other CPUs will still be functioning.

Disadvantages of multi-processing operating system:

  • Complexity of the system increases.

  • More expensive and high maintenance as they require additional hardware and software.

Distributed operating system

A distributed operating system consists of multiple machines or nodes located in different physical locations. All machines or nodes are connected via a network. DOS uses the power of multiple nodes for handling data storage, processing, and communication. Each node in the system performs its tasks and communicates with other nodes to share resources or information.

Advantages of Distributed OS:

  • High performance and scalability as they can utilize the resources of multiple machines to complete tasks.

  • Fault-tolerant as failures in one node can be isolated and the rest of the system can continue to function.

Disadvantages of Distributed OS:

  • Increased complexity and maintenance due to multiple machines or nodes. Designing and implementing a DOS is difficult as it requires specialized knowledge and tools.

  • Increased latency and communication issues due to multiple nodes.

Network operating system

A network operating system (NOS) allows multiple computers to communicate, share resources, and coordinate their activities over a network. Examples of NOS include Novell NetWare, Windows Server, and Unix.

Advantages of NOS:

  • Centralized control in NOS helps in centralized control of resources, and security. It eases managing and maintaining a network.

  • Resource sharing like printers, files, and applications among multiple users or computers on the network improves efficiency and productivity.

  • High availability in NOS is possible due to features like redundancy and failover. It ensures that the network will remain operational even if one or more components fail.

Disadvantages of NOS:

  • Complex Set Up of NOS requires specialized knowledge and skills.

  • Expensive and requires high maintenance for large networks or enterprise-level deployments.

  • Increased security risks if NOS is not properly secured and maintained.

  • Performance issues due to an increase in users and devices accessing resources on the network.

Real-time operating system

Real-Time Operating Systems (RTOS) handle applications with strict timing and responsiveness requirements. They are used in systems that require real-time error-free computations. Examples of such applications include air traffic control systems, robots, industrial automation, and avionics.

Advantages of RTOS:

  • Critical real-time system as RTOS can predict that a specific task will be completed within a defined timeframe.

  • Optimization in RTOS helps to allocate resources to ensure that the system runs efficiently with minimal latency.

Disadvantages of RTOS:

  • More Complex and high maintenance system.

  • More Expensive as it contains specialized hardware and software to fulfill real-time requirements.

  • Limited flexibility as RTOS are built to handle specific applications and may not be suitable for other systems.

Mobile operating system

Mobile Operating System, also known as mobile OS, helps to manage mobile the hardware and software resources of the device devices such as smartphones, tablets, etc. It provides an interface for users to interact with the device. Mobile OS supports the installation and execution of mobile applications. Examples of popular mobile operating systems include Android, iOS, and Windows Phone.

Advantages of Mobile OS:

  • User-friendly interface of Mobile OS helps users to interact with the system easily.

  • Optimization helps with limited resources, such as battery power, memory, and CPU in Mobile OS

Disadvantages of Mobile OS:

  • Less security as Mobile OS can be vulnerable to security threats such as malware and viruses, especially when users download apps from untrusted sources.

Conclusion

Thus, an operating system is a program managing a computer’s hardware and software resources. The main functions of the operating system include resource management, process management, memory management, providing a user interface, and facilitating communication between software and hardware components.

Top comments (0)