CS Electrical And Electronics
@cselectricalandelectronics
All PostsCommunicationsElectronicsEmbedded SystemOperating System

Top 50 Kernel Programming & Device Driver Quiz Questions

Hello guys, welcome back to my blog. In this article, I will share the top 50 kernel programming & device driver quiz questions, or MCQ on kernel programming & device driver.

If you have any doubts related to electrical, electronics, and computer science, then ask questions. You can also catch me on Instagram – CS Electrical & Electronics And Chetan Shidling. 

Also, read:

Kernel Programming & Device Driver Quiz Questions

01. rmmod command can be used for ____?

Options:

  1. Load dynamic module
  2. Unload dynamic module
  3. Unload static module
  4. None of the above

Answer

02. read method returns _____ when an underlying buffer is empty (assume that file is opened with default flags)

Options:

  1. EFAULT
  2. -EINVAL
  3. 0
  4. None of the above

Answer

03. In struct file_operations, ____ methods will support open, close requests from userspace?

Options:

  1. open, close
  2. open, release
  3. init, exit
  4. None of the above

Answer

04. modinfo command can be used for _____ ?

Options:

  1. meta information of the module like kernel version from which it is built
  2. load a dynamic module
  3. list all loaded dynamic modules
  4. None of the above

Answer

05. The following entry is used for building ___

obj-y += sample.o

Options:

  1. static module
  2. dynamic module
  3. both of the above
  4. none of the above

Answer

06. ____ modifiers are specified for init, exit routines of the kernel module to specify that these functions are exclusively for module initialization and cleanup only.

Options:

  1. _ _ init, _ _ cleanup
  2. _ _ entry, _ _ exit
  3. _ _ init, _ _ exit
  4. None of the above

Answer

07. Which is correct about modprobe command?

Options:

  1. load dynamic modules, but can’t resolve dependencies
  2. load dynamic modules and resolve dependencies
  3. load static modules
  4. none of the above

Answer

08. In Linux ____ file represents symbol table of kernel space?

Options:

  1. cat /proc/symbols
  2. cat /proc/ksymtable
  3. cat /proc/kallsyms
  4. none of the above

Answer

09. ____ command is used to check the kernel version?

Options:

  1. uname -r
  2. free -m
  3. df -kh
  4. None of the above

Answer

10. In character driver _____ API is used to create device file automatically when the module is loaded?

Options:

  1. file_create
  2. mode_create
  3. device_create
  4. None of the above

Answer

11. ____ API is used to print messages in kernel space that are stored in kernel log?

Options:

  1. sprintf
  2. printk
  3. printf
  4. None of the above

Answer

12. Linux kernel is of ______ architecture?

Options:

  1. Monolithic
  2. Micro
  3. Modular
  4. None of the above

Answer

13. In Linux kernel source ______ header provides list APIs?

Options:

  1. klist.h
  2. list.h
  3. linkedlist.h
  4. None of the above

Answer

14. ______ API is to check the remaining space available in kfifo?

Options:

  1. kfifo_avail
  2. kfifo_len
  3. kfifo_free
  4. None of the above

Answer

15. Dynamic modules are stored in ______ location and with extension ____?

Options:

  1. /usr/local, ko
  2. /lib/modules, .dtb
  3. /lib/modules, .ko
  4. None of the above

Answer

16. The toolchain which you use to compile your application for embedded Linux is native toolchain?

Options:

  1. True
  2. False

Answer

17. The mode bit is used by the OS to differentiate the program execution in the following layer?

Options:

  1. Kernel and BSP Space
  2. Kernel and user space
  3. Kernel and CPU space
  4. Kernel space and Hardware

Answer

18. Linux comes under GPL

Options:

  1. True
  2. False

Answer

19. If you are looking for the vendor-specific Linux configuration file PowerPC, which directory would be looking for?

Options:

  1. arch/arm/configs
  2. arch/configs
  3. arc/powerpc/configs
  4. arc/

Answer

20. I am trying to run qemu, is the following command correct sudo qemu system arm machine?

Options:

  1. YES
  2. NO

Answer

21. Assume that we have the following configuration -2 partitions on the SD card. What is wrong with the following bootargs

Setev bootargs ‘ console=ttyAMAO root=/dev/mmcblk0p2 rootfstype=ext2 rw’

Options:

  1. Nothing,everything is fine
  2. The root node is not correct
  3. The console is not correct
  4. None of the above

Answer

22. Is the below command OK?

Qemu-system-arm-M vexpress-a9-serial stdio-kernel u-boot-sd rootfs ext-nographic

Options:

  1. Yes it’s perfectly fine, it should run u-boot
  2. No the kernel image is not provided, so it will crash
  3. No the rootfs image has ext format, so this shoudn’t
  4. Looks like some other issue which is not mentioned here

Answer

23. In the Linux file system dynamic modules are stored in ____ location?

Options:

  1. /boot
  2. /dev
  3. /lib/modules
  4. /usr/lib

Answer

24. Identify the SoC behind BeagleBoneBlack?

Options:

  1. BCM2711
  2. APQ8016e
  3. AM35x
  4. Imx-8m

Answer

25. Identify ARM architecture with Linux support?

Options:

  1. Cortex-M3
  2. Cortex-M4F
  3. Cortex-A8
  4. None of the above

Answer

This was about “Kernel Programming & Device Driver Quiz Questions“. I hope this article may help you all a lot. Thank you for reading.

Also, read:

Author Profile

CS Electrical And ElectronicsChetu
Interest's ~ Engineering | Entrepreneurship | Politics | History | Travelling | Content Writing | Technology | Cooking
Share Now

CS Electrical And Electronics

Interest's ~ Engineering | Entrepreneurship | Politics | History | Travelling | Content Writing | Technology | Cooking