stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
OS Week 7 - MCQ Practice Flashcards | StudBud
Explore
/
OS Week 7 - MCQ Practice
OS Week 7 - MCQ Practice
15 terms
·
StudBud Administration
·
231 plays
Imported from external platform
Flashcards
15 cards
F
Practice quiz
P
Host live
L
Questions
15
Answers
1
Which of the following algorithms is used for deadlock avoidance with multiple resource instances?
Dijkstra’s Algorithm
Kruskal’s Algorithm
Prim’s Algorithm
Banker’s Algorithm
2
What is a “Safe State” in the context of deadlock avoidance?
A state where resources can be allocated in some order and avoid deadlock
A state where all processes terminate immediately
A state where the system ignores resource requests
A state where no resources are allocated
3
Which Bash command would you use to continuously monitor system memory usage every 5 seconds?
top -m 5
free -m -s 5
vmstat -d 5
df -h 5
4
What is the role of the Program Counter (PC) in memory management?
To manage hardware interrupts
To hold the address of the next instruction to be executed
To allocate memory to processes
To execute instructions directly
5
Which command is used to redirect both standard output and standard error to the same file?
command &> file.txt
command 2> file.txt
command > file.txt
command >> file.txt
6
What is the function of base and limit registers in memory management?
To execute applications faster
To increase processing speed
To define the logical address space for a process
To manage disk storage
7
Which of the following is a technique for deadlock prevention related to the circular wait condition?
Denying requests when resources are unavailable
Allocating all resources to a process before execution
Allowing resources to be pre-empted
Imposing an ordering on resource types
8
How do you count the number of lines in a file using Bash?
cat file.txt
grep -c file.txt
sort file.txt | wc
wc -l < file.txt
9
How would you create a compressed tarball of the directory /home/user/data using gzip compression?
tar -czf data.tar.gz /home/user/data
tar -cf data.tar /home/user/data
zip -r data.tar.gz /home/user/data
gzip -c data /home/user/data
10
What is the purpose of the /proc directory in Linux?
To hold system backup files
To contain the kernel’s view of system processes and hardware
To manage disk partitions
To store user documents
11
In a Resource Allocation Graph (RAG), what does a cycle indicate?
Deadlock in all cases
A safe state in the system
Deadlock if there is only one instance per resource type
No possibility of deadlock
12
What is the main purpose of memory management in an operating system?
To facilitate software installation
To increase CPU clock speed
To manage memory allocation and avoid process interference
To monitor network activity
13
Which technique is used to reduce external fragmentation in memory management?
Static binding
Paging
Compaction
Caching
14
Which form of address binding allows a process to move freely between memory locations during execution?
Static Binding
Execution Time Binding
Compile Time Binding
Load Time Binding
15
What is a necessary condition for a deadlock to occur in a system?
Pre-emption Allowed
Mutual Inclusion
Circular Wait
Unlimited Resources