Chapter 3: Computer Software and Operating System
Software
Software is a set of instructions, data or programs used to operate computers and execute specific tasks

Operating System
An operating system (OS) is an integrated set of program that controls overall resources such as CPU, memory, input-output device of the computer system. The major objective of operating system is to improve the performance and efficiency of a computer system. Like the manager of a company, an operating system is responsible for the smooth and efficient functioning of the entire computer system. The operating system provides the platform for other application program/software to run and execute. It provides user with an interface so that user can easily communicate with computers, which is more convenient to use and operate.
Functions:
- It controls, monitor and co-ordinate overall operation of our computer system.
- It act as an interface between user and computer.
- It provide platform to develop, run and execute other computer program.
- It manages hardware resources such as CPU, memories, input-output terminals, networking equipment etc.
- It hides programming and hardware complexity to the user.
Types of Operating System
A) Types of Operating Systems Based on Processing:
Multi-programming OS: Executes multiple user programs on a single processor, improving resource utilization. Examples include multi-tasking, multi-processing, and multi-user systems.
Multi-tasking OS: Allows multiple tasks to run concurrently in a single-user environment. Common examples are MS-Windows, Linux, and macOS.
Multiprocessing OS: Uses more than one processor to run programs simultaneously, improving execution speed. UNIX is a typical example.
Time-Sharing OS: Allows multiple users to share CPU time. Tasks switch frequently, providing an immediate response. Examples: MS-DOS, UNIX.
Batch Processing OS: Groups similar jobs into batches for sequential processing without user interaction during execution. Common in payroll, weather forecasting, etc.
Multi-threading OS: Divides a program into threads that can be executed concurrently, improving efficiency.
Real-time OS: Processes tasks in a predefined time, suitable for critical operations like flight seat availability and rocket launching systems.
Online Processing OS: Processes transactions immediately as they occur, allowing user interaction during processing.
B) Types of Operating Systems Based on User Interface (UI):
Character User Interface (CUI): Operates using text-based commands. It is less user-friendly, requiring users to memorize commands. Examples include MS-DOS and UNIX.
Graphical User Interface (GUI): Allows interaction using graphics, icons, and dialogue boxes. It’s more user-friendly and easier for non-technical users.
Questions and Answers
1. What are the types of Operating Systems?
There are several types of operating systems, each designed for different purposes:
- Batch Operating System: Executes a batch of jobs without user interaction. Jobs are grouped and processed in batches.
- Time-Sharing Operating System: Allows multiple users to share system resources simultaneously. Each user gets a small time slice.
- Real-Time Operating System (RTOS): Used for applications that require real-time processing, such as embedded systems.
- Distributed Operating System: Manages a group of independent computers that appear to the user as a single system.
- Network Operating System: Manages network resources and allows computers to connect and communicate over a network.
2. What is an Operating System?
An Operating System (OS) is system software that manages hardware and software resources and provides a platform for running applications. It acts as an intermediary between users and computer hardware.
The main functions of an OS include:
- Process Management: Controls and manages processes running on the computer.
- Memory Management: Allocates and tracks memory used by programs.
- File Management: Organizes files and directories on storage devices.
- Device Management: Manages input and output devices such as keyboard, mouse, printers, etc.
- Security and Access Control: Ensures the security of the system by controlling access to resources.
3. What is Memory Management in an Operating System?
Memory Management is a function of the OS that manages the computer's memory resources. It allocates memory to processes, keeps track of memory usage, and ensures that one process does not interfere with the memory of another process.
The main memory management techniques include:
- Contiguous Memory Allocation: Assigns a single contiguous block of memory to a process.
- Paging: Divides memory into fixed-size pages and divides processes into pages for non-contiguous allocation.
- Segmentation: Divides memory into variable-sized segments, such as code, data, and stack segments.
- Virtual Memory: Uses a portion of the hard drive as if it were additional RAM, allowing the system to handle larger programs.
4. What is a Process in an Operating System?
A process is a program in execution. It is an active entity that contains the program code and its current activity. A process has several components:
- Program Counter (PC): Keeps track of the address of the next instruction to be executed.
- Process Stack: Stores temporary data such as function parameters, return addresses, and local variables.
- Data Section: Stores global variables used by the process.
- Heap: Used for dynamic memory allocation during the execution of the program.
Processes can be in various states, including New, Ready, Running, Waiting, and Terminated.
5. What is File Management in an Operating System?
File Management is the part of the operating system responsible for organizing, storing, and retrieving files. It provides an interface for users and programs to interact with files on storage devices.
The key components of file management include:
- File System: A method for organizing files on storage devices, such as FAT, NTFS, or ext4.
- File Operations: Includes creating, reading, writing, deleting, and renaming files.
- File Access Methods: Defines how data is accessed in files, such as sequential or direct access.
- Directories: Structures used to organize files into hierarchical folders or directories.
File management ensures efficient storage and retrieval of files, allowing users to organize data effectively.
6. What is a Deadlock in an Operating System?
A deadlock is a situation in an operating system where two or more processes are unable to proceed because they are each waiting for the other to release a resource. Deadlock can lead to a system halt or indefinite waiting.
The four conditions for a deadlock are:
- Mutual Exclusion: Resources cannot be shared between processes.
- Hold and Wait: Processes holding resources are waiting for additional resources.
- No Preemption: Resources cannot be forcibly taken away from processes.
- Circular Wait: A circular chain of processes exists where each process is waiting for a resource held by the next process in the chain.
Deadlock prevention, avoidance, and detection techniques are used to handle deadlock situations.