๐ฅ๏ธ Operating System
OS functions, types, process management, Linux and Windows.
๐ฅ๏ธ The Master Software
An Operating System (OS) is system software that manages hardware resources and provides an interface between user and hardware. Without OS, a computer cannot function.
Functions of OS:
โข Process Management โ creates, schedules, terminates processes. CPU scheduling algorithms: FCFS, Round Robin, Priority, SJF.
โข Memory Management โ allocates/deallocates RAM. Virtual memory extends RAM using disk. Paging and segmentation.
โข File Management โ organizes files in directories/folders. Handles read/write/delete operations.
โข Device Management โ manages I/O devices via drivers.
โข Security โ user authentication, access control, firewall.
Types of OS: Batch OS, Time-Sharing OS, Real-Time OS (RTOS โ for critical systems like aircraft), Network OS, Distributed OS, Mobile OS.
Windows (Microsoft) โ most popular desktop. Windows 11 latest. GUI-based. NTFS file system.
macOS (Apple) โ Unix-based. HFS+/APFS file system. Only for Apple hardware.
Linux โ open source. Distributions: Ubuntu, Fedora, Debian, Kali. Ext4 file system. Powers 96% of web servers, Android is Linux-based.
Android (Google) โ Linux-based mobile OS. Most popular mobile OS. 72% market share.
iOS (Apple) โ Unix-based mobile OS. Only for iPhones/iPads.
Chrome OS โ Google. Cloud-centric. Used in Chromebooks.
GUI (Graphical User Interface) โ icons, windows, menus. Easy to use. Windows, macOS.
CLI (Command Line Interface) โ text commands. Linux terminal, Windows CMD. Powerful but technical.
Kernel โ core of OS. Types: Monolithic (Linux), Microkernel (Windows NT), Hybrid.
BIOS/UEFI โ firmware that starts computer before OS loads. POST (Power-On Self Test).
Booting โ starting the computer. Cold boot = full start. Warm boot = restart.
Multitasking โ multiple tasks running simultaneously (appears so). Multiprocessing โ multiple CPUs.
Deadlock โ two processes waiting for each other indefinitely.
OS Functions โ Click to Explore
AnimationOS is the invisible foundation โ every click, file save, or print goes through OS before reaching hardware.
OS Concepts Explorer
InteractiveHow it works:
โข When RAM is full, OS moves some inactive data from RAM to a special area on disk called Swap space (Windows: page file = pagefile.sys)
โข This frees up RAM for active programs
โข When needed, data is swapped back from disk to RAM
Benefits:
โข Programs can run even when total memory needed exceeds physical RAM
โข Allows multitasking with many applications
โข Each process gets its own virtual address space โ security and isolation
Drawback:
โข Disk is much slower than RAM โ heavy swapping = system slowdown (called "thrashing")
Paging vs Segmentation:
โข Paging: divide memory into fixed-size pages (e.g., 4KB). Internal fragmentation can occur.
โข Segmentation: divide by logical sections (code, data, stack). External fragmentation can occur.
โข Most modern OS use paging with segmentation combined.
โข Uses visual elements: icons, windows, menus, buttons
โข Operated by mouse clicks and touch
โข User-friendly โ no need to memorize commands
โข Examples: Windows 11, macOS, Android, iOS
โข More system resources required (graphics)
โข Slower for repetitive tasks
CLI (Command Line Interface):
โข Text-based โ user types commands
โข Requires memorizing commands
โข Faster for experts โ powerful scripting/automation
โข Less system resources
โข Examples: Windows Command Prompt (cmd.exe), PowerShell, Linux Terminal (bash)
Common CLI commands:
Windows CMD: dir (list files), cd (change directory), cls (clear screen), del (delete)
Linux/Mac: ls (list), cd (change dir), clear, rm (remove), pwd (print working directory)
System administrators prefer CLI โ can manage thousands of servers with scripts. Regular users prefer GUI โ intuitive and visual.