Monday, December 23, 2024

Operating System (OS)

 Operating System a type of system software. It basically manages all the resources of the computer. An operating system acts as an interface between the software and different parts of the computer or the computer hardware. The operating system is designed in such a way that it can manage the overall resources and operations of the computer. 

Operating System is a fully integrated set of specialized programs that handle all the operations of the computer. It controls and monitors the execution of all other programs that reside in the computer, which also includes application programs and other system software of the computer. Examples of Operating Systems are Windows, Linux, Mac OS, etc.

An Operating System (OS) is a collection of software that manages computer hardware resources and provides common services for computer programs. In this article we will see basic of operating system in detail.

What is an Operating System Used for?

The operating system helps in improving the computer software as well as hardware. Without OS, it became very difficult for any application to be user-friendly. The Operating System provides a user with an interface that makes any application attractive and user-friendly. The operating System comes with a large number of device drivers that make OS services reachable to the hardware environment. Each and every application present in the system requires the Operating System. The operating system works as a communication channel between system hardware and system software. The operating system helps an application with the hardware part without knowing about the actual hardware configuration. It is one of the most important parts of the system and hence it is present in every device, whether large or small device.

An Operating System can be defined as an interface between user and hardware. It is responsible for the execution of all the processes, Resource Allocation, CPU management, File Management and many other tasks.



The purpose of an operating system is to provide an environment in which a user can execute programs in convenient and efficient manner.


Functions of the Operating System

Resource Management:  The operating system manages and allocates memory, CPU time, and other hardware resources among the various programs and processes running on the computer.

Process Management:  The operating system is responsible for starting, stopping, and managing processes and programs. It also controls the scheduling of processes and allocates resources to them.

Memory Management: The operating system manages the computer’s primary memory and provides mechanisms for optimizing memory usage.

Security:  The operating system provides a secure environment for the user, applications, and data by implementing security policies and mechanisms such as access controls and encryption.

Job Accounting:  It keeps track of time and resources used by various jobs or users.

File Management:  The operating system is responsible for organizing and managing the file system, including the creation, deletion, and manipulation of files and directories.

Device Management: The operating system manages input/output devices such as printers, keyboards, mice, and displays. It provides the necessary drivers and interfaces to enable communication between the devices and the computer.

Networking: The operating system provides networking capabilities such as establishing and managing network connections, handling network protocols, and sharing resources such as printers and files over a network.

User Interface: The operating system provides a user interface that enables users to interact with the computer system. This can be a Graphical User Interface (GUI), a Command-Line Interface (CLI), or a combination of both.

Backup and Recovery: The operating system provides mechanisms for backing up data and recovering it in case of system failures, errors, or disasters.

Virtualization: The operating system provides virtualization capabilities that allow multiple operating systems or applications to run on a single physical machine. This can enable efficient use of resources and flexibility in managing workloads.

Performance Monitoring: The operating system provides tools for monitoring and optimizing system performance, including identifying bottlenecks, optimizing resource usage, and analyzing system logs and metrics.

Time-Sharing: The operating system enables multiple users to share a computer system and its resources simultaneously by providing time-sharing mechanisms that allocate resources fairly and efficiently.

System Calls: The operating system provides a set of system calls that enable applications to interact with the operating system and access its resources. System calls provide a standardized interface between applications and the operating system, enabling portability and compatibility across different hardware and software platforms.

Error-detecting Aids: These contain methods that include the error messages, and other debugging and error-detecting methods.


Types of Operating Systems

Batch Operating System: A Batch Operating System is a type of operating system that does not interact with the computer directly. There is an operator who takes similar jobs having the same requirements and groups them into batches.

Time-sharing Operating System: Time-sharing Operating System is a type of operating system that allows many users to share computer resources (maximum utilization of the resources).

Distributed Operating System: Distributed Operating System is a type of operating system that manages a group of different computers and makes appear to be a single computer. These operating systems are designed to operate on a network of computers. They allow multiple users to access shared resources and communicate with each other over the network. Examples include Microsoft Windows Server and various distributions of Linux designed for servers.

Network Operating System: Network Operating System is a type of operating system that runs on a server and provides the capability to manage data, users, groups, security, applications, and other networking functions.

Real-time Operating System: Real-time Operating System is a type of operating system that serves a real-time system and the time interval required to process and respond to inputs is very small. These operating systems are designed to respond to events in real time. They are used in applications that require quick and deterministic responses, such as embedded systems, industrial control systems, and robotics.

i. Hard Real-Time Systems

In hard real-time systems, it is absolutely impossible to fail to meet a deadline. The consequence of missing a deadline may be disastrous, even failing the system or loss of life.

Examples: Flight navigation and control aircraft, Medical devices, like pacemakers.

It is required that strict guarantees be established so that the jobs will definitely be executed on time. Failure can be very disastrous.

ii. Soft Real-Time Systems

In this system type, occasional missed deadlines may not result in catastrophic failure but can degrade the performance or usability of the system.

Examples: Video streaming (occasional delays or buffering are acceptable) and online transaction systems (like bank ATMs, where slight delays are tolerable).

The system may still be functionally operational and workable even if some deadline misses do occur, though the performance would be adversely affected. This has focused on efficiency and the removal of delays rather than absolute precision.

iii. Firm Real-Time Systems

In between hard and soft real-time systems, there are firm real-time systems. In that case, there is no crash, but the result of the task is worthless when it doesn't meet the deadline. There's a minimum kind of penalty, but the value of the completion of the task goes significantly down if it is not made in time.

Multiprocessing Operating System: Multiprocessor Operating Systems are used in operating systems to boost the performance of multiple CPUs within a single computer system. Multiple CPUs are linked together so that a job can be divided and executed more quickly.

Single-User Operating Systems: Single-User Operating Systems are designed to support a single user at a time. Examples include Microsoft Windows for personal computers and Apple macOS.

Multi-User Operating Systems: Multi-User Operating Systems are designed to support multiple users simultaneously. Examples include Linux and Unix.

Embedded Operating Systems: Embedded Operating Systems are designed to run on devices with limited resources, such as smartphones, wearable devices, and household appliances. Examples include Google’s Android and Apple’s iOS.

Cluster Operating Systems: Cluster Operating Systems are designed to run on a group of computers, or a cluster, to work together as a single system. They are used for high-performance computing and for applications that require high availability and reliability. Examples include Rocks Cluster Distribution and OpenMPI.


Advantages of Batch OS

It has increased efficiency, like a resident monitor that eliminates CPU idle time between jobs to enable it to smoothen the switching of tasks.

The automatic handling of the processing of jobs means that users should not take control to intervene in whatever is going on while running or executing tasks.

The resources, such as the CPU and the memory, are utilized and not left idle.

It goes well with the payroll as well because it keeps processing jobs in batches without any time wastage and hard work.

It can also perform even very huge complex jobs without any intermission because it simply streams without any intermission, even when the task is excessively intensive.

Group jobs as 'batches' remove most of the manual setup that had to be done in between individual tasks, thereby saving time.

It logs and deals with errors at the time when the batch is over. This allows the system to run even without intermissions.

Disadvantages of Batch OS

1. Starvation

Batch processing suffers from starvation.

2. Not Interactive

Batch Processing is not suitable for jobs that are dependent on the user's input. If a job requires the input of two numbers from the console, then it will never get it in the batch processing scenario since the user is not present at the time of execution.

3. Delayed Output

Since the jobs are submitted in batches, the output is not produced in time. Such a condition can be rather inconvenient for time-critical jobs.

4. Difficult to Debug

An error is found only after the entire batch has been processed, which makes it even harder to locate and fix an issue in real-time.

5. It Requires Knowledge of Job Scheduling

The users or the system administrator should know well about the behavior of the system as well as dependencies among tasks.

6. Large Jobs Cause Delays

If a batch contains a large job, then problems may occur because the processing of all the subsequent jobs is delayed. This, therefore, slows down the overall system performance.


Advantages of Multiprogramming OS

  • Throughout the system, it increased as the CPU always had one program to execute.
  • Response time can also be reduced.
  • Multiprogramming maximizes the utilization of resources like memory, I/O devices, and processing power since more than one program can be kept alive at any time.
  • Since several jobs are being processed in parallel, significantly more tasks could be completed within a certain amount of time, thus enhancing the overall throughput of the system.
  • During times when a program is waiting for I/O operations, the processor does not go idle since it jumps on to another task to continue processing.
  • The system can support both short and long tasks to be executed in parallel, which makes for a more dynamic and productive processing environment.

Disadvantages of Multiprogramming OS

  • Multiprogramming systems provide an environment in which various systems resources are used efficiently, but they do not provide any user interaction with the computer system.
  • Multiple programs increase system complexity, as the operating system needs to manage multiple processes, memory management, and scheduling.
  • It requires more memory compared to less sophisticated operating systems because multiple programs run in memory simultaneously.
  • The operating system has to switch between the running processes continuously, and this leads to scheduling overhead and reduces performance.
  • As several concurrent operations access shared resources simultaneously, the system is likely to experience deadlocks: two or more processes waiting for each other for further actions.
  • Resource contention due to competition for scarce resources could degrade performance.


Advantages of Multiprocessing Operating System:

  • Increased Reliability: Because multiple processors are present, if one fails, others may take over it, thus stabilizing the system.
  • Increased Throughput: More jobs can be processed at the same time by these multiple processors than by a single processor, thereby increasing the speed of execution.
  • Efficient Resource Utilization: It acts more productively upon the utilization of resources like CPU, memory, and I/O devices.
  • Parallelism: Many processes can run parallel, which increases the speed of execution to a large extent.
  • Scalability: As the workload increases, more processors can be added to enhance performance.

Disadvantages of Multiprocessing Operating System:

  • Complexity: There is a rise in the complexity of the system while dealing with a number of processors and proper distribution of tasks.
  • Increased Cost: Hardware equipment added in multiprocessing systems increases their cost
  • Communication Overhead: Generally, communication among processors results in overhead and provides a slight reduction in efficiency.
  • Software Compatibility Problems: Generally, most software is not designed to operate properly with multiprocessing systems.


Advantages of the Multitasking Operating System:

  • This system can handle multiple users or tasks at once; therefore, it is best utilized in multi-user environments.
  • The memory is allocated dynamically and efficiently to various tasks so that there is optimal usage of system resources.
  • More applications can be run at the same time, which increases productivity because tasks are executed concurrently.
  • It provides for rapid shifts between tasks, therefore, shortening the response time for the user.
  • Because the system keeps running by switching between tasks, CPU time and other system resources are consumed more effectively.

Disadvantages of Multitasking Operating System:

  • The multitasking environment makes a number of processors busier at the same time; that is, the CPU generates more heat.
  • The managing of different tasks all together requires a more sophisticated algorithm, which becomes complex to administer.
  • Running too many applications at the same time can stress the system to a point where performance degrades.
  • In this scenario, multiple tasks will be competing for the same resources, thereby delaying them.
  • Multitasking systems usually require more powerful hardware, especially in terms of memory and processing power, to run without a hitch.


Advantages of Network Operating Systems

  • Since network applications are split between the clients and the servers, this minimizes the total number of communications on the network, thus increasing performance.
  • Configuring as well as maintaining an NOS is less expensive than other elaborate systems since shared resources reduce duplication needed.
  • A NOS grants centralized control over data, security, and resource management. That means that administrations may easily manage a large network.
  • Scaling of the systems can be made easily in terms of organization growth. Easly, new clients or servers can be added without reconfiguring the system.
  • It shares resources like printers, files, and applications, which reduces hardware and software redundancy.

Disadvantage of Network Operating System

  • If one node or server fails, it affects the whole system, and network functions will be interrupted. Hence, reliability is important.
  • Security needs to be robust so that unauthorized access is restricted. Complex security measures demand constant monitoring and updating.
  • The skilled network administrators involved will handle system performance, security configurations, and troubleshooting.
  • When the network size is too large, and traffic is heavy, it degrades with time if it's not monitored and maintained, which is constantly demanding attention.
  • This is because an attacker, once able to gain access to one server, comes close to achieving his goal for multiple resources contained in the entire network.


Advantages of Real-Time Operating System:

  • Real-time applications are quite easy to design, develop, and implement under a real-time operating system.
  • Maximum utilization of devices and systems in a Real-Time Operating System.
  • Fast response to events.
  • High reliability in the performance of time-critical operations.
  • Strict scheduling ensures the predictable execution of tasks.

Disadvantages of Real-Time Operating System:

  • Real-time operating systems are very expensive to design.
  • Real-time operating systems are very resource-intensive and consume critical CPU cycles.
  • Less multitasking support.
  • Lacks adaptability to new functions.
  • At times, it demands specific hardware.


Advantages of Time-Sharing Operating System

  • The time-sharing operating system facilitates effective utilization and sharing of resources.
  • This system helps decrease CPU idle and response time.
  • It allows various users to access and interact with their programs at the same time, and it leads to greater productivity.
  • Time-sharing assures better memory management because it swaps programs into and out of main memory efficiently.
  • An interactive computing environment provides users with real-time access to their programs and files.

Disadvantages of Time-Sharing Operating System

  • Data transmission rates compared to others are very high
  • The integrity and security of the user programs loaded in memory and data have to be ensured since many users access the system concurrently.
  • Implementation as well as management of time-sharing systems is more complicated than others since there is a tendency for task scheduling and memory management.
  • Since more and more users get hooked to the system, it degrades due to resource contention.
  • However, with time, context switches between tasks will incur overheads, thereby impacting the overall efficiency of the system.


Advantages of Distributed Operating System

  • The distributed operating system offers resource sharing.
  • This is a fault-tolerant system.
  • Scalability is achieved and easily new nodes can be added to the system.
  • Distributed task execution improves its performance.
  • Parallel processing helps in increasing the speed of job execution and enhances efficiency in getting results.

Disadvantages of Distributed Operating System

  • Protocol overhead might control computation costs.
  • The managing of the system is complex as it works in distributed.
  • Security may prove difficult on multiple nodes.
  • The system highly depends on network stability for it to run without hassles.


Examples of Operating Systems 

  1. Windows (GUI-based, PC)
  2. GNU/Linux (Personal, Workstations, ISP, File, and print server, Three-tier client/Server)
  3. macOS (Macintosh), used for Apple’s personal computers and workstations (MacBook, iMac).
  4. Android (Google’s Operating System for smartphones/tablets/smartwatches)
  5. iOS (Apple’s OS for iPhone, iPad, and iPod Touch)

No comments:

Post a Comment

AI chatbot

 An AI chatbot is a software application designed to simulate human conversation using artificial intelligence (AI). It can interact with us...