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
You are on page 1/ 2
Operating System Practice Question Bank Answers
4. Define Fragmentation and Give Its Types
Fragmentation refers to memory gaps created during process allocation, which are too small to be utilized by new processes. Fragmentation occurs due to the frequent loading and releasing of processes, leaving unused memory spaces. It has two main types: - Internal Fragmentation: Occurs when allocated memory is slightly larger than the requested memory, leaving small unused portions within allocated regions. - External Fragmentation: Arises when free memory is scattered throughout, making it difficult to allocate large blocks for new processes, despite having enough total memory available.
5. Define Paging and Segmentation
Paging is a fixed-size memory management scheme that divides physical memory into frames and divides processes into pages, allowing non-contiguous allocation and reducing fragmentation.
Segmentation is a variable-size memory management scheme that divides programs into
segments based on logical units (e.g., functions, objects). Segmentation allows segments of different sizes but may lead to external fragmentation.
6. List Different Accessing Methods of a File
The different accessing methods of a file include: - Sequential Access: Processes data in order, one record after another. - Direct Access: Allows accessing data blocks in any order, commonly used in databases. - Indexed Access: Uses an index to quickly locate and access data within the file.
7. List Different Directory Structures
Directory structures in an operating system include: - Single-level Directory: A simple structure where all files are stored in one directory. - Two-level Directory: Each user has their own directory, allowing for better file organization. - Tree-structured Directory: Allows directories within directories, supporting hierarchical storage. - Acyclic Graph Directory: Permits shared subdirectories and files, used for collaborative work. - General Graph Directory: Allows cycles in directories but is complex to manage and requires garbage collection.
8. Define Page Fault and Page Hit
Page fault occurs when a process requests a page not present in memory, prompting the operating system to load the page from disk. Page hit occurs when a requested page is already present in memory, allowing immediate access.
9. Define RAID and List Its Types
RAID (Redundant Array of Independent Disks) is a data storage technology that uses multiple disk drives for improved reliability and performance. Types of RAID include: - RAID 0: Stripes data across disks for speed but offers no redundancy. - RAID 1: Mirrors data across disks, providing redundancy. - RAID 5: Distributes parity information across disks, balancing speed and redundancy. - RAID 6: Similar to RAID 5 but with additional parity for higher fault tolerance.
4 Mark Questions
10. List Different Attributes of Files
Attributes of a file include: - Name: Unique identifier within a directory. - Identifier: A unique tag, usually a number, that differentiates it from other files. - Type: Indicates the type of file, e.g., text, executable. - Location: Points to where the file is stored on the disk. - Size: Defines the amount of data within the file. - Protection: Defines access permissions for various users. - Time and Date: Stores timestamps for file creation, modification, and access.
1. Explain Round Robin Scheduling Algorithm with Example
Round Robin is a CPU scheduling algorithm that allocates a fixed time quantum to each process in the queue. After a process's time expires, it moves to the end of the queue. This cycle continues until all processes are executed. Example: Given processes P1, P2, and P3 with burst times of 4ms, 5ms, and 2ms, and a time quantum of 2ms, each process gets 2ms, looping through until completion.
2. Explain Deadlock and Necessary Conditions for Deadlock
Deadlock is a state where processes are stuck waiting for resources held by each other, creating an indefinite wait cycle. Four necessary conditions for deadlock include: - Mutual Exclusion: Only one process can access a resource at a time. - Hold and Wait: A process holding a resource may request additional resources held by others. - No Preemption: Resources cannot be forcibly taken from a process. - Circular Wait: A closed chain of processes exists where each process waits for a resource held by the next.