Skip to main content

Function of OS

1. Process Management

The operating system helps in running many programs at the same time. It keeps track of each running program (called a process), decides which one should run next, and stops or starts them as needed. It makes sure that all the programs get a fair chance to use the CPU.

 

2. Memory Management

The OS manages the computer's memory (RAM). It decides which program will use how much memory and keeps track of it. When a program is closed, it frees up the memory so that other programs can use it. This helps the computer run smoothly without crashing.

 

3. File System Management

The operating system helps us to create, save, open, and delete files. It organizes files in folders and keeps them safe. It also controls who can open or edit a file to protect our data.

 

4. Device Management

The OS controls all the input and output devices like the keyboard, mouse, printer, and monitor. It tells the devices what to do and makes sure they work properly. It also uses special programs called drivers to communicate with the devices.

 

5. User Interface

The operating system provides a way for us to use the computer. It can be a text-based interface (like typing commands) or a graphical interface (with icons and windows). This makes it easier for users to give instructions and control the computer.

 

6. Security and Protection

The OS keeps the computer safe from unwanted access. It allows only authorized users to log in and use the computer. It also protects files and programs from viruses or other harmful programs.

 

7. Job Scheduling

When many tasks need to be done, the OS decides which one to do first. It plans and schedules the work so that all tasks are completed in a good order without wasting time or resources.

 

8. Error Detection and Handling

The operating system checks if there are any problems in the computer, like hardware failures or program errors. If it finds any, it tries to fix them or shows a message so the user can take action.

 

9. Networking

The OS helps the computer connect to other computers through the internet or a local network. It allows sharing of files, printers, and other resources easily between computers.

 

10. Resource Allocation

The operating system gives hardware resources like CPU time, memory, or devices to different programs as needed. It makes sure all programs get what they need and that nothing is wasted.

 


Development of Operating Systems 

  • 1940s-1950s: At first, computers had no operating system. People ran one program at a time by hand. Later, simple systems ran groups of programs called batches.

  • 1960s: New systems let many people use the computer at the same time by sharing the processor. IBM made a system called OS/360 that worked on many computers.

  • 1970s: Unix was made, letting many users and programs run at once. Personal computers started to appear, needing easier operating systems.

  • 1980s: Microsoft made MS-DOS and early Windows with windows and icons. Apple made Mac OS with a graphical interface. Free software projects like GNU began.

  • 1990s: Linux, a free system like Unix, was created. Windows 95 made computers easier to use. Mac OS X started to develop.

  • 2000s: Windows XP was popular. Apple released Mac OS X. Smartphones started with Apple’s iOS and Google’s Android.

  • 2010s: Windows added touch features and worked on many devices. macOS got a new name. Operating systems became more modern.

  • 2020s: Windows 11 came with a new look. Operating systems now use AI, cloud, and work on many devices like phones, laptops, and tablets.

 Different Types of Operating System (Based on Processing Method)

  1. Batch Operating System
    A batch operating system is one where users do not interact directly with the computer. They prepare their work and give it to the computer in a group called a batch. The computer then finishes one job at a time from the batch without stopping. This system is slow and was mostly used in older computers for repeated tasks like payroll or bank processing.
  2. Time Sharing Operating System
    A time-sharing operating system allows many users to use the computer at the same time. The system gives a small amount of time to each user and quickly switches between them. It happens so fast that everyone feels like their program is running at the same time. This type of system is useful in schools, offices, or computer labs where many people work on one computer system.
  3. Multiprocessing Operating System
    A multiprocessing operating system uses two or more processors (CPUs) at the same time. These processors work together to handle many tasks at once. This makes the system much faster and is useful in powerful computers like servers or systems used for scientific research and big companies.
  4. Multitasking Operating System
    A multitasking operating system allows one person to do several things at once on a computer. For example, you can play music, open a website, and type a document at the same time. The system quickly switches between these programs so everything runs smoothly. This type of system is used in personal computers like Windows and macOS.
  5. Real-Time Operating System (RTOS)
    A real-time operating system is used where a fast and quick response is very important. It gives an answer as soon as the input is given. These systems are used in places like hospitals, robots, airplanes, or traffic systems where even a small delay can be dangerous. Some real-time systems allow no delay at all, while others allow very small delays.
  6. Distributed Operating System
    A distributed operating system connects many computers together through a network and makes them work like a single computer. These connected computers share their files, memory, and tasks. The user can work from any of the connected computers without knowing where the task is being done. This system is used in cloud computing and large companies like Google and Facebook.

 Classification of OS on the basis of Users 

1. Single-User Operating System

A Single-User Operating System is designed for only one user at a time.
This means only one person can use the computer’s resources like memory, CPU, and storage at a time.
However, the user can still open and use many programs at once, like browsing the internet, playing music, and writing documents.
Single-user operating systems are mostly used in home computers and laptops.

Examples of single-user operating systems are MS-DOS, Windows 95, Windows 98, and early versions of Mac OS.

 

2. Multi-User Operating System

A Multi-User Operating System allows multiple users to use the computer at the same time or at different times.
Each user can log in separately, and the operating system keeps their data and files safe and private.
The OS manages the system resources and gives each user a fair share of the CPU, memory, and other resources.
This type of OS is used in places like offices, schools, universities, and servers, where many people use the same computer system.

Examples of multi-user operating systems are UNIX, Linux, Windows Server, and mainframe operating systems.

Classification of OS on the basis of User Interface

Graphical User Interface (GUI)

A Graphical User Interface (GUI) is a type of interface where users interact with the computer using graphical elements like windows, icons, buttons, and menus. It allows people to use the computer easily by clicking with a mouse or tapping with a finger instead of typing commands. 

GUI is very simple and user-friendly, which is why it is used in most modern computers and mobile devices. For example, in Microsoft Windows, you can open files, play music, or browse the internet just by clicking on icons. Similarly, in macOS or Ubuntu Desktop, users can drag and drop files, click on menus, and use graphical applications.

 GUI is best for beginners because it is easy to understand and doesn’t require remembering any commands. However, it uses more memory and processing power, so it can be a little slower on old computers. Examples: Microsoft Windows, macOS, Ubuntu Desktop, Android, iOS

Command-Line Interface (CLI)

A Command-Line Interface (CLI) is a type of interface where users must type specific text commands to interact with the computer. There are no graphics or icons—only a black screen with a place to type. CLI is very powerful and fast if the user knows the right commands.

 It is mainly used by system administrators, programmers, and advanced users who want more control over the system. For example, in MS-DOS, users can type dir to view files in a folder, or in Linux Terminal, you can type ls to list files or sudo apt update to update the system. CLI is lightweight and uses very little system resources, but it is difficult for beginners because it requires remembering exact commands and syntax.   Examples: MS-DOS, Linux Terminal, Unix Shell (like Bash)


Unit- 2  Process and Process Scheduling

2.1 Introduce Process, Program and Process Life Cycle

 Process

Process is something that is currently under execution. So, an active program can be called a Process. Examples:

      Opening a web browser to search something on the internet — the browser becomes a process.

      Launching a music player to enjoy your favorite tunes — the music player is also a process.

In computing, a process is the instance of a computer program that is being executed by one or many threads. It contains the program code and its activity.

Modern operating systems support multithreading, meaning a process can have multiple threads running concurrently.

 

A Process has various attributes associated with it. Some of the attributes of a Process are:

        Process Id: Every process will be given a unique id that identifies the process from the other processes.

        Process state: Each and every process has some states associated with it at a particular instant of time. This is denoted by process state. It can be ready, waiting, running, etc.

        CPU scheduling information: Each process is executed by using some process scheduling algorithms like FCSF, Round-Robin, SJF, etc.

        I/O information: Each process needs some I/O devices for their execution. So, the information about device allocated and device need is crucial.

 

Program

A program is a piece of code which may be a single line or multiple  lines. A computer program is usually written by a computer programmer in a programming language. For example, here is a simple program written in C programming language −

#include <stdio.h>

 

int main() {

   printf("Hello, World! \n");

   return 0;

}

A computer program is a collection of instructions that performs a specific task when executed by a computer. When we compare a program with a process, we can conclude that a process is a dynamic instance of a computer program.

Comments

Popular posts from this blog

  C# - Data Types Data types specify the type of data that a valid  C#  variable can hold. C# is a strongly-typed language. It means we must declare the type of a variable that indicates the kind of values it is going to store, such as integer, float, decimal, text, etc. There are 3 types of data types in C# language. Types Data Types Value Data Type short, int, char, float, double, struct, enum, null Reference Data Type String, Class, Object,   Interface and array Pointer Data Type Pointers    1. Value Data Types Value data types hold the actual data in memory. These types include numbers, characters, booleans, and so on. C# supports both signed and unsigned versions of numeric types. There are two kinds of value data types: 🔸 a) Predefined Data Types: These are built-in types like int , char , floa...
   Structure of C# using System;              // Gives access to Console and other basic features   namespace MyFirstProgram       // Defines a namespace {     class Program              // Main class of the program     {         static void Main ( string [] args)   // Main method, starting point         {             Console.WriteLine( "Hello, World!" ); // Prints output to screen         }     } }   using System; This line allows your program to use predefined classes and functions in the System namespace. For example, Console.WriteLine() is part of System . It's like importing built-in tools so you c...