Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages
Filter by Categories
nmims post
Objective Type Set
Online MCQ Assignment
Question Solution
Solved Question
Uncategorized

Linux MCQ Set 1

1. Relationship between components of device driver models are expressed in the sysfs as
a) a directory
b) a regular file
c) symbolic links between files and directories
d) none of the mentioned

View Answer

Answer: c [Reason:] None.

2. What is the main role of the regular files in the sysfs?
a) regular files represent the attributes of devices and drivers
b) regular files represent the kernel objects
c) regular files represent the kernel sets
d) none of the mentioned

View Answer

Answer: a [Reason:] None.

3. The core data structure of device driver model is
a) kobject
b) kfile
c) kmodule
d) none of the mentioned

View Answer

Answer: a [Reason:] None.

4. The kset contains
a) pointer to subsystem descriptor
b) pointer to the kobject type descriptor of the kset
c) head of the kobjects included in the kset
d) all of the mentioned

View Answer

Answer: d [Reason:] None.

5. Which one of the following is a read-write semaphore in linux that protects all ksets and kobjects included in the filesystem?
a) rwsem
b) rwsemaphore
c) rws
d) none of the mentioned

View Answer

Answer: a [Reason:] None.

6. Each device in the device driver model is represented by a _____ object.
a) driver
b) device
c) node
d) none of the mentioned

View Answer

Answer: b [Reason:] None.

7. Each driver in the device driver model is described by a ______ object.
a) dev_d
b) device_d
c) dev_driver
d) device_driver

View Answer

Answer: d [Reason:] None.

8. The channel between the processor and devices is called?
a) bus
b) driver
c) class
d) none of the mentioned

View Answer

Answer: a [Reason:] None.

9. In which directory every kernel module of the system is represented?
a) /sys/kernel
b) /sys/module
c) /sys/kernel/module
d) none of the mentioned

View Answer

Answer: c [Reason:] None.

10. In sysfs the device drivers of same _____ are expected to provide same functionalities to the user mode application.
a) class
b) kobjects
c) ksets
d) none of the mentioned

View Answer

Answer: a [Reason:] None.

Linux MCQ Set 2

1. Which one of the following is not true?
a) kobjects are included in a hierarchic organisation
b) kobjects can have a parent
c) kobjects can be included in a kset
d) none of the mentioned

View Answer

Answer: d [Reason:] None.

2. In sysfs.h which one of the following structure represents the directory entries?
a) struct sysfs_dirent
b) struct sysfs_dir
c) struct sysfs
d) none of the mentioned

View Answer

Answer: a [Reason:] None.

3. The name pointer of the attribute data structure represents the _____ in sysfs.
a) directory
b) file
c) symbolic link
d) none of the mentioned

View Answer

Answer: b [Reason:] None.

4. To read/write attribute, which one of the following method is required?
a) show
b) store
c) both show and store
d) none of the mentioned

View Answer

Answer: c [Reason:] None.

5. Which one of the following is not contained in the kobject data structure?
a) pointer to the kobject type descriptor
b) pointer to the containing kset
c) pointer to the parent kobject
d) none of the mentioned

View Answer

Answer: d [Reason:] None.

6. The kobjects can be organized in a hierarchical tree by means of
a) ksets
b) kref
c) ktype
d) none of the mentioned

View Answer

Answer: a [Reason:] None.

7. Which one of the following is a element of a kset data structure?
a) pointer to the subsystem descriptor
b) pointer to the kobject type descriptor of the kset
c) pointer to the subsystem descriptor & kobject type descriptor of the kset
d) none of the mentioned

View Answer

Answer: c [Reason:] None.

8. Which one of the following function is used to add the kobject to sysfs?
a) kobject_add()
b) kobject_register()
c) kobject_init()
d) all of the mentioned

View Answer

Answer: d [Reason:] None.

9. Which one of the following function is used to create a new attribute?
a) sysfs_create_file()
b) sysfs_attribute
c) both sysfs_create_file() and sysfs_attribute
d) none of the mentioned

View Answer

Answer: a [Reason:] None.

10. Sysfs attribute should export ____ value per file.
a) one
b) two
c) three
d) four

View Answer

Answer: a [Reason:] None.

Linux MCQ Set 3

1. What is makefile?
a) makefile describes to the make command that how to compile the program
b) makefile contains various statements related with the compilation of target
c) makefile contains various statements
d) none of the mentioned

View Answer

Answer: a [Reason:] None.

2. What is phony target in the makefile?
a) the target which is not a filename
b) the target which is a filename
c) the target which does not used for compilation
d) none of the mentioned

View Answer

Answer: a [Reason:] None.

3. As we type “make” command on the terminal
a) make reads the makefile in the current directory
b) make reads the makefile in the parent directory
c) make reads the makefile in the predefined environment variable
d) none of the mentioned

View Answer

Answer: a [Reason:] None.

4. The makefile starts executing from
a) first target
b) first target whose name starts with “.”
c) first target whose name does not starts with “.”
d) none of the mentioned

View Answer

Answer: c [Reason:] None.

5. The command “make aidlo” will
a) create the executable if aidlo.c file is present in the current directory
b) create the object file named as aidlo.o
c) give an error
d) none of the mentioned

View Answer

Answer: a [Reason:] None.

6. If our makefile is named as “aidlo”, then which one of the following command will compile the code with this makefile
a) make -a aidlo
b) make -f aidlo
c) make sanfoudry
d) make

View Answer

Answer: b [Reason:] None.

7. Which option of make command print the commands that would be executed, but do not execute them?
a) -m
b) -n
c) -o
c) -p

View Answer

Answer: b [Reason:] None.

8. If we want to get the exit status that specified targets are up to date or not, we have to execute the make command with option
a) -q
b) -r
c) -s
d) -t

View Answer

Answer: a [Reason:] None.

9. Which make command option ignores all errors in commands executed to remark files?
a) -i
b) -j
c) -k
d) -l

View Answer

Answer: a [Reason:] None.

10. If make command is executed as “make -j 2”, then
a) two jobs will run simultaneously
b) only two will be executed
c) it will give an error
d) none of the mentioned

View Answer

Answer: a [Reason:] None.

Linux MCQ Set 4

1. If we want to execute the makefile by just giving the “make” command, makefile should be named as
a) Makefile
b) makefile
c) MAKEFILE
d) None of the mentioned

View Answer

Answer: a [Reason:] None.

2. Running “make” command without the arguments starts the target ____ in the makefile.
a) “.phony”
b) “clean”
c) first
d) none of the mentioned

View Answer

Answer: c [Reason:] None.

3. In makefile the comment begins with the character
a) $
b) #
c) /*
d) none of the mentioned

View Answer

Answer: b [Reason:] None.

4. Which one of the following is used for the target filename in the makefile?
a)
b) $*
c) $?
d) none of the mentioned

View Answer

Answer: a [Reason:] None.

5. Which one of the following can be used to specify the directory to search the dependencies and target files?
a) VPATH
b) CPATH
c) FPATH
d) None of the mentioned

View Answer

Answer: a [Reason:] None.

6. In the makefile the target and dependencies are separated by the character
a) –
b) :
c) /
d) none of the mentioned

View Answer

Answer: b [Reason:] None.

7. Macros for the makefile can be defined in
a) makefile
b) command line
c) both makefile and command line
d) none of the mentioned

View Answer

Answer: c [Reason:] None.

8. Which one of the following is not a valid makefile directive?
a) if
b) elif
c) endif
d) none of the mentioned

View Answer

Answer: d [Reason:] None.

9. When a target of makefile fails to execute
a) make does not executes any other target dependent on it
b) it returns a status
c) make does not executes any other target dependent on it & it returns a status
d) none of the mentioned

View Answer

Answer: c [Reason:] None.

10. Which one of the following provides all dependencies in the makefile?
a) $^
b) $*
c) $:
d) none of the mentioned

View Answer

Answer: a [Reason:] None.

Linux MCQ Set 5

1. In linux shared libraries has the extension of
a) .so
b) .si
c) .sl
d) none of the mentioned

View Answer

Answer: a [Reason:] None.

2. When a program is linked with a shared library
a) only a small table is created in the executable
b) executable contains the whole content of respective .so file
c) executable contains nothing related with the shared libraries
d) none of the mentioned

View Answer

Answer: a [Reason:] None.

3. Shared libraries can be shared between
a) various running programs
b) only 2 running programs
c) only 8 running programs
d) none of the mentioned

View Answer

Answer: a [Reason:] None.

4. In linux, shared library is a
a) text file
b) binary file
c) device file
d) none of the mentioned

View Answer

Answer: b [Reason:] None.

5. In GCC compiler, “-shared” option is given to create the shared library with
a) source files
b) object files
c) executables
d) none of the mentioned

View Answer

Answer: b [Reason:] None.

6. Which option of GCC compiler provides the linking with shared libraries?
a) -lmylib
b) -lib
c) -mylib
d) none of the mentioned

View Answer

Answer: a [Reason:] None.

7. After using the shared library, memory can be done free by calling
a) dlclose
b) slclose
c) lclose
d) none of the mentioned

View Answer

Answer: a [Reason:] None.

8. Shared libraries are linked with the program
a) at the time of creation of executable
b) at the run time
c) at the time of creation of executable & run time
d) none of the mentioned

View Answer

Answer: b [Reason:] None.

9. For a shared library, version number is changed when
a) changes done in code make the shared library incompatible with the previous version
b) changes done in code does not make the shared library incompatible with the previous version
c) when minor number is changed
d) none of the mentioned

View Answer

Answer: a [Reason:] None.

10. Which command can be used to update the shared library system?
a) lconfig
b) ldconfig
c) slconfig
d) none of the mentioned

View Answer

Answer: b [Reason:] None.