Posts

Introduction to Operating System -Virtualization, Concurrency, and Persistence

  How Operating Systems Really Work: Virtualization, Concurrency, and Persistence Have you ever wondered how your laptop can play music, run a web browser, download files, and open a Word document—all at the same time—without melting down? It might look simple, but beneath the surface, your operating system (OS) is doing incredibly sophisticated work. In this , we’ll break down the three most important ideas that make modern operating systems possible: Virtualization Concurrency Persistence These concepts are the foundation of how computers manage programs(applications), memory, and data.  1. Virtualization: Making One Computer Look Like Many Virtualization is all about creating useful illusions . You might have Spotify playing, Instagram open, and a browser loading—all on one phone. It feels like all apps run simultaneously, but the phone is rapidly switching between them so smoothly you don’t notice. Virtualization = making one CPU appear like many. Ev...

Operating System Services

Image
  Operating-System Services  Operating systems do much more than simply start your computer. Their primary role is to provide an environment where user programs can execute efficiently and safely. To accomplish this, every modern OS offers a set of services to both users and system programs . Although the exact details vary from one operating system to another, the major categories of services remain remarkably consistent. 🔹 1. User Interfaces An operating system must provide a way for users to interact with the computer. Three main types of user interfaces exist: a. Command-Line Interface (CLI) User types text commands (e.g., ls , grep , dir ). Popular in UNIX, Linux shells (bash, zsh), and Windows PowerShell. Preferred by power users, system administrators, and developers. b. Graphical User Interface (GUI) Provides windows, icons, menus, and pointer interactions. Found in Windows, macOS, GNOME, KDE, etc. More intuitive for general users. c. Touchscree...

Linux Versus Classic UNIX Kernels

  Linux Versus Classic UNIX Kernels  1. Common UNIX Heritage Linux and classic UNIX kernels share a common ancestry and expose a similar system-call interface (API) . Because of this: Applications written for UNIX often run on Linux with little or no change. Both follow similar design philosophies such as process abstraction, file systems, and memory protection. However, Linux is not derived from any specific UNIX implementation , which allows it to selectively adopt or reject design features. 2. Traditional UNIX Kernel Characteristics Classic UNIX kernels typically have the following properties: Monolithic design Implemented as a single, large, static binary All kernel services run in one address space Paged memory management (MMU-based) Each process has a private virtual address space Hardware enforces memory protection Static kernel configuration Kernel components are compiled in Changes usually require recompilation and reboot ...

Operating Systems and Kernels

Image
  Operating Systems and Kernels An operating system (OS) is not simply what users see on the screen, such as windows, icons, or menus. Although many users think of the graphical interface as the operating system, this view is technically incomplete. What Is an Operating System? In a technical sense, the operating system consists of the essential components required for the basic use and administration of a computer system . These include: The kernel Device drivers Boot loader Command shell or other user interfaces Basic system and file utilities Applications such as web browsers, media players, or games are not part of the operating system . The term system refers to the operating system plus all applications running on top of it. The Kernel: Core of the Operating System The kernel is the innermost and most critical part of the operating system. While the user interface is the outer layer, the kernel forms the core internals of the system. The kernel ...

Differences Between Linux and Classic UNIX Kernels

  Differences Between Linux and Classic UNIX Kernels Although Linux and classic UNIX kernels share a common heritage and a similar system-call interface, Linux introduces several important design improvements that distinguish it from traditional UNIX systems. 1. Dynamic Kernel Modules Linux supports dynamic loading and unloading of kernel modules at runtime. Even though Linux is a monolithic kernel , new functionality (such as device drivers) can be added without rebooting. Classic UNIX kernels are mostly static , requiring recompilation and reboot for changes. 2. Symmetric Multiprocessing (SMP) Support Linux has strong SMP support , allowing efficient use of multiple CPUs. Traditional UNIX implementations had limited or no SMP support. Many modern UNIX variants added SMP later, but Linux was designed with scalability in mind. 3. Kernel Preemption The Linux kernel is fully preemptive , meaning a running kernel task can be interrupted to improve r...

Data Structures in Operating Systems

1. Why Data Structures Are Important in an OS An operating system is itself a program , but a very special one. To manage multiple programs, users, and hardware devices efficiently, the OS relies heavily on well-designed data structures . These data structures help the OS to: Track running and waiting processes Allocate and reclaim resources Perform scheduling and context switching Maintain system security and accounting Without these structures, multitasking and resource sharing would be impossible. 2. Major Data Structures Used in Operating Systems Some of the most important OS data structures include: Process List / Task List Process Control Block (PCB) Ready Queue and Waiting Queues Memory Management Data Structures File System Data Structures I/O and Device Data Structures 3.Overview of Data Structures in Operating Systems Operating system uses many important data structures: 1. Process Management Structures Process list / task list Pro...

Process States in Operating Systems

Image
  Process States in Operating Systems 1. Why Do We Need Process States? A process does not execute continuously from start to finish. During its lifetime, it may: Compete for the CPU Wait for I/O operations Be temporarily paused by the operating system To manage this behavior efficiently, the operating system models a process as being in different states at different times. This concept originated in early operating systems and remains fundamental today. 2. Basic Process States (Simplified Model) In a simplified view , a process can be in one of three states : 1. Running The process is currently executing instructions on the CPU At any instant, only one process per CPU can be in the running state 📌 Example: A program actively performing calculations on the processor. 2. Ready The process is ready to run It has everything it needs except the CPU The OS may delay it because another process is currently running 📌 Example: A text editor wa...