📝 Conflict resolution in Linux system (8 MCQs)
Resolving Competing Drivers and Hardware Resource Claims
Conflict resolution in Linux concerns situations where devices, drivers, or kernel components compete for resources or attempt to control the same hardware. The kernel's device model, resource-management facilities, and driver matching rules help prevent incompatible assignments. Resolution depends on the source of the conflict, including device identifiers, memory regions, interrupt lines, I/O ports, or competing driver claims.
Why Shared Hardware Requires Explicit Ownership
Multiple drivers must not independently control the same device or claim overlapping exclusive hardware resources without coordination. Such conflicts can cause failed initialisation, corrupted data, interrupt errors, or unstable operation. Linux therefore tracks registered devices and resource claims, while bus-specific matching and configuration determine which driver should manage each device.
Driver Binding and Resource Conflict Checks
The driver core matches device identifiers with registered drivers and attempts the appropriate probe routine. Resource-management functions check whether exclusive address ranges or other resources are available. If probing or resource acquisition fails, the driver reports an error and releases resources already acquired, allowing appropriate alternatives or later retries.
Example of Two Drivers Claiming One Device
A PCI device matches two candidate driver identifier tables. The driver core binds a suitable driver according to device registration and matching behaviour. If the selected driver's probe fails, it releases its acquired resources. Another matching driver may then be considered according to the device model and subsystem rules.
Configuration, Compatibility and Troubleshooting
Correct driver matching and resource tracking reduce device conflicts and improve hardware reliability. Administrators can inspect kernel logs, device information, loaded modules, and resource assignments to diagnose problems. Blacklisting or binding configuration can resolve specific conflicts, but forcing a driver onto unsupported hardware may create instability rather than solve the underlying issue.
Misconceptions About Linux Conflict Resolution
'Linux always selects the newest driver version automatically' ignores explicit matching, configuration, and package selection. 'Two drivers can safely control one device independently' is generally false for exclusive device ownership. 'A failed probe permanently prevents detection' is incorrect because devices and drivers may be retried after conditions change.
Exam Focus: Driver Binding and Resource Allocation
Identify the difference between driver matching, binding, and resource acquisition. Explain what happens when a probe routine fails or a resource is already claimed. Questions may examine overlapping I/O regions, module blacklisting, device identifiers, kernel logs, and why a compatible driver must match the actual hardware.
Key Terms of Linux Conflict Resolution
- Driver binding - Association between a device and driver.
- Resource claim - Reservation of a hardware resource.
- Probe failure - Unsuccessful device initialisation.
- Blacklisting - Preventing automatic module loading.
- Device matching - Comparing hardware identifiers with drivers.
📝 All Conflict resolution in Linux system MCQs
Q1. Which license must be used for any code that is added directly to the Linux kernel?
📖 Explanation: The Linux kernel is released under the GNU General Public License (GPL), so any code that becomes part of the kernel must also be GPL‑licensed and its source made available. MIT, BSD, and Apache licenses do not satisfy this requirement, so code under those terms cannot be merged directly into the kernel. In practice, if a developer writes a driver and wants it to be part of the core kernel, they must release it under GPL, ensuring legal compatibility and community access.
Q2. Why are loadable kernel modules advantageous when developing a new device driver?
📖 Explanation: Loadable kernel modules let developers compile a driver as an independent object and insert it into a running kernel. This avoids the lengthy cycle of rebuilding, reinstalling, and rebooting the entire kernel for each change. By testing the driver in place, developers can iterate quickly, isolate bugs, and distribute the module without forcing users to recompile their kernels. Options that suggest recompiling the whole kernel ignore the primary benefit of modular testing, making them incorrect.
Q3. How does the ability to load modules at runtime influence overall system flexibility?
📖 Explanation: Runtime module loading provides flexibility because functionality can be added, removed, or upgraded without stopping the system. Administrators can tailor the kernel to current hardware needs, loading only required drivers and freeing resources. This dynamic capability also simplifies maintenance, as updates can be applied to individual modules rather than the whole kernel. Answers that claim static kernels are more flexible miss the point that modularity reduces downtime and allows targeted changes, which is why they are wrong.
Q4. A system administrator needs to add support for a newly installed network card without rebooting the machine. Which action should be taken first?
📖 Explanation: If a new network card appears, the quickest way to gain support is to load its driver as a loadable module using a tool such as insmod or modprobe. This method does not require rebuilding the kernel or rebooting the machine, preserving uptime. Recompiling the kernel or editing the initramfs would take significantly more time and risk destabilizing the system. Therefore, option B is the correct choice, while the other options describe unnecessary or disruptive procedures.
Q5. A third‑party vendor provides a driver under a proprietary license. Can this driver be loaded as a module on a standard Linux system?
📖 Explanation: The Linux kernel’s GPL license applies to code that is linked directly with kernel symbols. A third‑party driver that is compiled as a separate loadable module does not become part of the kernel’s core code, so it can remain under a different license as long as it does not use GPL‑only symbols. Consequently, such a module can be loaded without violating the GPL, making option C correct. Options stating that any module must be GPL or that it must be re‑licensed are inaccurate.
Q6. Two loadable modules export the same symbol, causing a conflict when both are loaded. Which step most effectively resolves the conflict?
📖 Explanation: When two modules expose identical symbols, the kernel cannot load both because of name collisions. Adjusting the module dependency information—such as updating the .modinfo file or using symbol versioning—allows the kernel to differentiate the symbols and load the appropriate module without conflict. Simply unloading all modules (option A) does not fix the underlying clash, recompiling the kernel (option C) is excessive, and renaming symbols (option D) is more work than needed. Therefore, option B correctly addresses the conflict.
Q7. What is the primary impact of the Linux kernel’s GPL‑only policy on the distribution of proprietary device drivers?
📖 Explanation: The kernel’s GPL‑only policy means that any code linked directly into the kernel must be released under GPL, preventing proprietary code from becoming part of the kernel binary. Consequently, proprietary device drivers can only exist as loadable modules that do not use GPL‑only symbols, or they must be re‑licensed under GPL to be integrated. Options suggesting that proprietary drivers can be bundled or used without restrictions ignore the licensing requirement, making them incorrect.
Q8. A developer wants to test a new file‑system driver. Which approach minimizes system downtime while ensuring accurate testing?
📖 Explanation: Compiling the driver as a loadable module lets the developer insert it into the active kernel, run tests, and unload it without needing a reboot, thereby minimizing downtime. Rebuilding the whole kernel (option B) introduces unnecessary delay and risk, while user‑space FUSE (option C) does not test kernel‑level integration, and full virtualization (option D) adds complexity. Hence, option A provides the most efficient and realistic testing environment.