🎓 BookMCQ
← Back to 18. The Linux System

📝 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.
2
Easy
4
Medium
2
Hard

📝 All Conflict resolution in Linux system MCQs

Q1. Which license must be used for any code that is added directly to the Linux kernel?

A.MIT
B.GPL ✅
C.BSD
D.Apache
💡 Difficulty: easy | ✅ Correct: B

📖 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?

A.They require recompiling the entire kernel each time.
B.They run in user space with limited privileges.
C.They allow testing without rebuilding the whole kernel. ✅
D.They permanently replace existing kernel code.
💡 Difficulty: easy | ✅ Correct: C

📖 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?

A.It forces all drivers to be built into the kernel image.
B.It limits hardware support to a fixed set.
C.It requires a system reboot for every change.
D.It enables adding, removing, or updating functionality without stopping the system. ✅
💡 Difficulty: medium | ✅ Correct: D

📖 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?

A.Recompile and reinstall the entire kernel.
B.Load the appropriate driver as a loadable module using insmod or modprobe. ✅
C.Edit the initramfs and rebuild it.
D.Restart the computer in single‑user mode.
💡 Difficulty: medium | ✅ Correct: B

📖 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?

A.No, any driver must be GPL‑licensed to run.
B.Yes, but only if the kernel is recompiled with the driver built‑in.
C.Yes, because a loadable module can remain under a different license if it does not link to GPL‑only symbols. ✅
D.Only after the vendor releases the source under GPL.
💡 Difficulty: medium | ✅ Correct: C

📖 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?

A.Unload both modules, then reload only the needed one. ✅
B.Adjust the module dependency or symbol versioning so the kernel can differentiate the symbols.
C.Recompile the kernel with one of the drivers built‑in.
D.Rename the conflicting symbols in the source code of one module.
💡 Difficulty: hard | ✅ Correct: A

📖 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?

A.Proprietary drivers can be bundled with the kernel as long as they are signed.
B.Proprietary drivers must be distributed as separate user‑space applications.
C.Proprietary drivers may be included in the kernel if they do not use any kernel symbols.
D.Proprietary drivers cannot be linked directly into the kernel; they must remain separate modules or be released under GPL to be integrated. ✅
💡 Difficulty: hard | ✅ Correct: D

📖 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?

A.Compile the driver as a loadable module and insert it into the running kernel for testing.
B.Rebuild the entire kernel with the driver built‑in and reboot the machine. ✅
C.Run the driver in user space using a FUSE wrapper.
D.Simulate the driver with a virtual machine that mirrors the target hardware.
💡 Difficulty: medium | ✅ Correct: B

📖 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.

🔗 Related Topics (MCQs)