Introduction To Operating Systems
Introduction To Operating Systems
1940s-1950s 1
Early computers used machine code; no OS. Batch processing began with
simple monitor programs.
2 1960s
First true OS with multi-programming (e.g., IBM OS/360). Time-sharing systems
emerged (e.g., CTSS).
1970s 3
UNIX developed, paving the way for modern OS design principles. Personal
computers began to appear.
4 1980s
Rise of personal computer OS (e.g., MS-DOS, Apple Macintosh OS). Graphical
User Interfaces (GUIs) became prominent.
1990s-Present 5
Windows dominates the desktop. Linux gains popularity. Mobile OS (Android,
iOS) transform computing. Cloud and distributed OS emerge.
From humble beginnings, operating systems have grown in complexity and capability, now supporting everything from supercomputers to tiny embedded devices, constantly adapting
to new hardware and user demands.
Major Goals of Operating System
The primary goals of an operating system are to create an environment where users can execute programs conveniently and efficiently. This
involves managing hardware resources, providing a user-friendly interface, and ensuring system stability.
An OS acts as a crucial intermediary, abstracting the complexities of hardware from the user and applications, allowing for seamless and
effective computing.
Types of Operating Systems
Operating systems come in various forms, each designed to meet specific needs and computational environments. The choice of OS depends heavily
on the hardware, the intended use, and the performance requirements.
Batch OS
1
Processes jobs in batches without direct user interaction. Ideal for repetitive tasks (e.g., payroll processing).
Time-Sharing OS
2
Enables multiple users to share a single computer system by rapidly switching between tasks (e.g., mainframe OS).
Distributed OS
3
Manages a group of independent computers and makes them appear as a single coherent system (e.g., network OS).
Network OS
4
Runs on a server and provides capabilities to manage data, users, groups, security, applications, and other networking functions
Real-Time OS (RTOS)
5
Designed for applications with strict deadlines, like industrial control systems, medical imaging, or robotics.
Mobile OS
6
Specifically designed for mobile devices like smartphones and tablets, optimizing for touch input and low power consumption
Functions of an Operating System
An operating system performs a multitude of crucial functions to ensure the smooth and efficient operation of a computer. These functions
underpin virtually every action taken on a digital device.
• Process Management: Handles the creation, scheduling, • Security: Implements protection mechanisms to prevent
termination, and synchronization of processes. unauthorized access to system resources and user data.
• Memory Management: Allocates and deallocates memory space • User Interface: Provides a means for users to interact with the
for programs and data, ensuring efficient utilization and protection. computer, whether through a command line or a graphical
interface.
• File Management: Organizes, stores, retrieves, names, and • System Calls: Offers an interface for application programs to
protects files and directories. request services from the operating system.
• Device Management: Controls all input/output (I/O) devices, • Error Handling: Detects and responds to errors in hardware and
acting as a translator between hardware and software. software, ensuring system stability.
Characteristics of Modern Operating System
Modern operating systems are highly sophisticated, built with characteristics that cater to the demands of contemporary computing, emphasizing
user experience, performance, and robust management.
Monolithic Structure
Layered Structure
The OS is divided into distinct layers, where each layer provides services
to the layer above it and requests services from the layer below. This
offers modularity and easier debugging. However, it can be less efficient
due to increased overhead from inter-layer communication.
Address Binding - Logical vs Physical Address
Space
Address binding is the process of mapping logical addresses (generated by the CPU) to physical addresses (in main memory). This concept is fundamental
to how programs run and how memory is managed in an operating system.
This dynamic binding is crucial for implementing features like virtual memory, allowing programs to use more memory than physically available and
enhancing system efficiency and flexibility.
Logical Organization
Logical organization, often referred to as virtual memory, provides a way for processes to view memory as a contiguous address space, even if
its physical representation is fragmented or larger than available RAM. This abstraction is key to modern multitasking.
• Paging: Divides logical memory into fixed-size blocks (pages) and physical memory into same-sized blocks (frames). Non-contiguous
physical memory can be allocated to a process.
• Segmentation: Divides logical memory into variable-size blocks called segments, which are logical units meaningful to the user (e.g., code
segment, data segment, stack segment). Offers better protection and sharing but can lead to external fragmentation.
Logical organization enhances memory utilization, enables protection and sharing of memory segments between processes, and allows for the
execution of programs larger than physical memory.
Physical Organization - Dynamic Loading and Dynamic Linking
Physical organization refers to how programs and data are actually stored and accessed in physical memory. Dynamic loading and dynamic linking are
advanced techniques that optimize memory usage and program execution speed.
Dynamic Loading
A routine is not loaded into main memory until it is called. All routines are kept on disk in a relocatable load format. When a routine is called, the
relocatable linking loader checks if the routine is already in memory. If not, it loads the routine and updates the program's address tables. This
means that unused routines are never loaded, resulting in better memory-space utilization.
Dynamic Linking
Postpones the linking of some external modules or libraries until run-time. Instead of copying library routines into the executable program at
compile or load time, only a stub is included. When the stub is executed, it locates the appropriate library routine in memory (or loads it if
necessary) and executes it. This is widely used for system libraries and shared libraries, saving disk space and memory. Changes to libraries
don't require recompiling applications that use them.