0% found this document useful (0 votes)
19 views3 pages

Module 6 5 Marks Answers

Module 6 covers Memory Management and Security in operating systems, detailing key concepts such as memory allocation methods, paging, segmentation, and virtual memory. It also addresses security threats, authentication techniques, cryptography, and access control mechanisms. The module emphasizes the importance of efficient memory usage and robust security measures to protect system resources.

Uploaded by

shanne724
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views3 pages

Module 6 5 Marks Answers

Module 6 covers Memory Management and Security in operating systems, detailing key concepts such as memory allocation methods, paging, segmentation, and virtual memory. It also addresses security threats, authentication techniques, cryptography, and access control mechanisms. The module emphasizes the importance of efficient memory usage and robust security measures to protect system resources.

Uploaded by

shanne724
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Module 6: Memory Management and Security (5-Mark Answers)

1. What is Memory Management in OS?


Memory management is a crucial function of an operating system (OS) that handles and
optimizes the use of primary memory (RAM). It ensures efficient allocation of memory to
various processes, preventing conflicts and maximizing system performance. The key
objectives of memory management include:
- Allocation and deallocation of memory.
- Tracking memory usage and ensuring efficient utilization.
- Implementing virtual memory to extend available memory.
- Protecting memory segments to prevent unauthorized access.

2. What are the different Memory Allocation Methods?


Memory allocation methods determine how memory is assigned to processes:
- **Single Contiguous Allocation:** The entire memory is allocated to one process at a
time.
- **Partitioned Allocation:** Memory is divided into fixed (static) or variable (dynamic)
partitions.
- **Paging:** Memory is divided into fixed-size pages, and processes are assigned page
frames.
- **Segmentation:** Memory is divided into variable-sized segments based on logical
divisions.

3. What is Paging in OS?


Paging is a memory management technique where processes are divided into fixed-size
pages, and memory is divided into equal-sized frames. The OS maintains a **page table** to
map logical pages to physical frames. Advantages of paging include:
- Eliminates external fragmentation.
- Allows non-contiguous memory allocation.
- Efficient memory utilization.

4. What is Segmentation in OS?


Segmentation divides a process into **logical sections** such as functions, arrays, and
stacks. Each segment has a **base address** and a **limit** that defines its size. Unlike
paging, segmentation is based on logical structure rather than fixed-size blocks. Advantages
include:
- Efficient handling of large data structures.
- Reduces fragmentation.
- Better alignment with program execution.

5. What is Virtual Memory?


Virtual memory allows a system to use disk space as an extension of RAM, enabling the
execution of large programs. It relies on **paging** and **swapping** mechanisms to load
required sections of a process into memory. Benefits include:
- Supports multitasking by running more applications simultaneously.
- Reduces memory limitations by using swap space.
- Implements demand paging for better memory management.

6. What are Page Replacement Algorithms?


Page replacement algorithms decide which page to remove when a new page needs to be
loaded into memory. Common algorithms include:
- **FIFO (First-In-First-Out):** The oldest page is replaced first.
- **LRU (Least Recently Used):** The least recently accessed page is replaced.
- **Optimal Page Replacement:** Replaces the page that will not be needed for the longest
time.
- **LFU (Least Frequently Used):** Removes the least frequently accessed page.

7. What is Thrashing in OS?


Thrashing occurs when excessive paging reduces system performance, as the OS spends
more time swapping pages than executing processes. Causes of thrashing:
- Insufficient RAM for the running processes.
- Poor page replacement strategy.
- High multiprogramming level.

Solutions:
- Increase RAM.
- Use better page replacement algorithms.
- Implement **working set model** to limit active processes.

8. What is Deadlock in OS?


A deadlock is a situation where multiple processes are waiting for resources that are held
by other processes, leading to an indefinite wait. Deadlock occurs when these four
conditions hold simultaneously:
- Mutual Exclusion: Only one process can use a resource at a time.
- Hold and Wait: A process holding a resource is waiting for another.
- No Preemption: Resources cannot be forcibly taken.
- Circular Wait: A circular chain of processes exists, each waiting for a resource held by the
next.

9. What are Deadlock Prevention and Avoidance Techniques?


- **Prevention:** Ensures at least one of the four deadlock conditions is not met.
- No Hold and Wait: Require processes to request all resources at once.
- No Circular Wait: Impose a resource request ordering.
- **Avoidance:** Uses algorithms like **Banker’s Algorithm** to check resource
availability before allocating.

10. What are Security Threats in OS?


Operating systems face multiple security threats, including:
- **Malware:** Viruses, worms, and trojans that disrupt operations.
- **Phishing Attacks:** Deceptive techniques to steal user credentials.
- **Denial of Service (DoS):** Attacks that overload a system to make it inaccessible.
- **Privilege Escalation:** Exploiting vulnerabilities to gain unauthorized access.

11. What are the Authentication Techniques in OS?


Authentication ensures that only legitimate users access the system. Techniques include:
- **Password-Based Authentication:** Users log in with passwords.
- **Biometric Authentication:** Uses fingerprints, retina scans, or facial recognition.
- **Multi-Factor Authentication (MFA):** Requires multiple verification methods for
security.

12. What is Cryptography in OS Security?


Cryptography is the practice of securing data through encryption techniques. Key
cryptographic methods include:
- **Symmetric Encryption (AES, DES):** Uses the same key for encryption and decryption.
- **Asymmetric Encryption (RSA, ECC):** Uses a public key for encryption and a private
key for decryption.
- **Hashing (SHA-256, MD5):** Generates a fixed-length value from data for integrity
verification.

13. What is Access Control in OS Security?


Access control restricts unauthorized access to system resources using methods such as:
- **Role-Based Access Control (RBAC):** Permissions based on user roles.
- **Mandatory Access Control (MAC):** Security labels for strict access policies.
- **Discretionary Access Control (DAC):** Users can grant permissions to others.

You might also like