Q31
Q31 Which command on a Linux system will show the current process priority (niceness) values?
ps
top
nice
renice
Q32
Q32 A newly installed application is causing the system to slow down due to high CPU usage. Initially, you should:
Uninstall the application
Increase the system's RAM
Check the application's process priority
Update the system's CPU drivers
Q33
Q33 If a system frequently experiences slow down during multitasking, a possible solution could be to adjust:
The system's page file size
The scheduling algorithm parameters
The graphical user interface settings
The network bandwidth limits
Q34
Q34 In diagnosing system performance issues, if certain low-priority processes consume excessive CPU time, you should:
Increase their priority
Decrease their priority
Reassign them to a different user
Allocate them more memory
Q35
Q35 A real-time system is missing deadlines after a new task was introduced. The first step to troubleshoot is to:
Increase the system clock speed
Check the task's priority and execution time
Reduce the number of tasks
Update the RTOS
Q36
Q36 What is the primary purpose of synchronization in a multi-threaded environment?
To ensure that only one thread can access a resource at a time
To increase the execution speed of programs
To allocate memory efficiently
To prevent the system from crashing
Q37
Q37 A deadlock occurs when:
A process is waiting for a resource that is never released
Multiple processes are waiting for each other to release resources
A thread tries to access a locked resource
All of the above
Q38
Q38 Which of the following conditions must be present for a deadlock to occur?
Mutual exclusion, Hold and Wait, No preemption, Circular wait
Mutual exclusion, First Come First Served, Circular wait
Priority inversion, Hold and Wait, No preemption
All of the above
Q39
Q39 What does the term "mutual exclusion" mean in the context of synchronization?
Only one process can access a resource at a time
Any number of processes can share a resource
Resources can be accessed in any order
None of the above
Q40
Q40 In the Dining Philosophers Problem, deadlock can be avoided by:
Allowing only four philosophers to sit at the table at any time
Requiring philosophers to pick up both forks at the same time
Philosophers must request the waiter's permission to pick up forks
All of the above
Q41
Q41 Semaphore is a synchronization tool used to:
Signal between processes that a resource is free
Protect a shared resource from concurrent access
Count the number of process executions
All of the above
Q42
Q42 Priority inversion can be resolved using:
Priority inheritance
Increasing the system's priority
Decreasing the priority of lower-priority processes
All of the above
Q43
Q43 The Banker's algorithm is used for:
Detecting deadlocks
Preventing deadlocks
Memory allocation
Process scheduling
Q44
Q44 A critical section is:
A section of code that can be executed by multiple threads simultaneously
A section of code that requires mutual exclusion in access
A section of memory allocated to the OS
None of the above
Q45
Q45 In POSIX threads (pthreads), which function is used to initialize a mutex?
pthread_mutex_init
pthread_create
pthread_mutex_lock
pthread_join
Q46
Q46 Which of the following is true about condition variables in thread synchronization?
They allow threads to wait for certain conditions to be met
They automatically release mutexes when a thread waits
They prevent deadlocks
All of the above
Q47
Q47 A program frequently encounters a deadlock. A likely first step to debug is:
Eliminate all mutexes
Rewrite the program without threads
Identify and analyze the resources each thread is trying to access
Increase the number of threads
Q48
Q48 If a thread fails to release a lock, the immediate consequence is likely to be:
An increase in CPU usage
A deadlock or resource starvation for other threads
Faster program execution
None of the above
Q49
Q49 To prevent deadlocks, a common strategy is to:
Avoid locking mechanisms
Use a single thread for all operations
Ensure that locks are acquired in a consistent order
Increase the priority of all threads
Q50
Q50 In a system experiencing deadlocks, identifying the cause could involve:
Checking for unbounded priority inversions
Analyzing the order of resource requests
Increasing the number of available resources
All of the above
Q51
Q51 What is the purpose of a Memory Management Unit (MMU) in a computer system?
To enhance the CPU speed
To manage disk storage
To translate virtual addresses to physical addresses
To monitor system performance
Q52
Q52 Which memory allocation method involves dividing memory into fixed-sized partitions?
Dynamic allocation
Segmentation
Paging
Fixed partitioning
Q53
Q53 In operating systems, what is segmentation?
A technique to ensure data security
A memory management scheme that supports user view of memory
A method to enhance CPU performance
A type of external fragmentation
Q54
Q54 Virtual memory is:
Physical memory exclusively used by the operating system
A section of the hard disk used as RAM
An illusion of unlimited memory created by the OS
A type of volatile memory
Q55
Q55 What is thrashing in the context of memory management?
A technique to clean memory
A state where high paging activity is causing a slowdown
A method to increase memory access speed
A type of memory leak
Q56
Q56 The principle of locality in memory management refers to:
The allocation of memory to processes based on their size
The tendency of a processor to access the same set of memory locations repetitively over a short period of time
The distribution of files in contiguous memory blocks
None of the above
Q57
Q57 Page replacement algorithms are used for:
Assigning processes to the CPU
Deciding which pages to move to swap space when memory is full
Organizing files on disk
Managing peripheral devices
Q58
Q58 What distinguishes demand paging from pre-paging?
Demand paging only loads pages when they are needed, whereas pre-paging loads pages that are likely to be needed soon
Demand paging uses disk space, whereas pre-paging uses RAM exclusively
Demand paging is faster
None of the above
Q59
Q59 An operating system uses a Translation Lookaside Buffer (TLB) to:
Speed up memory access by storing recent translations of virtual memory to physical memory addresses
Decrease the CPU's workload
Manage disk storage
None of the above
Q60
Q60 Which function in C is used to allocate memory dynamically?
malloc()
free()
sizeof()
realloc()