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

OS Practice MCQ Set 2

Uploaded by

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

OS Practice MCQ Set 2

Uploaded by

lijexow585
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Operating Systems Practice MCQs Set 2

1. Banker s algorithm prevents deadlock by


A. Killing a process when deadlock occurs
B. Detecting cycles in the resource graph after allocation
C. Ensuring the system only enters a safe state
D. Allowing preemption of non-preemptable resources
2. A TLB is used to
A. Buffer disk I/O requests
B. Cache recent address translations
C. Increase CPU clock speed
D. Schedule I/O devices
3. Preemptive scheduling can lead to
A. Zero overhead
B. Lower context-switch overhead
C. More context switches than non-preemptive
D. No starvation ever
4. Thrashing refers to
A. High CPU utilization due to compute-bound jobs
B. Excessive page faults causing low CPU utilization
C. Disk platter damage
D. Overheating of the memory chips
5. External fragmentation is a drawback of
A. Paging
B. Fixed partitions
C. Segmentation/variable partitions
D. TLB caching
6. Among IPC methods, the lowest overhead for large data exchange is usually
A. Signals
B. Shared memory
C. Named pipes (FIFOs)
D. Sockets
7. A semaphore is useful to
A. Speed up CPU clock
B. Limit concurrent access to a resource
C. Replace the scheduler
D. Encrypt files
8. Change file owner in Linux with
A. chmod
B. chown
C. chgrp
D. umask
9. Which system call creates a new process in UNIX?
A. spawn()
B. fork()
C. exec()
D. clonefs()
10. Which set lists the necessary conditions for deadlock (Coffman)?
A. Mutual exclusion, hold-and-wait, no preemption, circular wait
B. Mutual exclusion, preemption, circular wait, fairness
C. Hold-and-wait, preemption, fairness, priority
D. No preemption, starvation, circular wait, fairness
11. Setuid on an executable means
A. Run with caller s UID
B. Run with file owner s effective UID
C. Disable execution
D. Mount as root-only
12. File mode rwxr-xr-- corresponds to octal
A. 744
B. 754
C. 755
D. 764
13. A Type-1 hypervisor
A. Runs on top of a host OS
B. Runs directly on bare metal
C. Is the same as a container engine
D. Is used only for storage
14. In POSIX filesystems, ctime typically means
A. Creation time of the file
B. Last metadata change time
C. Last access time
D. Last content modification time
15. The IPv4 loopback address is
A. 0.0.0.0
B. 127.0.0.1
C. 255.255.255.255
D. 192.168.0.1
16. A race condition occurs when
A. Two processes use different CPUs
B. Outcome depends on the interleaving of operations
C. The scheduler is preemptive
D. The CPU has multiple cores
17. Lower nice value (Unix) generally means
A. Lower priority
B. Higher priority
C. No effect
D. Process is I/O-bound
18. Which call replaces the current process image with a new program?
A. fork()
B. wait()
C. exec()
D. exit()
19. A pipeline in the shell connects
A. Two files with a symlink
B. stdin of one process to stdout of another
C. Two sockets directly
D. Two processes address spaces
20. The clock (second-chance) algorithm approximates
A. FIFO
B. LRU
C. Optimal
D. Random
Answer Key
1: C 2: B 3: C 4: B 5: C 6: B 7: B 8: B 9: B 10: A
11: B 12: B 13: B 14: B 15: B 16: B 17: B 18: C 19: B 20: B

You might also like