UPSC Exam  >  UPSC Notes  >  Lucent For GK  >  Functions of Operating System

Functions of Operating System - Lucent For GK - UPSC PDF Download

Functions of Operating System

An Operating System (OS) is the central software that manages a computer's hardware and software resources and provides common services for computer programs. It acts as an intermediary between users (or application programs) and the computer hardware. The OS ensures that applications run reliably and efficiently while providing a safe, convenient environment for user interaction.

The principal functions of an operating system include process management, memory management, file management, device management, user interface provision, security and protection, resource allocation and system performance monitoring. Each function is essential for providing a stable and usable computing environment.

Functions of Operating System

Device Management

The OS controls and coordinates the use of hardware devices (printers, disks, keyboards, display units, network interfaces) through device drivers and system routines. Device management ensures correct and efficient communication between hardware and software.

  • Device tracking: The OS keeps a record of all connected devices and their current status.
  • Access control: The OS decides which process may use a device and for how long; it enforces mutual exclusion where required.
  • Allocation and de-allocation: Devices are allocated to processes when needed and released when no longer required.
  • Driver interaction: Device drivers provide the low-level interface between the OS and hardware.
  • Interrupt handling and DMA: The OS manages interrupts and Direct Memory Access to minimise CPU idle time during I/O.
  • Spooling and buffering: Techniques such as spooling are used for efficient use of slower devices (e.g., printers).

File Management

The OS provides a file system to organise, store, retrieve and protect user and application data. It defines how files and directories are created, named, stored, accessed and backed up.

  • File metadata: The OS maintains metadata such as file name, size, type, creation/modification timestamps and permissions.
  • Directory structure: Files are organised in directories (folders) for easier navigation and management.
  • Allocation methods: Common methods are contiguous, linked and indexed allocation; modern systems use allocation plus indexing (e.g., inodes in UNIX).
  • Access control: The OS enforces user permissions and access control lists (ACLs) to protect data.
  • File caching and buffering: Used to improve I/O performance.
  • Virtual file systems: Provide a uniform interface to different physical file systems.

Memory Management

Main memory (primary memory or RAM) must be managed so that multiple processes can execute without interfering with one another and so that CPU utilisation is maximised. The OS is responsible for allocating memory to processes, tracking used and free memory, and providing mechanisms such as virtual memory to give the illusion of larger memory.

  • Allocation and tracking: The OS keeps track of which parts of memory are allocated and to which processes.
  • Contiguous versus non‐contiguous allocation: Methods include fixed partitions, dynamic partitions, paging and segmentation.
  • Virtual memory: Uses disk space to extend apparent RAM; techniques include swapping, paging and demand paging.
  • Page replacement: Algorithms such as LRU (Least Recently Used), FIFO and optimal (theoretical) determine which pages to evict.
  • Fragmentation: The OS handles internal and external fragmentation and may use compaction or paging to reduce waste.

Processor Management

The OS manages the CPU by scheduling processes, handling context switches and ensuring fair and efficient processor usage. In multiprocessor systems it additionally balances load across CPUs.

  • Process lifecycle: The OS tracks process states (new, ready, running, waiting, terminated) and maintains a Process Control Block (PCB) for each process.
  • CPU scheduling: Algorithms include First-Come‐First‐Served (FCFS), Shortest Job First (SJF), Round Robin, and Priority scheduling. The OS selects which process runs next.
  • Context switching: The OS saves and restores process state to switch the CPU between processes.
  • Multiprocessing and multithreading: The OS supports parallel execution on multiple CPUs and concurrent threads within processes.

Security, Protection and System Services

Operating systems must protect the system from accidental or malicious actions and provide core services to applications.

  • Authentication and authorisation: Verify user identity and enforce permissions.
  • Access control: Files, devices and other resources are protected via ACLs or capability lists.
  • Encryption and secure communication: The OS may provide cryptographic services or interfaces to secure channels.
  • System calls and libraries: OS exposes services (process control, file operations, device I/O, interprocess communication) via well-defined system calls.
  • Error detection and recovery: The OS detects hardware/software faults and takes corrective actions (restarts, logging, isolation).

Types of Operating System

Operating systems are classified by functionality and by the environment in which they operate. Different types address different needs - from single-user convenience to real-time constraints and distributed resource sharing. Understanding types helps choose an appropriate OS for a given application or system design.

1. Batch Operating System

A Batch Operating System executes jobs grouped into batches without user interaction during execution. An operator collects similar jobs and submits them to the system which runs them sequentially.

Advantages:

  • Multiple users or jobs can share the system resources efficiently.
  • CPU idle time is minimised by organising I/O- and CPU-intensive tasks together.
  • Suitable for large-scale repetitive operations such as payroll and billing.

Disadvantages:

  • Jobs may experience delays, especially if preceding jobs encounter errors.
  • CPU may remain idle during lengthy I/O unless spooling or buffering is used.
  • Higher average response time for individual jobs compared with interactive systems.

Examples: Payroll systems, batch report generation for banks.

2. Multiprogramming Operating System

Multiprogramming allows several programs to reside in main memory simultaneously; the CPU switches to another program when the current one waits for I/O. This improves CPU utilisation and system throughput.

Advantages:

  • Improved CPU utilisation.
  • Better overall system efficiency.
  • Reduced response time for certain workloads.

3. Time-Sharing Operating System

Time‐sharing is a kind of multiprogramming in which the CPU time is divided into small slices (quantum) and each active user process receives a time slice in turn. This provides an interactive, responsive experience for multiple users.

Advantages:

  • Each task or user gets fair access to the CPU.
  • Reduces CPU idle time and makes the system appear responsive.
  • Enhances user productivity through near real-time interaction.
  • Allows resource sharing among users.

Disadvantages:

  • Scheduling and frequent context switching introduce overhead.
  • More complex to implement and manage than simpler OS types.
  • In multi-user environments, there is an increased need for security measures.

Examples: IBM VM/CMS, Time Sharing Option (TSO), Windows Terminal Services.

4. Multiprocessing Operating System

Multiprocessing systems use two or more CPUs to execute programs in parallel. The OS coordinates tasks among processors to increase speed and throughput.

Advantages:

  • Higher overall system throughput.
  • Increased reliability: failure of one processor does not necessarily halt the system.

5. Multi-User Operating System

Multi‐user systems allow multiple users to access resources and run applications concurrently. They can be implemented on single-processor or multi‐processor systems.

Advantages:

  • Efficient sharing of system resources (CPU, memory, devices).
  • Supports simultaneous user interactions.
  • Suitable for educational, corporate and server environments where many users must share services.

6. Distributed Operating System

Distributed OS connects independent computers over a network and makes their resources available to users as if they were part of a single coherent system. Each node has its own CPU and memory.

Advantages:

  • Independent failures: a failure in one node need not bring down the entire system.
  • High speed of data exchange and resource sharing across nodes.
  • Scalable and suitable for distributed computation and data storage.
  • Reduces load on central systems by distributing tasks.

Disadvantages:

  • Dependence on network reliability-network failure can disrupt communication.
  • Complexity in design and implementation; can be costly.
  • Security and privacy risks across public or shared networks.

Examples: LOCUS (historical example) and similar distributed systems.

7. Network Operating System

Network OS runs on servers and provides services such as file sharing, printer access and user management across a private network. It emphasises centralized administration and security.

Advantages:

  • Centralised server management for files, users and security.
  • Enhanced security through server-based control.
  • Supports remote access and easier integration of new hardware/software.

Disadvantages:

  • Requires investment in reliable server hardware.
  • Dependency on the central server; server failure affects many users.
  • Needs ongoing maintenance and updates.

Examples: Windows Server, UNIX/Linux server distributions, Mac OS X server, Novell NetWare.

8. Real-Time Operating System (RTOS)

Real‐time operating systems are designed to respond to inputs and events within strict timing constraints. They are critical for systems where late responses can cause failure or danger. RTOS are classified as Hard real-time (where missing a deadline is unacceptable) and Soft real-time (where deadlines are important but occasional misses are tolerable).

Advantages:

  • Deterministic timing behaviour and optimal use of resources for time-critical tasks.
  • Minimal task switching overhead when designed correctly.
  • Reliable and predictable operation for control systems and embedded devices.
  • Well-suited for embedded systems with high reliability requirements.

Disadvantages:

  • Limited multitasking compared with general-purpose OS.
  • Often requires specialised and powerful hardware, increasing cost.
  • Complex algorithms and design; higher development and verification cost.
  • High dependency on correct interrupts, drivers and priority assignment.

Examples: Air traffic control systems, robotics controllers, weapon systems, industrial process control.

9. Mobile Operating System

Mobile OS are optimised for smartphones, tablets and other handheld devices. They manage specialised hardware (touchscreens, sensors, radios) and provide power management, app sandboxes and mobile-specific services.

Examples: Android, iOS.

Question for Functions of Operating System
Try yourself:
What is the main function of an Operating System (OS)?
View Solution

User Interface

The User Interface (UI) is the layer through which users interact with the operating system and applications. A well-designed UI makes operations intuitive and improves productivity. The two main classes of UI provided by operating systems are the Graphical User Interface (GUI) and the Command Line Interface (CLI) (also termed Character User Interface - CUI).

User Interface

Character User Interface (CUI)

The Character User Interface (CUI), or command-line interface, relies on textual commands typed at a prompt. Navigation and operations are performed by entering specific commands and parameters. CUIs require memorisation of commands and their options but provide powerful and scriptable control over the system.

CUIs are particularly useful for batch processing, automation, file manipulation at scale and situations where graphical capabilities are limited. For example, renaming a large number of files or performing complex text processing is typically faster and more precise using CLI tools than via a GUI.

Graphical User Interface (GUI)

The Graphical User Interface (GUI) uses graphical elements such as windows, icons and menus to let users perform tasks using a mouse, touch or keyboard. GUIs are generally easier to learn for most users because they reduce the need to memorise commands.

Modern GUIs support features such as drag-and-drop, keyboard shortcuts, context menus and graphical configuration tools. They provide accessibility features and visual feedback that help users avoid mistakes and learn faster.

Some widely used examples of GUI-based operating systems include:

  1. Microsoft Windows
  2. Linux desktop environments (GNOME, KDE, etc.)
  3. Chrome OS

The document Functions of Operating System - Lucent For GK - UPSC is a part of the UPSC Course Lucent For GK.
All you need of UPSC at this link: UPSC
639 videos|1072 docs|422 tests

FAQs on Functions of Operating System - Lucent For GK - UPSC

1. What is the function of an operating system?
Ans. The operating system serves as a bridge between the hardware and software of a computer. It manages computer resources, provides a user interface, and facilitates the execution of programs.
2. How does an operating system manage computer resources?
Ans. Operating systems manage computer resources by allocating and scheduling them efficiently. This includes managing memory, processing power, storage, and input/output devices to ensure optimal performance.
3. What are the different types of user interfaces provided by an operating system?
Ans. Operating systems can provide different types of user interfaces, such as command-line interfaces (CLI) and graphical user interfaces (GUI). CLI requires users to type commands, while GUI allows users to interact with the system using graphical elements like icons and menus.
4. What is process scheduling in an operating system?
Ans. Process scheduling is the method used by an operating system to determine the order in which programs or processes are executed on a computer. It ensures fair utilization of the CPU and efficient multitasking.
5. Can an operating system be updated or upgraded?
Ans. Yes, operating systems can be updated or upgraded. Updates typically include bug fixes, security patches, and performance improvements, while upgrades may introduce new features and enhancements to the operating system. It is important to regularly update or upgrade the operating system to ensure stability and security.
Related Searches
practice quizzes, Extra Questions, Exam, pdf , ppt, Semester Notes, Previous Year Questions with Solutions, study material, Sample Paper, Functions of Operating System - Lucent For GK - UPSC, Viva Questions, Objective type Questions, Functions of Operating System - Lucent For GK - UPSC, Free, MCQs, Important questions, mock tests for examination, past year papers, shortcuts and tricks, Summary, video lectures, Functions of Operating System - Lucent For GK - UPSC;