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
Remote Method Invocation (RMI)
Introduction
Remote Method Invocation (RMI) ek communication technique hai jo distributed systems me use hoti hai. Ye Java-based mechanism hai jo ek object-oriented approach follow karta hai taaki ek program remotely kisi doosre system ke method ko invoke kar sake bina uski implementation details jaane. RMI ka client-server model hota hai, jisme ek client remotely ek server object ke method ko call karta hai jaise wo local method ho.
Example: Agar ek Java application ek remote database server se data fetch karna chahta hai, to wo RMI ka use karke remotely database methods ko invoke kar sakta hai.
How RMI Works?
Jab ek client RMI ka use karta hai to wo ek remote object ka method call karta hai jo actually kisi doosre server pe run ho raha hota hai. Is process me stubs, skeletons, aur marshalling ka use hota hai taaki remote method calls efficiently process ho sakein.
Diagram:
Client Process Server Process
+------+ +------+
| |Request Method Call |
|Client| --------------->|Server|
| | |Object|
| | Return Result | |
| | <-------------- | |
+------+ +------+
Steps of RMI Execution:
Client ek remote object ka method call karta hai.
Client stub method call ko serialize karta hai (marshalling) aur network ke through bhejta hai.
Server stub request receive karta hai, unmarshalling karta hai aur method execute karta hai.
Server method ka result wapas server stub ko bhejta hai.
Server stub result ko marshall karke network ke through client stub ko send karta hai.
Client stub unmarshalling karke client process ko result return karta hai.
Components of RMI
RMI system ke different components hote hain jo communication establish karte hain:
1. Client Process
-
Ye remote method ko call karta hai.
-
Client stub ka use karke request send karta hai.
2. Server Process
-
Remote method ka actual execution yahan hota hai.
3. Remote Interface
-
Ye ek Java interface hota hai jo client aur server ke beech communication rules define karta hai.
4. Client Stub
-
Remote method call ko serialize (marshall) karta hai aur network ke through send karta hai.
-
Server se response receive karke result client ko return karta hai.
5. Server Stub (Skeleton)
-
Request ko receive karke usko unmarshall karta hai.
-
Server process ko remote method call execute karne ke liye bhejta hai.
6. RMI Registry
-
Ek lookup service hai jo server ke remote objects ko register karta hai taaki clients unhe locate kar sakein.
Diagram Representing Components of RMI:
+-------+ +------+ +------+ +-------+
|Client |--->|Client|--->|Server|--->|Server |
|Process| | Stub | | Stub | |Process|
+-------+ +------+ +------+ +-------+
| |
|-------> RMI Registry <--------|
Types of RMI
RMI ko data transfer ke tareeke ke basis par different types me divide kiya jata hai:
1. Synchronous RMI
-
Client ek request bhejta hai aur response aane tak wait karta hai.
-
Example: Online Banking Transactions jisme ek transaction complete hone tak agli request nahi bheji jati.
2. Asynchronous RMI
-
Client request bhejta hai aur bina wait kiye next task execute karta hai.
-
Example: Messaging Applications (WhatsApp, Telegram) jisme messages send hote hi background me process chalu rehta hai.
Advantages of RMI
Object-Oriented Approach: RMI Java objects ka use karta hai jo system ko modular aur maintainable banata hai.
Transparency: Remote method call local method jaisa lagta hai.
Automatic Serialization: Java objects automatically network me transfer ho jate hain.
Security: Java RMI secure communication protocols ka use karta hai.
Platform Independent: RMI Java-based hai, to ye Windows, Linux, Mac sab par run ho sakta hai.
Challenges in RMI
Performance Issues: Network latency aur serialization ki wajah se RMI slow ho sakta hai.
Security Risks: Agar authentication aur encryption na ho to data tampering ho sakti hai.
Compatibility Issues: Different Java versions aur architectures ke beech compatibility problems aa sakti hain.
Complexity: RMI multi-tier architecture ka use karta hai jo setup aur debugging ko complex bana sakta hai.
Examples of RMI in Real World
System | Description |
---|---|
Google Docs Collaboration | Multiple users ek document ko real-time me edit kar sakte hain. |
Stock Market Applications | Real-time stock prices fetch karne ke liye RMI ka use hota hai. |
Remote File Access | RMI ka use remote file management me hota hai. |
Distributed Database Systems | RMI ka use karke distributed databases ke beech query execution hoti hai. |
Security in RMI
Remote communication me security critical hoti hai. Isliye Java Security Manager aur SSL encryption ka use hota hai.
Authentication: Secure login aur authorization mechanism implement kiya jata hai.
Encryption: Data transfer ke time SSL/TLS encryption ka use hota hai.
Access Control: Client ko sirf authorized remote objects access karne ki permission hoti hai.
Conclusion
RMI ek Java-based distributed computing model hai jo remote method calls ko efficient aur object-oriented tareeke se handle karta hai. Ye client aur server ke beech seamless interaction provide karta hai aur real-time applications ke liye kaafi useful hai.