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
Directory Systems & File Protection in Operating System
1. Directory Systems in OS
Ek directory ek structure hota hai jo files ko organize aur manage karta hai taaki unko easily access kiya ja sake. Ye file system ka important part hota hai jo storage me files ko systematically arrange karta hai.
Directory Structures ke Types
1. Single-Level Directory
-
Saari files ek hi directory me hoti hain.
-
Simple systems (MS-DOS, early computers) me use hota tha.
Example:
Root Directory
│── File1.txt
│── File2.doc
│── File3.pdf
Advantages:
Implementation simple hai.
Searching fast hoti hai.
Disadvantages:
Agar do files ka same naam ho, toh conflict ho sakta hai.
File organization mushkil hoti hai.
2. Two-Level Directory
-
Har user ke liye ek alag directory hoti hai.
Example:
Root Directory
│── User1
│ ├── FileA.txt
│ ├── FileB.doc
│── User2
│ ├── FileX.pdf
│ ├── FileY.mp3
Advantages:
Users ke beech name conflicts nahi hote.
Better organization hoti hai.
Disadvantages:
Users ek doosre ki files easily access nahi kar sakte.
3. Hierarchical Directory (Tree Structure)
-
Directories ke andar subdirectories hoti hain.
-
Modern OS (Windows, Linux, macOS) me use hota hai.
Example:
Root Directory
│── Documents
│ ├── College
│ │ ├── Notes.docx
│── Music
│ ├── Rock
│ │ ├── Song.mp3
Advantages:
Better organization aur file sharing possible hai.
Disadvantages:
Structure thoda complex ho jata hai.
4. Acyclic Graph Directory
-
Files ko multiple directories me share kiya ja sakta hai.
Example:
Root Directory
│── User1
│ ├── Project.doc
│── User2
│ ├── Shortcut → Project.doc
(User2 Project.doc ka shortcut use karke access kar sakta hai.)
Advantages:
File sharing easy ho jata hai.
Duplicate files ki zaroorat nahi hoti.
Disadvantages:
Agar original file delete ho jaye, toh link break ho sakta hai.
5. General Graph Directory
-
Acyclic Graph ki tarah hota hai, but cycles allow hoti hain.
Example:
User1 → User2 → User3 → User1 (Cycle)
Advantages:
Maximum flexibility hoti hai.
Disadvantages:
File tracking complicated ho jati hai.
2. File Protection in OS
File protection ka matlab hai unauthorized users ko files modify ya access karne se rokna.
Common Threats to File Security
Unauthorized Access – Bina permission kisi aur ki files dekhna.
Data Corruption – Virus ya accidental deletion ki wajah se files kharab ho sakti hain.
Data Theft – Sensitive files ka chori hona.
File Protection Techniques
1. Access Control (Permissions)
-
Users ke liye different access rights set kiye jate hain.
-
Access Control List (ACL) define karti hai ki kaun read, write ya execute kar sakta hai.
Example:
User | Read | Write | Execute |
---|---|---|---|
Admin | |||
User1 | |||
Guest |
2. Password Protection
-
File ko access karne ke liye password set kiya jata hai.
Example:
File: FinanceReport.pdf
Password: ********
Simple aur effective security method hai.
3. Encryption
-
File ka data encode kiya jata hai, taaki bina correct key ke koi read na kar sake.
Example:
Original File: Hello World
Encrypted File: x1#A9kL2@
Highly secure method hai jo banking, government, aur personal data protection ke liye use hota hai.
4. File Permissions (Read, Write, Execute)
-
Har file ke liye OS permissions assign karta hai:
-
Read (r) – File ko sirf dekh sakte hain.
-
Write (w) – File me changes kar sakte hain.
-
Execute (x) – Agar file executable hai toh usko run kar sakte hain.
-
Example (Linux File Permissions):
-rwxr--r-- Owner Group Others
Explanation:
-
rwx
→ Owner (Read, Write, Execute kar sakta hai) -
r--
→ Group (Sirf Read kar sakta hai) -
r--
→ Others (Sirf Read kar sakta hai)
Ye Linux/Unix systems me use hota hai security ke liye.
5. Backup & Recovery
-
Files ka backup regularly maintain kiya jata hai taaki data loss na ho.
Example:
Backup Frequency: Har 24 hours
Backup Location: Cloud Storage
Agar system crash ho jaye ya koi file delete ho jaye, toh usko wapas restore kiya ja sakta hai.
Conclusion
Directory systems files ko systematically organize karne ka important tool hai.
File protection mechanisms unauthorized access ko prevent karne ke liye zaroori hain.
Encryption, passwords, ACLs, aur backups file security ke best techniques hain.