Computer Knowledge 3
Skill Assessment Quiz
Test your knowledge with these multiple-choice questions
1. In which file system is the term 'inode' commonly used?
Explanation:
'inode' is a term commonly used in UNIX and Linux systems, specifically in file systems like ext3, ext4, etc. It is a data structure used to store information about a file except its name or its actual data.
2. Which file system is known for providing better security features?
Explanation:
NTFS (New Technology File System) is known for providing better security features, such as file encryption, permission settings, and support for larger volumes compared to older file systems like FAT16.
3. What does the 'mount' command primarily do in a Unix-like operating system?
Explanation:
In Unix-like operating systems, the 'mount' command is used to attach a file system to a specific directory so its contents can be accessed by the system.
4. Which of the following is a disadvantage of using the FAT32 file system?
Explanation:
The FAT32 file system has a limitation on file size, unable to handle files larger than 4GB, which can be a significant disadvantage for users needing to store larger files.
5. Which file system supports journaling to prevent data loss during crashes?
Explanation:
ext4 supports journaling, which helps to prevent data loss during crashes by keeping track of changes not yet committed to the file system and thus allows quick recovery after a crash.
6. What is the main advantage of Solid State Drives (SSD) over Hard Disk Drives (HDD)?
Explanation:
SSDs have lower power consumption and provide faster data access speeds compared to HDDs, making them more efficient for performance-driven tasks.
7. Which of the following file systems is primarily used in MacOS?
Explanation:
HFS+ (Hierarchical File System Plus) is the file system used primarily in MacOS, providing features like file compression and access control.
8. What is the primary role of a directory in a file system?
Explanation:
The primary role of a directory in a file system is to organize files, serving as a container that can include files and other directories.
9. In storage management, what does RAID stand for?
Explanation:
RAID stands for Redundant Array of Independent Disks, a data storage technology that combines multiple hard drives into a single unit to improve performance and provide fault tolerance.
10. What type of file system is commonly used by USB flash drives?
Explanation:
FAT32 is commonly used by USB flash drives due to its wide compatibility across different operating systems and devices.
11. Which file attribute is used to indicate whether a file is read-only?
Explanation:
The 'read-only' attribute is used to indicate that a file cannot be modified, ensuring that it is protected from being accidentally changed or deleted.
12. Which storage device would you choose for the fastest data access speed?
Explanation:
An NVMe SSD (Non-Volatile Memory Express Solid State Drive) is designed for high-speed data access, surpassing traditional SATA interfaces with its faster reading/writing capabilities.
13. What is the fundamental purpose of disk partitioning?
Explanation:
The fundamental purpose of disk partitioning is to manage disk space efficiently by dividing a disk into multiple sections, each acting as an independent volume for better organization and resource allocation.
14. Which command in Windows is used to check and repair file system errors?
Explanation:
The 'chkdsk' command in Windows is used to check for and repair file system errors, ensuring that disk integrity is maintained by fixing potential issues.
15. Which of the following is the primary goal of an operating system's scheduler?
Explanation:
The primary goal of an operating system's scheduler is to ensure fair allocation of resources among all processes. This involves allocating CPU time and other resources so that all processes can make progress and the system runs efficiently without any process monopolizing resources. Other goals like maximizing throughput or minimizing response time can be secondary objectives.
16. What is the key characteristic of a preemptive scheduling strategy?
Explanation:
In preemptive scheduling, a process can be interrupted and moved to the ready queue to allow another process to execute. This is in contrast to non-preemptive scheduling, where a process keeps the CPU until it completes or voluntarily gives up the CPU.
17. Which scheduling algorithm is used in a round-robin scheduling strategy?
Explanation:
Round-robin scheduling is based on a time quantum. Each process is assigned a fixed time slice (time quantum), and if it doesn't finish in that time, it is placed at the back of the queue. This scheduling is cyclic and fair to all processes.
18. What is the main advantage of a multilevel queue scheduling strategy?
Explanation:
A multilevel queue scheduling strategy divides the ready queue into several separate queues, each with its own scheduling algorithm. This supports priority scheduling by placing higher priority processes in separate queues, ensuring they receive superior scheduling treatment relative to lower priority processes.
19. Which of the following describes the concept of time-sharing in operating systems?
Explanation:
Time-sharing in operating systems allows multiple users to use the system by giving each user a portion of the computer's resources in turn. This gives the illusion of simultaneous use by rapidly switching between different users' tasks.
20. What is the primary drawback of using a shortest job first (SJF) scheduling algorithm?
Explanation:
The main drawback of the shortest job first (SJF) algorithm is the difficulty in determining the length of the next CPU burst for a process. Without this information, it is challenging for the scheduler to know which job is the shortest. Moreover, it can lead to starvation of longer processes if short processes continually arise.
21. In context switching, which of the following is saved to switch between processes?
Explanation:
During context switching, the state of the current process, including the program counter and CPU registers, is saved so that it can be resumed from the same point in the future. The program counter is particularly crucial as it indicates the next instruction to be executed.
22. Why is priority scheduling not always optimal for real-time systems?
Explanation:
In priority scheduling, higher priority tasks may indefinitely delay lower priority tasks, a problem known as starvation. This is a significant issue in real-time systems where timely execution of lower priority tasks may be necessary to maintain system stability and performance.
23. Which of the following is a definition of context switching?
Explanation:
Context switching is the process where the state of a CPU is stored so that a process can be resumed at a later point. This includes saving the content of CPU registers, program counter, and other process-related information to resume execution later.
24. What does the term 'aging' refer to in operating system scheduling?
Explanation:
Aging in operating system scheduling is a technique used to increase the priority of a process that has waited in the system for a long time, preventing starvation. This ensures that all processes eventually receive CPU time, especially in priority-based scheduling systems.
25. What does CLI stand for in operating system interfaces?
Explanation:
CLI stands for Command Line Interface, which is a text-based user interface used to interact with the computer's operating system. It allows users to execute various commands by typing them in the space provided by the system.
26. Which of the following is a primary characteristic of a Graphical User Interface (GUI)?
Explanation:
A GUI, or Graphical User Interface, is characterized by its use of visual elements such as windows, icons, and buttons, allowing users to interact with electronic devices through direct manipulation of these graphical elements.
27. In what way is CLI generally more efficient than GUI?
Explanation:
CLI can be more efficient than GUI for users who are knowledgeable about the necessary commands because it allows for fast, direct input and execution of commands without the need for navigating menus or graphical elements.
28. Which is NOT a benefit of using GUI over CLI?
Explanation:
GUIs are generally more intuitive and user-friendly for new users and allow multitasking, but they usually require more system resources compared to CLIs, which are more lightweight by nature.
29. What type of user interface uses text-based commands to give instructions to the software?
Explanation:
CLI, or Command Line Interface, is the type of user interface that utilizes text-based commands for communication with the software or operating system.
30. Why might a developer prefer CLI over GUI when managing servers?
Explanation:
Developers often prefer CLI for server management because it supports scripting and automation, enabling them to perform repetitive tasks efficiently and consistently.
31. What is the main disadvantage of using CLI for ordinary users?
Explanation:
The main disadvantage of using CLI for ordinary users is that it requires memorization of syntax and commands, which can be challenging for those not familiar with the system or software.
32. Which of the following is an example of a CLI tool?
Explanation:
Bash shell is an example of a CLI tool. It is a widely used command language interpreter for the Unix operating system, providing a command line user interface for interacting with the operating system.
33. Which of these user interfaces allows for easy access to system functionalities, especially for visually oriented tasks?
Explanation:
GUI, or Graphical User Interface, allows for easy access to system functionalities through visual representations like icons and windows, which are particularly useful for tasks that benefit from visual orientation.
34. How do keyboard shortcuts benefit users in a GUI?
Explanation:
Keyboard shortcuts benefit users in a GUI by reducing the dependence on a mouse, allowing for faster navigation and command execution through using specific key combinations.
35. Which of the following is a typical feature of a GUI?
Explanation:
Drag and drop functionality is a typical feature of a GUI, allowing users to move objects around on the screen by clicking with a mouse or touchpad and dragging them to new locations.
36. What is the main purpose of an interrupt in an operating system?
Explanation:
The main purpose of an interrupt is to alert the processor to a high-priority condition that requires the current code's execution to be paused. This allows the operating system to respond promptly to important events, ensuring efficient and timely handling of tasks.
37. Which of the following best describes an interrupt vector?
Explanation:
An interrupt vector is a unique number associated with each type of interrupt. This number is used by the system to locate the starting address of the interrupt service routine.
38. Which type of interrupt signals the CPU to stop its current activities and execute the interrupt service routine (ISR)?
Explanation:
A hardware interrupt signals the CPU to stop its current activities and execute the corresponding interrupt service routine (ISR). This is typically triggered by hardware events such as I/O operations or completion.
39. How does an operating system handle priority between multiple interrupts?
Explanation:
An operating system handles priority between multiple interrupts by using a scheduling algorithm that considers the priority of the interrupts, ensuring that higher-priority interrupts are handled before lower-priority ones.
40. What is the primary difference between an interrupt and an exception?
Explanation:
The primary difference is that interrupts typically come from external hardware, whereas exceptions are generated by the software when an unusual condition such as divide-by-zero or invalid memory access occurs.
41. Which of the following is a common example of a software interrupt?
Explanation:
A system call is a common example of a software interrupt. It is an explicit request made via a software instruction for operating system services.
42. What is a trap in the context of exception handling?
Explanation:
A trap is a type of interrupt generated by an error condition or a specific instruction within a program. It causes the operating system to execute a special routine to handle the error.
43. Which term describes the process of determining which interrupt or exception to handle first?
Explanation:
Exception prioritization refers to the process of determining the order in which multiple pending exceptions or interrupts should be handled, based on their priority levels.
44. What role does the Interrupt Service Routine (ISR) play when an interrupt occurs?
Explanation:
The Interrupt Service Routine (ISR) performs the specific function needed to service an interrupt. It executes the necessary instructions to handle the interrupt event once it is triggered.
45. In what scenarios might a non-maskable interrupt (NMI) be used?
Explanation:
Non-maskable interrupts (NMIs) are used for critical hardware failures because they cannot be ignored by the processor. This ensures that the system can respond even in emergencies or severe malfunction scenarios.
46. What happens if the system receives an interrupt while it is already handling another interrupt?
Explanation:
If the system is configured correctly, the new interrupt is typically queued to be handled after the current interrupt processing is complete, ensuring orderly execution and management of interrupts.
47. Which component of the operating system manages and processes interrupts?
Explanation:
The interrupt handler is the component of the operating system responsible for managing and processing interrupts. It deals with receiving and responding to hardware signals and software requests.
48. How does the operating system return to a program after handling an interrupt?
Explanation:
The operating system uses the stored program counter (PC) to return to the exact point in the program where the interrupt occurred, allowing for seamless continuation of program execution post-interruption.
49. What is a vector table in the context of interrupts?
Explanation:
A vector table is a collection of memory addresses pointing to each of the Interrupt Service Routines (ISRs). It helps the CPU to execute the correct ISR when an interrupt occurs.
50. Why do some systems use instruction pipelining with interrupts?
Explanation:
Instruction pipelining can be used to increase the speed of interrupt handling by overlapping the steps of multiple instructions, thus enhancing throughput and efficiency in dealing with interrupts.
51. What is the primary advantage of virtual memory in an operating system?
Explanation:
Virtual memory allows a computer to compensate for physical memory shortages by temporarily transferring data from random access memory to disk storage. This increases the available address space, allowing an application to operate with more memory than is physically available.
52. Which one of the following is NOT a technique used for managing virtual memory?
Explanation:
Fragmentation is a phenomenon related to memory allocation but not a technique for managing virtual memory. Paging and segmentation are techniques used to implement virtual memory, and demand paging is a method for loading pages into memory only as they are needed.
53. In a paging system, what term describes the scenario when a program frequently accesses pages not currently in physical memory?
Explanation:
Thrashing occurs when a process is spending more time paging in and out rather than executing instructions. This happens when a program frequently accesses pages that are not in physical memory, causing a high page fault rate.
54. Which of the following best describes a page fault?
Explanation:
A page fault occurs when a program tries to access a page that is not currently loaded in physical memory. The operating system must then load the page from disk into physical memory.
55. In a system using page replacement strategies, which strategy replaces the page that will not be used for the longest period of time?
Explanation:
The Optimal Page Replacement strategy replaces the page that will not be used for the longest period of time. It is theoretically the best method, but it requires future knowledge of the pages to be accessed, which is difficult to obtain in practice.
56. Which system call is responsible for requesting more pages than currently allocated when implementing virtual memory?
Explanation:
The 'brk' system call is used to dynamically increase the heap size, which may lead the operating system to allocate more pages than currently allocated for a process, implementing dynamic virtual memory allocation.
57. What is the purpose of the Translation Lookaside Buffer (TLB) in a virtual memory system?
Explanation:
The Translation Lookaside Buffer (TLB) is a cache used to reduce the time taken to access a second-level page table. It stores recent translations of virtual memory to physical addresses.
58. Which of the following is most likely to cause a high page fault rate?
Explanation:
A high page fault rate is typically caused by limited physical memory and poorly managed page replacement strategies, leading to frequent access of pages not in memory. Applications with poor locality or patterns not suited to the page replacement strategy might also contribute.
59. What happens to a process when a page fault occurs?
Explanation:
When a page fault occurs, the process is typically put to sleep or blocked until the required page is fetched from disk into physical memory. This ensures that the process has the correct data to continue execution.
60. What is the main benefit of using a virtual memory system that combines both paging and segmentation?
Explanation:
Combining paging and segmentation offers higher flexibility and ease of programming by allowing a program to be divided logically into segments while also gaining the benefits of paging, such as non-contiguous memory allocation and protection against unauthorized access.
61. How is virtual memory typically implemented?
Explanation:
Virtual memory is typically implemented using a combination of hardware and software that manages memory addresses and pages. It divides the virtual address space into pages, which can be managed independently of physical memory.
62. Which data structure does an operating system commonly use to manage page mapping from virtual to physical memory?
Explanation:
A Page Table is a data structure used by the operating system to keep track of the mapping between virtual pages and physical memory addresses. It is a critical part of the virtual memory system.
63. What is resource allocation in an operating system?
Explanation:
Resource allocation in an operating system refers to the process of distributing available resources (like CPU time, memory space, and peripheral devices) among the various running programs. This ensures that each process gets the resources it needs to execute, efficiently and effectively.
64. Which of the following conditions must hold simultaneously to cause a deadlock?
Explanation:
For a deadlock to occur, four conditions must hold simultaneously: Mutual exclusion (resources cannot be shared among busy processes), Hold and wait (processes holding resources while waiting for others), No preemption (resources cannot be forcibly taken away), and Circular wait (a closed chain of processes exists, where each process holds at least one resource needed by the next process).
65. What is meant by prevention in deadlock prevention techniques?
Explanation:
Deadlock prevention refers to a set of techniques used to ensure that at least one of the necessary conditions for deadlock occurrence (mutual exclusion, hold and wait, no preemption, and circular wait) is never fulfilled, thus preventing deadlocks from forming.
66. Which deadlock prevention technique involves processes requesting all the resources they will need before execution?
Explanation:
The hold and wait avoidance technique used in deadlock prevention involves requiring processes to request and be allocated all the resources they will need before they begin execution, or not to hold any resources while waiting for others. This prevents processes from holding resources while requesting more, eliminating one of the conditions for deadlock.
67. Which algorithm is used to avoid deadlock by analyzing resource-allocation states?
Explanation:
The Banker's algorithm is a resource allocation and deadlock avoidance algorithm that tests for safe resource allocation. It evaluates every possible allocation of resources to determine whether a safe state exists, thus avoiding deadlocks.
68. What is the primary disadvantage of deadlock avoidance techniques?
Explanation:
Deadlock avoidance techniques, like the Banker's algorithm, require advanced information about how resources will be requested for each process. This can be difficult to predict accurately in many systems and increases the complexity of resource allocation.
69. Which of the following is a strategy for ensuring that deadlock does not occur in a system?
Explanation:
Deadlock detection involves a strategy where the system is allowed to enter a deadlock state, and methods are put in place to periodically check for deadlocks and recover from them if they occur.
70. How does 'no preemption' affect deadlock prevention?
Explanation:
In deadlock conditions, 'no preemption' means resources cannot be forcibly taken from a process. Deadlock prevention strategies can remove this condition by allowing resource preemption, i.e., taking resources from one process and giving them to another, potentially preventing a deadlock.
71. Which of the following is NOT a condition for a deadlock?
Explanation:
Resource sharing actually allows processes to cooperate by allowing multiple processes to use the same resources if managed properly. It is not a condition for deadlock; rather, mutual exclusion, hold and wait, no preemption, and circular wait are the necessary conditions for deadlocks.
72. Why is circular wait considered a necessary condition for deadlock?
Explanation:
In a deadlock, circular wait creates a scenario where a closed loop of processes is formed, and each process in the loop is waiting for a resource held by another process. No process in this chain can proceed, hence completing the conditions for deadlock.
73. In context of resource allocation, what is a "safe state"?
Explanation:
A 'safe state' in resource allocation means that the system can allocate resources to each process in some order and still avoid a deadlock. It signifies that the sequence of resource allocation can lead to all processes completing their tasks without ever entering a deadlock.
74. Which technique helps in both detecting and preventing deadlocks by monitoring resources and processes?
Explanation:
The Resource Allocation Graph (RAG) is used to detect and prevent deadlocks. It visually represents the allocation of resources to processes and can indicate if a cycle (which might cause a deadlock) has occurred.
75. Which term describes the process of verifying the identity of a user or process in a computing system?
Explanation:
Authentication is the process of verifying the identity of a user or process. It typically involves checking credentials like usernames and passwords, biometric data, or other forms of identification to ensure that the person or system is legitimate.
76. What is the main purpose of access control in operating systems?
Explanation:
Access control is primarily concerned with restricting access to resources within a computing environment. It ensures that only users with the necessary permissions are able to access specific data or services, thus protecting sensitive information from unauthorized access.
77. Which of the following is NOT a common access control model?
Explanation:
Variable Access Control (VAC) is not a recognized access control model. The common models are Role-Based Access Control (RBAC), Discretionary Access Control (DAC), and Mandatory Access Control (MAC), each offering different methods for controlling access to resources based on roles, ownership, or policies, respectively.
78. In the context of access control, what does the principle of 'least privilege' entail?
Explanation:
The principle of 'least privilege' mandates that users are granted the minimal amount of access necessary to perform their job functions. This approach reduces the risk of accidental or intentional misuse of system resources.
79. What is the primary function of a firewall in network security?
Explanation:
A firewall's primary function is to act as a barrier between a private internal network and the public internet, controlling incoming and outgoing network traffic based on predetermined security rules. It helps prevent unauthorized access, offering a level of protection against various security threats.
80. Which type of attack can be mitigated by using two-factor authentication?
Explanation:
Brute force attacks involve trying numerous password combinations to gain unauthorized access. Two-factor authentication (2FA) enhances security by requiring a second piece of information beyond just the password, making it more challenging for attackers to gain access even if they guess the password.
81. What does a 'honeypot' refer to in the context of cybersecurity?
Explanation:
A honeypot is a security mechanism set to detect, deflect, or counteract attempts of unauthorized use of information systems. It is essentially a decoy system that appears to be a valuable target to attackers, but is isolated and monitored to study their behavior and prevent real damage.
82. Which term describes a method used to strengthen passwords against hacking attempts?
Explanation:
Salting refers to adding random data to a password before hashing it to change the resulting hash value. This makes it significantly harder for attackers to use precomputed tables (rainbow tables) for cracking passwords, thus strengthening password security.
83. What is 'multi-factor authentication' (MFA)?
Explanation:
Multi-factor authentication (MFA) is a security system that requires more than one form of verification before access is granted to a system or application, enhancing security by combining two or more credentials such as a password, a code sent to a mobile device, or a fingerprint.
84. Which operating system security feature includes the ability to run applications with the lowest possible privileges?
Explanation:
Privilege separation is a technique used to limit the damage that can be done by vulnerabilities in high-privileged processes. By running processes with the lowest possible privileges, it reduces the risk that a process could be exploited to affect system operation.
85. Why is it important to keep operating system updates regularly?
Explanation:
Regularly updating an operating system is critical as these updates often include patches for known security vulnerabilities. This helps protect against exploits and ensures that the system remains secure against potential threats.
86. What is the primary role of a device driver in an operating system?
Explanation:
Device drivers are specialized programs allowing the operating system to communicate and control hardware devices. They abstract the communication between the OS and the hardware, facilitating proper device operation.
87. Which of the following is NOT typically a responsibility of device drivers?
Explanation:
Device drivers do not usually handle direct communication with the network; this is more typically managed by network protocols and network interface cards or relevant network drives. Device drivers focus on the interface between hardware and the OS.
88. What does DMA stand for in the context of I/O management?
Explanation:
DMA stands for Direct Memory Access. It is a technique that allows hardware devices to access the main system memory independently of the CPU, improving data transfer efficiency between devices and memory.
89. Which of these methods is used by an operating system to manage the I/O operations efficiently?
Explanation:
All the listed methods (Polling, Double Buffering, and DMA) are techniques used by operating systems to manage I/O operations efficiently. Each has its advantages and specific use cases.
90. What function does an interrupt serve in an I/O system?
Explanation:
Interrupts allow devices to communicate with the CPU and signal when they need immediate attention. This efficient mechanism saves CPU time by allowing it to perform other tasks while waiting for I/O operations to complete, rather than continuously checking each device.
91. What kind of buffer is generally used for I/O operations that anticipate a high rate of incoming data?
Explanation:
Circular buffers are commonly used for I/O operations involving a high rate of incoming data. They allow continuous data flow by reusing buffer space as soon as data is processed, which is more efficient for the high throughput required.
92. Which level of a computer system deals directly with device drivers?
Explanation:
System software, part of the operating system, directly interfaces with device drivers. This layer manages hardware resources and provides an environment for applications to run.
93. What is a characteristic feature of character devices?
Explanation:
Character devices handle data in streams, one byte at a time. This feature makes them suitable for devices like keyboards and serial ports, where data is input and output sequentially.
94. How does the operating system know when to handle an I/O operation if not by polling?
Explanation:
Hardware interrupts are used instead of polling, as they are more efficient. Interrupts inform the CPU that an I/O operation requires attention when it is advantageous to do so, allowing the CPU to perform other tasks in the meantime.
95. What is the major advantage of using DMA in I/O operations?
Explanation:
DMA speeds up data transfer between devices and memory by allowing devices to send or fetch data directly to or from the memory without continuous CPU involvement, thus freeing CPU resources for other tasks.
96. Which of the following is the primary shell used in Unix operating systems?
Explanation:
The Bourne Shell, developed by Stephen Bourne in 1979, is the original Unix shell. It has been widely used in Unix systems and is often the default interactive shell for Unix users. Bash, however, is more common in Linux.
97. Which operating system is known for its open-source nature, allowing users to modify and distribute its source code freely?
Explanation:
Linux is an open-source operating system, meaning its source code is freely available for anyone to view, modify, and distribute. This has led to a wide variety of distributions tailored to different needs.
98. Which operating system uses the NTFS file system?
Explanation:
NTFS, or New Technology File System, is the file system that Windows operating systems, starting with Windows NT, primarily use.
99. Mac OS is based on which kernel type?
Explanation:
Mac OS, specifically macOS, is based on the XNU (X is Not Unix) kernel, which is a hybrid kernel combining aspects of both microkernels and monolithic kernels.
100. Which operating system lacks a graphical user interface by default, focusing instead on command-line operations?
Explanation:
Unix traditionally relies on a command-line interface and does not include a graphical user interface by default. GUIs can be added later, but they're not a base part of most Unix distributions.