IT501 Unit 4 Syllabus
All topics below are arranged according to the RGPV IT501 Operating System Unit 4 syllabus.
1. Concepts of Virtual Memory
Virtual Memory is one of the most important memory management techniques used by modern operating systems. It allows the execution of large programs even when the available RAM is smaller than the program size. Instead of loading the complete program into RAM, only the required part is loaded whenever it is needed. This technique increases the efficiency of memory utilization and allows multiple programs to execute simultaneously.
Virtual Memory is a memory management technique that creates the illusion of a larger main memory by using secondary storage as an extension of RAM.
Why Virtual Memory is Required?
- Allows execution of programs larger than physical memory.
- Improves CPU utilization.
- Supports multiprogramming.
- Reduces memory wastage.
- Provides better memory management.
Working of Virtual Memory
Advantages
- Runs very large applications.
- Improves memory utilization.
- Supports multitasking.
- Reduces loading time.
- Provides better system performance.
Disadvantages
- Page faults reduce speed.
- Requires secondary storage.
- Complex memory management.
- Can cause thrashing if memory is insufficient.
2. Cache Memory Organization
Cache Memory is a very high-speed memory located between the CPU and the Main Memory. Its main purpose is to reduce memory access time by storing frequently used instructions and data. Whenever the CPU requests data, the cache is checked first. If the required data is available, execution becomes much faster.
Need of Cache Memory
- Bridges CPU and RAM speed difference.
- Reduces average memory access time.
- Improves overall computer performance.
- Stores frequently accessed data.
Cache Mapping Techniques
| Technique | Description | Speed |
|---|---|---|
| Direct Mapping | Each memory block maps to one cache location. | Fast |
| Associative Mapping | Any memory block can occupy any cache location. | Very Fast |
| Set Associative Mapping | Combination of Direct and Associative Mapping. | Balanced |
Advantages
- Very high speed.
- Improves CPU efficiency.
- Reduces memory delay.
- Increases system performance.
Disadvantages
- Expensive memory.
- Limited capacity.
- Complex design.
3. Demand Paging
Demand Paging is a virtual memory technique in which pages are loaded into memory only when they are actually required. Instead of loading the complete process into RAM, only the demanded page is brought into memory. This saves memory space and improves system efficiency.
Working of Demand Paging
Page Fault
A Page Fault occurs when the required page is not present in RAM. The operating system interrupts the current execution, loads the missing page from secondary storage, updates the page table and restarts the instruction.
Advantages
- Efficient memory utilization.
- Loads only required pages.
- Supports large applications.
- Improves multiprogramming.
Disadvantages
- Frequent page faults reduce performance.
- Requires additional hardware support.
- Disk access is slower than RAM.
| Demand Paging | Normal Paging |
|---|---|
| Loads only required pages. | Loads all pages. |
| Less memory usage. | Higher memory usage. |
| Better efficiency. | Less efficient. |
| Can generate page faults. | No page faults during initial execution. |
4. Allocation of Frames
A frame is a fixed-size block of physical memory. When a process executes using paging, the operating system must decide how many frames should be allocated to that process. This process is known as Frame Allocation.
Frame allocation is the process of assigning physical memory frames to processes for execution.
Objectives of Frame Allocation
- Efficient utilization of main memory.
- Reduce page faults.
- Improve CPU utilization.
- Provide fair memory allocation to all processes.
Frame Allocation Techniques
| Method | Description |
|---|---|
| Equal Allocation | Every process receives the same number of frames. |
| Proportional Allocation | Frames are allocated according to process size. |
| Priority Allocation | Processes with higher priority receive more frames. |
5. Page Replacement Algorithms
When all frames are occupied and a new page is required, the operating system must remove one existing page. The technique used to decide which page should be removed is called a Page Replacement Algorithm.
Types of Page Replacement Algorithms
6. FIFO (First In First Out)
FIFO replaces the page that entered memory first. The oldest page is removed regardless of how frequently it is being used.
Working
Advantages
- Easy to implement.
- Requires less overhead.
- Simple queue implementation.
Disadvantages
- May remove frequently used pages.
- Can produce Belady's Anomaly.
7. Optimal Page Replacement
Optimal Page Replacement removes the page that will not be used for the longest period in the future. Although it provides minimum page faults, future references are unknown in real systems.
Advantages
- Minimum page faults.
- Best theoretical algorithm.
- Used for comparison.
Disadvantages
- Future page references are unknown.
- Cannot be implemented practically.
8. LRU (Least Recently Used)
LRU replaces the page that has not been used for the longest time in the past. It assumes recently used pages are more likely to be used again.
Advantages
- Better than FIFO.
- Closer to Optimal.
- Lower page faults.
Disadvantages
- Implementation is difficult.
- Requires additional hardware or counters.
9. Comparison of FIFO, Optimal and LRU
| Feature | FIFO | Optimal | LRU |
|---|---|---|---|
| Implementation | Easy | Impossible Practically | Moderate |
| Page Faults | High | Minimum | Low |
| Performance | Average | Best | Very Good |
| Exam Importance | ★★★★★ | ★★★★★ | ★★★★★ |
10. Thrashing
Thrashing is a situation where the operating system spends more time swapping pages than executing processes. This happens when too many page faults occur because processes do not have sufficient frames.
Causes of Thrashing
- Insufficient physical memory.
- Too many processes.
- Improper frame allocation.
- High page fault rate.
Effects of Thrashing
- Very slow system.
- Low CPU utilization.
- Poor performance.
- Reduced throughput.
How to Prevent Thrashing
- Increase RAM.
- Reduce degree of multiprogramming.
- Use working set model.
- Allocate sufficient frames.
11. Demand Segmentation
Demand Segmentation is similar to demand paging, but instead of pages, complete segments are loaded into memory only when required. It improves memory utilization by loading only useful program segments.
Working
Advantages
- Better logical organization.
- Improves memory utilization.
- Supports modular programming.
- Only required segments are loaded.
Disadvantages
- More complex than paging.
- May cause external fragmentation.
12. Role of Operating System in Security
An Operating System is responsible for protecting the entire computer system from unauthorized access, malware attacks, accidental damage, and misuse of system resources. It acts as the first layer of security between users and hardware resources.
Operating System Security refers to the collection of techniques and mechanisms used by an operating system to protect hardware, software, files, memory and users from unauthorized access and cyber threats.
Objectives of Operating System Security
- Protect user information.
- Prevent unauthorized access.
- Maintain data confidentiality.
- Ensure system availability.
- Maintain data integrity.
- Protect hardware resources.
- Secure network communication.
Major Responsibilities of Operating System
Advantages
- Protects confidential data.
- Reduces cyber attacks.
- Improves system reliability.
- Maintains secure communication.
- Provides safe execution environment.
13. Security Breaches
A security breach occurs when an unauthorized person, malicious software or attacker gains access to confidential information, system resources or network services without proper permission.
Common Types of Security Breaches
| Threat | Description | Example |
|---|---|---|
| Virus | Malicious program that infects files. | USB Virus |
| Worm | Self-replicating malware. | Network Worm |
| Trojan Horse | Fake software hiding malicious code. | Fake Application |
| Spyware | Steals user information secretly. | Password Stealer |
| Ransomware | Encrypts files and demands payment. | WannaCry |
| Phishing | Fake emails or websites used to steal passwords. | Bank Login Scam |
| DoS Attack | Denial of Service attack. | Website Crash |
Causes of Security Breaches
- Weak passwords.
- Outdated operating system.
- Unpatched software.
- Unsafe internet browsing.
- Malware infection.
- Human error.
How to Prevent Security Breaches?
- Install antivirus software.
- Use firewall.
- Update operating system regularly.
- Use strong passwords.
- Enable two-factor authentication.
- Backup important data.
14. System Protection
System Protection refers to the mechanisms used by the operating system to control access to hardware resources, memory, files and devices. Its objective is to ensure that only authorized users and processes can access protected resources.
Types of Protection
| Protection Type | Purpose |
|---|---|
| CPU Protection | Protect processor from misuse. |
| Memory Protection | Prevent illegal memory access. |
| File Protection | Protect files from unauthorized users. |
| I/O Protection | Control access to hardware devices. |
| Network Protection | Secure communication channels. |
Protection Mechanisms
- User ID (UID)
- Access Control List (ACL)
- Permission Bits
- Access Matrix
- Protection Domains
15. Password Management
Password Management is the process of creating, storing, protecting and updating user passwords securely. It is one of the simplest and most effective methods of securing an operating system.
Characteristics of a Strong Password
- Minimum 8–12 characters.
- Uppercase and lowercase letters.
- Numbers.
- Special symbols.
- No personal information.
- Unique for every account.
Good Password Practices
Password Storage Techniques
| Technique | Description |
|---|---|
| Plain Text | Not secure. |
| Encryption | Password is encrypted before storage. |
| Hashing | One-way conversion used in modern systems. |
| Salted Hash | Additional random value improves security. |
Advantages of Password Management
- Protects user accounts.
- Prevents unauthorized access.
- Improves system security.
- Reduces identity theft.
- Supports secure authentication.
📊 Unit 4 PYQ Analysis
Based on the analysis of previous RGPV IT501 Operating System question papers, the following topics have the highest probability of appearing in the examination.
| Topic | Frequency | Importance | Expected Marks |
|---|---|---|---|
| Virtual Memory | ★★★★★ | Very High | 7–14 Marks |
| Demand Paging | ★★★★★ | Very High | 5–14 Marks |
| FIFO / LRU / Optimal | ★★★★★ | Very High | Numerical |
| Thrashing | ★★★★☆ | High | 5 Marks |
| OS Security | ★★★★☆ | High | 5–7 Marks |
| Password Management | ★★★☆☆ | Medium | 2–5 Marks |
⭐ Top Important Questions
- Explain Virtual Memory with neat diagram.
- Explain Demand Paging and Page Fault.
- Explain FIFO Page Replacement Algorithm.
- Explain LRU Page Replacement Algorithm.
- Explain Optimal Page Replacement Algorithm.
- Compare FIFO, LRU and Optimal Algorithms.
- Explain Thrashing and its prevention.
- Explain Allocation of Frames.
- Explain Cache Memory Organization.
- Explain Demand Segmentation.
- Explain Operating System Security.
- Explain Security Breaches.
- Explain System Protection.
- Write short note on Password Management.
- Differentiate Authentication and Authorization.
🎤 Viva Questions
- What is Virtual Memory?
- What is a Page Fault?
- What is Thrashing?
- Which Page Replacement Algorithm is best?
- What is Cache Memory?
- Difference between Paging and Segmentation?
- What is Password Hashing?
- What is Authentication?
- What is Authorization?
- What is System Protection?
⚡ One Page Quick Revision
| Topic | Remember |
|---|---|
| Virtual Memory | Uses secondary storage as RAM extension. |
| Demand Paging | Loads page only when required. |
| Page Fault | Occurs when required page is absent. |
| FIFO | Oldest page replaced. |
| Optimal | Future unused page replaced. |
| LRU | Least Recently Used page replaced. |
| Thrashing | Too many page faults. |
| Security | Protects entire computer system. |
| Protection | Controls access to resources. |
❓ Frequently Asked Questions
Is Unit 4 important for RGPV?
Yes. Unit 4 is one of the highest scoring units because it contains theory as well as numerical questions.
Which Page Replacement Algorithm should I prepare?
Prepare FIFO, LRU and Optimal thoroughly with numerical examples.
Can numerical questions come from Unit 4?
Yes. FIFO, LRU, Optimal and Page Fault calculations are frequently asked.
Which topic has highest probability?
Virtual Memory and Demand Paging have the highest probability.