1: Which of the following is usually a variable-sized memory unit?
10s
Page
Frame
Segment
Block
2: Which function is commonly used in C to open a file?
10s
openfile()
fileopen()
fopen()
readfile()
3: Which C function dynamically allocates memory and initializes all allocated bytes to zero?
10s
malloc()
calloc
calloc()
free()
4: Which memory technique divides memory into fixed-size blocks?
10s
Segmentation
Paging
Fragmentation
Swapping
5: Which disk scheduling algorithm selects the request closest to the current head position?
10s
FCFS
SCAN
SSTF
FIFO
6: Suppose the current directory is:/home/student/projects
Which command navigates to:
/home/student/documents
without relying on the current directory's name?
10s
cd ../documents
cd ../../documents
cd /documents
cd ~/../documents
7: Which situation is most directly associated with thrashing?
10s
CPU spends most of its time executing user instructions
System spends excessive time swapping/pages in and out instead of executing processes
A process has no virtual address space
All pages remain permanently in physical memory
8: Consider:-rwxr-xr-xWhich numeric permission representation is correct?
10s
644
755
754
775
9: Consider a system using demand paging. A process accesses a page for the first time, and that page is not currently in RAM. What is the immediate consequence?
10s
The process is permanently terminated
A page fault occurs and the OS attempts to load the page
The CPU automatically increases RAM
The page table is deleted
10: Which statement best explains why virtual memory allows a program to use an address space larger than available physical RAM?
10s
Virtual memory increases the physical RAM capacity
Pages that are not currently needed can reside on secondary storage and be brought into RAM when required
Every virtual address corresponds permanently to a RAM location
The CPU executes instructions directly from the hard disk
11: Among contiguous memory allocation strategies, the ________ algorithm scans the free memory list to allocate the smallest available partition that is large enough to hold the requested process.
15s
Best-Fit
best-fit
Best Fit
best fit
12: In paging systems, physical memory is divided into fixed-size blocks called ________, which directly correspond to logical memory pages of identical size.
15s
frames
Frames
13: The simplest disk scheduling algorithm that services incoming I/O requests strictly in the order they arrive is ________.
15s
fcfs
FCFS
14: The memory allocation strategy that simply selects the very first free space in memory that is large enough for a process is called ________.
15s
first-fit
First-Fit
first fit
first-fit
15: In C file handling, the standard library function used to open an existing file or create a new file stream is ________.
15s
fopen
fopen()
16: In ________, memory is divided into fixed-size blocks called pages.
15s
paging
Paging
17: The process of dividing a program into logical, variable-sized parts is called ________.
15s
Segmentation
segmentation
18: The ________ structure organizes files and directories in an operating system.
15s
Directory
directory
19: File ________ determine who can read, write, or execute a file.
15s
Permissions
permissions
20: The ________ scheduling algorithm selects the disk request that is closest to the current head position.
15s
SSTF
sstf
21: 1. First Fit 2. Best Fit
3. Worst Fit
4. External Fragmentation
a. Allocates the largest suitable block
b. Free memory is scattered between allocated blocks
c. Allocates the first suitable block
d. Allocates the smallest suitable block
20s
1-d, 2-c, 3-a, 4-b
1-c, 2-d, 3-a, 4-b
1-a, 2-b, 3-d, 4-c
1-b, 2-a, 3-c, 4-d
22: 1. FCFS 2. SSTF 3. SCAN 4. C-SCAN a. Selects the request with shortest seek distance b. Services requests in arrival order c. Moves in one direction & then reverses d. Services requests in one direction and return to the beginning
20s
1-a, 2-b, 3-d, 4-c
1-b, 2-a, 3-c, 4-d
1-c, 2-d, 3-a, 4-b
1-d, 2-c, 3-b, 4-a
23: 1. Paging 2. Segmentation 3. Virtual Memory 4. Page Fault a. Execution of programs that may not fit in physical memory b. Uses fixed-size blocks c. Occurs when a required page is not present in main memory d. Uses variable-sized logical units
20s
1-b, 2-d, 3-a, 4-c
1-d, 2-b, 3-c, 4-a
1-a, 2-c, 3-d, 4-b
1-c, 2-a, 3-b, 4-d
24: 1. Page 2. Frame 3. Page Table 4. Page Fault a. Fixed-size block of physical memory b. Mapping between pages and frames c. Fixed-size block of logical memory d. Required page is not available in main memory
20s
1-a, 2-c, 3-d, 4-b
1-c, 2-a, 3-b, 4-d
1-b, 2-d, 3-a, 4-c
1-d, 2-b, 3-c, 4-a
25: 1. Internal Fragmentation 2. External Fragmentation 3. First Fit 4. Best Fit a. Smallest suitable memory block b. Unused space inside an allocated block c. First available suitable memory block d. Free memory exists between allocated blocks
20s
1-d, 2-b, 3-a, 4-c
1-b, 2-d, 3-c, 4-a
1-a, 2-c, 3-d, 4-b
1-c, 2-a, 3-b, 4-d
26: 1. Seek Time 2. Disk Head 3. Disk Scheduling 4. I/O a. Input and Output operations b. Time taken to move the disk head c. Component that reads/writes data d. Determines order of disk requests
20s
1-b, 2-c, 3-d, 4-a
1-c, 2-b, 3-a, 4-d
1-d, 2-a, 3-c, 4-b
1-a, 2-d, 3-b, 4-c
27: 1. Paging 2. Segmentation 3. Virtual Memory 4. Thrashing a. Logical division – variable blocks b. Fixed-size block division of memory c. Execute process larger than RAM d. Excessive page swapping – performance drop
20s
1–b, 2–a, 3–c, 4–d
1–a, 2–b, 3–d, 4–c
1–c, 2–d, 3–a, 4–b
1–d, 2–c, 3–b, 4–a
28: 1. File Permissions 2. Directory Structure 3. Path Navigation 4. File Operations a. Grants read, write, execute access b. Maps file names to inode c. Absolute vs Relative path d. System calls open(), read(), write()
20s
1–a, 2–b, 3–c, 4–d
1–b, 2–a, 3–d, 4–c
1–c, 2–d, 3–a, 4–b
1–d, 2–c, 3–b, 4–a
29: 1. SCAN Scheduling 2. Disk Management 3. File Permissions 4. Directory Structurea. Elevator algorithm for disk headb. Formatting, partitioning, free space
c. rwx managed by chmod
d. Tree/graph mapping name to inode
20s
1–a, 2–b, 3–c, 4–d
1–b, 2–a, 3–d, 4–c
1–c, 2–d, 3–a, 4–b
1–d, 2–c, 3–b, 4–a
30: 1. Paging 2. Segmentation 3. Virtual Memory4. Thrashing
a. Avoids external fragmentation
b. Logical division into code/data/stack
c. Uses disk as RAM extension
d. Low CPU utilization due to swapping