Paging with Segmentation क्या है?
Paging with Segmentation एक hybrid memory management technique है जिसमें दोनों techniques (Segmentation + Paging) को combine किया जाता है।
मतलब:
- पहले process को segments में divide किया जाता है
- फिर हर segment को pages में divide किया जाता है
Basic Concept
- Process → Segments में divide होता है
- हर Segment → Pages में divide होता है
- Memory → Frames में divide होती है
इस तरह दोनों का combination use होता है
Structure
Logical Address तीन भागों में होता है:
- Segment Number (s)
- Page Number (p)
- Offset (d)
Tables Used
इसमें दो tables use होती हैं:
- Segment Table
- हर segment के लिए Page Table का address रखता है
- Page Table
- Page → Frame mapping करता है
Address Translation
CPU Logical Address देता है:
(s, p, d)
Step by step process:
- Segment Table में segment number (s) खोजते हैं
- वहाँ से उस segment की Page Table का address मिलता है
- Page Table में page number (p) खोजते हैं
- वहाँ से frame number मिलता है
- Frame Number + Offset = Physical Address
Formula (Important)
Physical Address = (Frame Number × Frame Size) + Offset
Example
मान लो:
Segment 1 की Page Table:
| Page | Frame |
|---|---|
| 0 | 4 |
| 1 | 7 |
| 2 | 2 |
Page Size = 100 bytes
Logical Address = (1, 2, 20)
Solution
Step 1: Segment Number = 1
उसकी Page Table find करो
Step 2: Page Number = 2
Page 2 → Frame 2
Step 3: Offset = 20
Step 4: Physical Address निकालो
Physical Address = (2 × 100) + 20
= 200 + 20
= 220
Final Answer: Physical Address = 220
Advantages
- Fragmentation कम होती है
- Segmentation की flexibility + Paging की efficiency मिलती है
- Memory utilization बेहतर होता है
Disadvantages
- System बहुत complex हो जाता है
- Multiple tables maintain करनी पड़ती हैं
- Address translation slow हो सकता है
Short Conclusion
Paging with Segmentation एक hybrid technique है जिसमें पहले process को segments में और फिर pages में divide किया जाता है। इसमें segment table और page table दोनों का उपयोग होता है। यह technique efficient है लेकिन complex भी है।