Operating System
OS Part-1
OS Part-2
- File Concepts and Access methods
- Free Space Management and Allocation methods
- Directory Systems and Protection
- File Organization, Sharing and Implementation issues
- Disk and Drum Scheduling
- I/O Devices Organisation & I/O Buffering
- I/O Hardware, Kernel I/O subsystem and Transforming I/O Requests to Hardware Operations
- Device Drivers and Path Management
- Device Driver Sub Modules and Procedure
- Device Scheduler and Handler
- Interrupt Service Routine (ISR)
- File System in Linux and Windows
OS Part-3
- Process and Process Control Block(PCB)
- Process Scheduling( Preemptive and Non Preemptive)
- Scheduling Algorithms
- Algorithm Evaluation
- Multiple Processor Scheduling
- Real Time Scheduling
- Operations on Processes
- Threads
- Inter-Process Communication
- Precedence Graphs
- Critical Section Problem
- Semaphores
- Classical Problems of Synchronization
- DeadLock
- Deadlock Prevention and Avoidance
- Deadlock Detection and Recovery
- Process Management in Linux
OS Part-4
- Memory Hierarchy in OS
- Concepts of Memory Management
- MFT and MVT
- Logical and Physical Address Space
- Swapping
- Contiguous and Non Contiguous Memory Allocation
- Paging
- Segmentation
- Paging Combined with Segmentation
- Structure and Implementation of Page Table
- Virtual Memory in OS
- Cache Memory Organization
- Demand Paging
- Page Replacement Algorithms
- Allocation of Frames and Thrashing
- Demand Segmentation
OS Part-5
- Distributed Operating System: Introduction and Types
- Distributed OS: Design Issues
- Distributed OS: File System
- Distributed OS: Remote File Access
- Remote Procedure Call(RPC)
- Remote Method Invocation(RMI)
- Distributed Shared Memory
- Parallel Processing and Concurrent Programming
- Security and Threats Protection in Distributed OS
- Security Design Principles and Authentication in Distributed OS
- Sensor Network and Parallel OS
1. System Calls (OS ke System Calls)
System Calls Kya Hote Hain?
System Calls user programs aur operating system ke beech ka interface hote hain. Jab koi program hardware ya OS services ka use karna chahta hai, toh woh system call ke through request bhejta hai.
Example Situation
Agar tum Notepad me ek file save karna chahte ho, toh program directly hard disk access nahi kar sakta. Yeh kaam OS ke system calls karte hain.
System Calls Kaise Kaam Karte Hain?
User program request bhejta hai (jaise file open karni hai).
System Call activate hota hai (OS ka function call hota hai).
OS operation perform karta hai (hard disk access karta hai).
OS result wapas bhejta hai (file successfully open ho gayi).
Diagram: System Call Execution
[ User Program ]
|
| Request: File Open
v
[ System Call (OS)]
|
| OS accesses Hard Disk
v
[ Hardware (Disk)]
Types of System Calls
1. Process Control
Purpose: Naye process create, execute aur terminate karne ke liye.
Example System Calls:
fork()
→ Naya process banata hai.exit()
→ Process ko terminate karta hai.
Example Use: Jab tum Google Chrome open karte ho.
2. File Management
Purpose: File ko open, read, write aur delete karna.
Example System Calls:
open()
→ File ko open karega.read()
→ File se data read karega.write()
→ File me data likhega.close()
→ File ko band karega.
Example Use: Jab tum MS Word me document save karte ho.
3. Device Management
Purpose: Keyboard, Mouse, Printer jaise devices ka control lena.
Example System Calls:
ioctl()
→ Device ki settings change karta hai.read()
→ Device se input leta hai.
Example Use: Jab tum printer se PDF file print karte ho.
4. Information Maintenance
Purpose: OS ya process ki information retrieve karna.
Example System Calls:
getpid()
→ Process ID dega.gettime()
→ System ka current time batayega.
Example Use: Jab tum Windows ka system time check karte ho.
5. Communication (Inter-Process Communication – IPC)
Purpose: Ek process ko doosre process se baat karne dena.
Example System Calls:
pipe()
→ Dono processes ke beech ek communication pipe banata hai.send()
→ Data doosre process ko bhejta hai.
Example Use: Jab tum WhatsApp message bhejte ho.
System Calls ka Example (C Language me)
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
int main() {
int file = open("example.txt", O_WRONLY | O_CREAT, 0644);
write(file, "Hello, System Calls!", 20);
close(file);
return 0;
}
Yeh program ek file banata hai, usme text likhta hai, aur phir file ko close kar deta hai.
2. System Boot (OS Booting Process)
System Boot Kya Hota Hai?
Jab tum computer ka power button press karte ho, toh System Boot process start hoti hai. Yeh process OS ko memory me load karne aur system ko ready karne ka kaam karti hai.
System Boot ke Steps
1. Power On & BIOS Execution
Jab tum power button dabate ho, toh sabse pehle BIOS (Basic Input/Output System) activate hota hai.
BIOS system hardware check karta hai (RAM, Hard Disk, Keyboard, etc.).
Is process ko Power-On Self-Test (POST) kaha jata hai.
2. Bootloader Execution
BIOS ke baad Bootloader activate hota hai.
Bootloader ka kaam Operating System ko locate aur load karna hota hai.
Examples:
Windows Boot Manager (Windows ke liye)
GRUB Bootloader (Linux ke liye)
3. Kernel Loading
Bootloader OS kernel ko RAM me load karta hai.
Kernel process, memory aur devices ko initialize karta hai.
4. System Initialization
OS system services aur background processes start karta hai.
Login screen dikhai deti hai, aur system ready ho jata hai.
Diagram: System Boot Process
[ Power ON ]
↓
[ BIOS Execution & POST ]
↓
[ Bootloader Loads OS ]
↓
[ OS Kernel Loads ]
↓
[ System Ready for Use ]
Types of Booting
1. Cold Boot
Jab system completely off ho aur fir start kiya jaye.
Example: Tumne laptop band kiya tha aur dobara ON kiya.
2. Warm Boot
Jab system restart hota hai bina power off kiye.
Example: Tumne Ctrl + Alt + Del press karke Windows restart kiya.
Bootloader ka Example (Linux me GRUB Bootloader)
Linux ka GRUB Bootloader system boot process ko manage karta hai.
Example: GRUB Configuration File
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_CMDLINE_LINUX="quiet splash"
Isme default OS set hota hai aur boot wait time define hota hai.
Conclusion (Summary)
System Calls programs aur OS ke beech bridge ka kaam karte hain.
System Boot process me BIOS se lekar OS startup tak ka process hota hai.
Booting Steps: BIOS → Bootloader → Kernel → System Ready.