Sunteți pe pagina 1din 22

website for mcq practice

http://www.mcqtutorial.com/MCQ/Linux/File%20and%20Folder/115_161_21.php

Q1. Deadlocks can be avoided by


A) Acquire all resources before proceeding
B) Acquire resources in same order
C) Release resources in Reverse Order
D) All of the above.
Q2. To increase the response time and throughput, the kernel minimizes the
frequency of disk
access by keeping a pool of internal data buffer called
a) Pooling
b) Spooling
c) Buffer cache
d) Swapping
Q3. Which of the following enables multi-tasking in UNIX?
a) Time Sharing
b) Multi programming
c) Multi user
d) Modularity
Q4. Which of the following is considered as the super daemon in Unix?
a) sysinit
b) init
c) inetd
d) proc
Q5. On a uniprocessor system, only one process is running at a time, and it may
run......
a. User mode.
b. Kernel mode.
c. Either in kernel mode or user mode.
d. Kernel mode and user mode.
Q6. Which command is used to display disk consumption of a specific directory
a) du
b) ds
c) dd
d) dds
Q7. Which of the following time stamps need not exist for a file on traditional
unix file system
a) Access Time
b) Modification Time
c) Creation Time
d) Change Time
Q8. When mv f1 f2 is executed which file’s inode is freed?
a) f1
b) f2
c) new inode will be used
d) implementation dependent

Q9. There are two hard links to the “file1″ say hl and h2 and a softlink sl. What
happens if we
deleted the “file1″?
a) We will still be able to access the file with hl and h2 but not with sl
b) We will not be able to access the file with hl and h2 but with sl
c) We will be able to access the file with any of hl, h2 and sl
d) We will not be able to access the file with any of hl, h2 and sl
Q10. Which of the following statement is true?
a) The cp command will preserve the meta data of the file
b) The sort command by default sorts in the numeric order
c) The mv command will preserve the meta data of the file
d) The command ps will display the filesystem usage
Q11. What UNIX command is used to update the modification time of a file?
a) time
b) modify
c) cat
d) touch
Q12. Which daemon manages the physical memory by moving process from physical
memory
to swap space when more physical memory is needed.
a) Sched daemon
b) Swap daemon
c) Init daemon
d) Process daemon
Q13. A user issues the following command sequence:
$ a.out &
$ bash
$ a.out &
If the user kills the bash process, then which of the following is true?
a) The second a.out process is also terminated
b) The second a.out process becomes a defunct process
c) The first a.out process becomes a zombie process
d) init process becomes parent of second a.out process
Q14. Which variable contains current shell process id
a) $*
b) $?
c) $$
d) $!
Q15. What is the default maximum number of processes that can exist in Linux for 32
bit system?
a) 32768
b) 1024
c) 4096
d) unlimited
Q16. How many times printf() will be executed in the below mentioned program?
main() {

int i;
for (i = 0; i < 4; i++)
fork();

printf(“my pid = %d\n”, getpid());


}
a) 4
b) 8
c) 16
d) 32
Q17. What is output of the following program?

int main() {
fork();
fork();
fork();
if (wait(0) == -1)
printf(“leaf child\n”);
}
a) “leaf child” will be printed 1 times
b) “leaf child” will be printed 3 times
c) “leaf child” will be printed 4 times
d) “leaf child” will be printed 8 times
Q18. One process requires M resource to complete a job. What should be the minimum
number of
resources available for N processes so that at least one process can continue to
execute
without blocking/waiting?
a) M * N
b) M * N – 1
c) M * N + 1
d) M

Q19. The kill system call is used to


a) Send shutdown messages to all by super user.
b) Send a signal to a process
c) Kill processes
d) Stop the processes

Q20. Poor response time is usually caused by


a)Process busy
b)High I/O rates
c)High paging rates
d) Any of the above

Q21 The loglevel strings in printk are defined in the header file

a) <linux/module.h> b) <linux/init.h> c)<linux/kernel.h>


d)<linux/fs.h>
Q22. Device that can be accessed as a stream of bytes
a)character device b)block device c)network interfaces d)none of the above
Q23. lsmod works by reading the file
a)/proc/devices b) /proc/modules c)/proc/device d)/proc/modinfo
Q24. The condition when a module fails to remove
a) kernel believes that the module is still in use.
b) the kernel has been configured to disallow module removal
c) module cannot be removed when it has dependencies.
d) All of the above
Q25. These kind of devices are not mapped to a node in filesystem
a) Serial Port b) Network c) Audio d) USB
Q26. mknod is used for creating
character device file b) block device file c) FIFO d) all of the above
Q27. Blocking read is
a)reads data continuously b)reads data when arrives
c) blocking read operation on continuous data d) none of these
Q28. Which mechanism is not used for delayed code execution
a) timers b)ioctl c) workqueues d) tasklets

Q29. register_chrdev() does not require the argument


a) device type
b)major number
c) device name
d) device operations
Q30. Choose the incorrect statement

a) ioctl is a common interface used for device control.


b) The implementation of ioctl is mostly done using a switch statement based on the
command number
c)The macro _IOR(type,nr,datatype) can be used to setup a ioctl command number with
no arguments
d)The ioctl function has the format long ioctl(struct file *flip, unsigned int cmd,
unsigned
long arg
Q31. The driver write method implements the function
a) copy_to_user b )copy_from_user c)put_to_user d) get_to_user
Q32. Which of the following rule is false while implementing sleep
a) never sleep when you are running in an atomic context
b) there must be an event to wake up the sleeping process.
c) It is legal to sleep while holding a semaphore.
d) sleep can be done, if interrupts disabled.
Q33. Choose the most appropriate answer.
How will you identify a character device after long listing /dev directory
a)from the major number
b)from the minor number
c) by the first column of the output of longlisting.
d)by the name of the device
Q34. All the details about the module like author, version etc can be viewed by
using
utility
a)lsmod b)modprobe c)dmesg d)modinfo
Q35. Which file keeps the inserted driver module name with major number
a)/sys/device b) /sys/modules/ c) proc/devices d) /proc/modules

Module Name: Embedded Systems Programming

1. For a device driver to access the I/O memory address it must be mapped to
virtual address.
This can be done by using the function
A. ioremap();
B. io_map();
C. request_mem_region();
D. both (A) and (B)

2. The major number


A. used by kernel to determine which device is being referred to
B. can be used as an index into a local array of devices
C. identifies the driver associated with the device
D. all of the above

3. Device that can be accessed as a stream of bytes


A. character devices
B. block devices
C. network devices
D. none of these
CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING
Common Course End Exam (CCEE) – August 2013

Paper Code
E5
4. mknod is used for creating
A. character device file
B. block device file
C. FIFO
D. all of the above

5. Which mechanism is not used for delayed code execution?


A. timers
B. ioctl
C. workqueues
D. tasklets

6. In a kernel Makefile, the tag ’obj-m’ compiles the source code as


A. a dynamically loaded module
B. a system call
C. a statically built in module
D. the kernel core component

7. To which directory printk message goes?


A. /proc/messages
B. /var/log/messages
C. /proc/kall
D. /var/log/message

CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING


Common Course End Exam (CCEE) – August 2013

Paper Code
E5

8. Using which utility in Linux, will load the kernel module


A. insmod
B. rmmod
C. dmesg
D. load

9. Which of the following macros is used to pass an array as a parameter to the


kernel module?
A. module_param_array (name, type, num, perm);
B. module_param(name, type, num, perm);
C. module_param_char[size](name, type, perm);
D. module_param[size](name, type, num, perm);

10. Which of the following is true for the 'dev_t' data type?
A. it is used to hold the driver name
B. it is used to hold the major-minor number
C. it holds the major-minor numbers and the driver name
D. none of the above

11. All I/O memory allocations are listed in


A. /proc/iomem
B. /proc/ioports
C. /proc/meminfo
D. /proc/mem
CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING
Common Course End Exam (CCEE) – August 2013

Paper Code
E5

12. Debugging kernel code can be done by


A. monitoring
B. printk message
C. gdb
D. all of the above

13. Module stacking means


A. a module will be using symbols exported by other module
B. a module loaded at run time
C. modules to which parameters are passed at insertion time
D. none of the above

14. The field in the file operation structure which is not an operation at all

A. ssize_t read();
B. loff_t *llseek();
C. struct module *owner;
D. int *ioctl();

CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING


Common Course End Exam (CCEE) – August 2013

Paper Code
E5
15. The function which is used to allocate and initialize a character device
A. int register_chrdev_region();
B. void chdev_init();
C. int register_chrdev_region();
D. int register_chrdev();

16. What is the preferred mechanism to dynamically find out the IRQ number of a
device?
A. probing
B. seeking
C. polling
D. masking

17. Which of the following should be avoided in the interrupt handlers?


A. calling wait_event/allocating memory
B. calling schedule
C. locking a semaphore
D. all of the above

18. Find the odd function out with reference to short delays inside the kernel
A. ndelay();
B. udelay();
C. mdelay();
D. pdelay();

CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING


Common Course End Exam (CCEE) – August 2013
Paper Code
E5

19. A character device driver is written to access the serial port of the PC. The
driver requests a
device number from the kernel by calling the function 'alloc_chrdev_region'. The
kernel
allocates the Major-Minor number combination of 253,0.
Using which utility can a user space application create a device node to access the
driver?
Can two device nodes be created bearing the same major-minor number combination?

A. mknod, TRUE
B. mknod, FALSE
C. mkdev, TRUE
D. mkdev, FALSE

20. What will happen if the return a negative value from the module initialization
function
(init_module)?

A. kernel crashes
B. error during compilation of the module
C. error while inserting the module
D. no problems will arise

CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING


Common Course End Exam (CCEE) – August 2013

Paper Code
E5
21. If a function or variable defined in one driver is to be shared with other
drivers, which of the
following functions should be called?
A. module_param
B. EXPORT_SYMBOL()
C. module_param_novers
D. module_param_novers

22. If you export any symbol from your driver, if you want to see the exported
symbols, which
file you need to refer ...................
A. /proc/symbols
B. /proc/ksyms
C. /proc/kcallsyms
D. none of the above

23. In a module if its license is not explicitly specified its default license
would be
A. GPL
B. GPLV2
C. Dual BSD/GPL
D. Proprietary

24. The devices that can host a filesystem


A. character device
B. block devices
C. network interfaces
D. none of the above
CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING
Common Course End Exam (CCEE) – August 2013

Paper Code
E5

25. The function which is used to access the i/o memory


A. outb
B. insb
C. insb
D. ioread8

26. For allocating big chunk of memory we use


A. malloc
B. lmalloc
C. get_free_page
D. none of these

27. Modules run in


A. user space
B. kernel space
C. anywhere
D. all of the above

28. SMP stands for


A. simple machine process
B. symmetric multiprocessor system
C. symmetric module system
D. none of the above

CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING


Common Course End Exam (CCEE) – August 2013

Paper Code
E5

29. ..........................structure used by the kernel internally to represent


files
A. mknode
B. inode
C. structdev
D. all of these

30. The function ............is used to copy a kernel data segment to user data
segment
A. get_user
B. put_user
C. write_to_user
D. copy

31. What is kernel module?


A. each piece of code that can be added to the kernel at run time
B. file used to talk to hardware
C. main kernel image that is built as a static image
D. none of these

CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING


Common Course End Exam (CCEE) – August 2013
Paper Code
E5
32. I/O Mapped Memory means
A. the I/O devices are mapped in the same Address Space thereby preventing memory
access to those regions
B. the same address may be used for both I/O as well as Memory
C. only one instruction is required to talk to the hardware
D. none of these

33. Barriers in device drivers are used to


A. tell the compiler to maintain order before and after the barrier
B. tell the compiler to maintain order only after the barrier
C. tell the compiler to ignore code around the barrier
D. tell the compiler to compiler with greatest optimzation

34. Which of the following functions is used for I/O port allocation?

A. request_region();
B. check_region();
C. register_io_region();
D. alloc_io_region();

CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING


Common Course End Exam (CCEE) – August 2013

Paper Code
E5
35. Find the odd option out with reference to f_flags in the file structure

A. O_RDONLY
B. O_NONBLOCK
C. O_SYNC
D. FMODE_READ

36. There is a driver which executes in the kernel. The driver implements the open,
read, write
and close functions apart from module initialization and cleanup. In the user
space, there are
number of read and write applications working on the driver. Every write should be
signaled
by the read. In such scenarios, where should the function 'init_completion' be
called?

A. in the init_module of the driver


B. in the open function implemented by the driver
C. does not have to be called. The kernel takes care of it
D. in the read function of the driver

37. In which method of a character driver should the functions 'cdev_init' and
'cdev_add' be
called? Choose the most appropriate answer?

A. module init function and module open function respectively


B. both in module init function
C. both in open function
D. none of the above

CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING


Common Course End Exam (CCEE) – August 2013

Paper Code
E5
38. The loglevel strings in printk are defined in the header file

A. <linux/module.h>
B. <linux/init.h>
C. <linux/kernel.h>
D. <linux/fs.h>

39. Block size in block devices is of

A. 1MB
B. 512 bytes
C. 256 bytes
D. 8 bits

40. PCI peripheral are defined by

A. bus number
B. device number
C. function number
D. all

1. How to add GPL license to the module?


a)MODULE_LICENSE_GPL()
b)MODULE_LICENSE(“GPL”)
c)MODULE_LICENSE(“BSD”)
d)None of the above
2. The Function “request_region” is used to
()a Delete memory regions from the kernel
()b Create new memory regions in the kernel
()c Freezes the requested region so that it is unacceptable
()d Allocates the I/O region to the driver
3. I/O Mapped Memory means
a) The I/O devices are mapped in the same Address Space thereby preventing
memory access to those regions
b) The same address may be used for both I/O as well as Memory
c) Only one instruction is required to talk to the hardware
d) None of the above
4. Memory Mapped I/O get the registers address region at________
a)Fixed Address region for all time
b)Driver programmer can give his own address space
c)At boot time
d)None of the above
5. To debug the ports memory region through the proc file system, which file is
concatenated
()a interrupts
()b devices
()c ioports
()d meminfo
6. inb_p is used to
()a get a byte of data from specific port
()b get a word of data from specific port
()c get a byte of data from specific port with pausing
()d get a word of data from a specific port with pausing
7. You are working with Embedded Linux based hardware and you need to
troubleshoot a network card problem. You want to know which IRQ channel the card
is using. Which file would tell you the IRQ channel for the card?
a) /proc/interrupts b) /proc/ioports c) /proc/irqs d) /proc/interrupt
8. Using which utility in linux, will load the kernel module
a) insmod b) rmmod c) dmesg d) load
9. Barriers in Device Drivers are used to
)a Tell the compiler to maintain order before and after the barrier
)b Tell the compiler to maintain order only after the barrier

)c Tell the compiler to ignore code around the barrier


)d Tell the compiler to compile with greatest optimization

10. Which of the following macros is used to pass an array as a parameter to the
kernel
module?
()a module_param_array (name, type, num, perm);
()b module_param(name, type, num, perm);
()c module_param_char[size](name, type, perm);
()d module_param[size](name, type, num, perm);
11. Which of the following is true for the &#39;dev_t&#39; data type?
()a It is used to hold the driver name
()b It is used to hold the Major-Minor number
()c It holds the Major-Minor numbers and the driver name
()d None of the above

12. Which of the following functions should preferably be called when passing
single
value data from the user space to the kernel space in the IOCTL method
implementation?
()a copy_from_user
()b copy_to_user
()c put_user
()d get_user
13. An OOPS message is generated
()a When a null pointer is dereferenced in the driver
()b When an invalid pointer is dereferenced and the processor signals page
faults
()c Both (a) and (b)
()d None of the above
14. Read and Write user address verification can be implemented by which of the
following functions?
()a put_user
()b get_user
()c access_ok
()d capable
15. Which of the following delayed execution methods allows sleeping inside the
scheduled task?
()a Work queues
()b Kernel timers
()c Tasklets
()d Both (a) &amp; (b)
16. The significance of __put_user() in GNU/Linux device driver is ______________.
a)facilitating slower data transfer to user space as compared to __copy_to_user()
b)facilitating slower data transfer to user space as compared to copy_to_user()
c)facilitating slower data transfer to user space as compared to put_user()
d)facilitating transfer of single values to user space without type checking

17. Which of the following functions is used for I/O port allocation?
(a) request_region();
(b) check_region();
(c) register_io_region();
(d) alloc_io_region();
18. Function used for the device number allocation request_chrdev_region(dev_t
devno
, int count , char *name) , in that function what is the significance of the char
*name
argument?
a)Gets entry into /proc/devices
b)Gets entry into /proc/kallsysms
c)Gets entry into /proc/modules
d)None of the above
19. What is the preferred mechanism to dynamically find out the IRQ number of a
device?
(a) Probing
(b) Seeking
(c) Polling
(d) Masking
20. In a kernel Makefile, the tag &#39;obj-m&#39; compiles the source code as
(a) A dynamically loadable module
(b) A systems call
(c) A statically built in module
(d) The kernel core component
21. Find the odd option out with reference to f_flags in the file structure
a)O_RDONLY
b)O_NONBLOCK
c)O_SYNC
d)FMODE_READ
22. Which of the following should be avoided in the interrupt handlers
(a) calling wait_event/allocating memory
(b) calling schedule
(c) locking a semaphore
(d) all of the above
23. Find the odd function out with reference to short delays inside the kernel
(a) ndelay();
(b) udelay();
(c) mdelay();
(d) pdelay();

24. When the flag IRQF_SHIRQ is passed to the request_irq function it is mandatory
to
also pass
(a) Device Name
(b) Handler
(c) Handler Argument

(d) DeviceID
25. IRQ Line Probing is applicable to
(a) Sharable interrupts
(b) Non Sharable Interrupts
(c) Both
(d) None
26. Work Queues always runs in
(a) Process Context
(b) Interrupt Context
(c) a&amp;b
(d) None of the above
Two Marks Questions:

(2 marks)

27. Match the following


(A) insmod (1) load required modules into the kernel, sorting

dependencies

(B) rmmod (2) Remove a module from the kernel


(C) lsmod (3) Display information printed by the module
(D) modprobe (4) Load a module into the kernel
(E) dmesg (5) Display the list of currently loaded modules
(a) (A-4), (B-2), (C-3), (D-1), (E-5)
(b) (A-4), (B-2), (C-5), (D-1), (E-3)
(c) (A-3), (B-5), (C-4), (D-2), (E-1)
(d) (A-1), (B-2), (C-3), (D-4), (E-5)

(2 marks)

28. Mechanism CRITERIA


1) Spin Lock w)Long lock hold time
2)Read Copy Update x)Small lock hold time
3)Semaphore y)Cannot be used to protect data
structures involving pointers
4)Seq locks z)Can be used to protect data structures

involving pointers

(a) 1-x 2-z 3-w 4-y


(b) 1-x 2-y 3-w 4-z
(c) 1-w 2- z 3-x 4-y
(d) 1-w 2- y 3-x 4-z

( 2 marks)
29. A character device driver is written to access the serial port of the PC. The
driver
requests a device number from the kernel by calling the function

&#39;alloc_chrdev_region&#39;. The kernel allocates the Major-Minor number


combination
of 253,0.
 Using which utility can a user space application create a device node to access
the driver?
 Can two device nodes be created bearing the same major-minor number
combination?
(a) mknod, TRUE
(b) mknod, FALSE
(c) mkdev, TRUE
(d) mkdev, FALSE

(2 marks)
30. The serial port has to be configured to set the Baud rate as 9600 baud.
Assuming
that the ordinal number is 1 and the letter &#39;k&#39; is not used in the file
ioctl-number.txt,
compute the definition for the magic number used as part of the ioctl method
implementation
(a) _IOW(&#39;k&#39;, 1, int)
(b) _IOR(&#39;k&#39;, 1, int)
(c) _IO(&#39;k&#39;, 1, int)
(d) _IO(&#39;k&#39;, &#39;1&#39;, char)

( 2 marks)

31. Explain what will happen if the return a negative value from the module
initialization
function (init_module) ?
(a) Kernel crashes
(b) Error during compilation of the module
(c) Error while inserting the module
(d) No problems will arise

( 2 marks)
32. There is a driver which executes in the kernel. The driver implements the open,
read, write and close functions apart from module initialization and cleanup. In
the
user space, there are number of read and write applications working on the driver.
Every write should be signalled by the read. In such scenarios, where should the
function &#39;init_completion&#39; be called?
(a) In the init_module of the driver
(b) In the open function implemented by the driver
(c) Does not have to be called. The kernel takes care of it
(d) In the read function of the driver

( 2 marks)
33. In which method of a character driver should the functions &#39;cdev_init&#39;
and
&#39;cdev_add&#39; be called? Choose the most appropriate answer
(a) Module init function and module open function respectively
(b) Both in module init function
(c) Both in open function
(d) None of the above

1.You are working with Embedded Linux based hardware and you need to troubleshoot a
network card problem.You want to know which IRQ channel the card is using. Which
file would
tell you the IRQ channel for the card?
A) /proc/interrupts
B) /proc/ioports
C) /proc/irqs
D) /proc/interrupt
2.Using which utility in linux, will load the kernel module
A) insmod
B) rmmod
C) dmesg
D) load
3. Read and Write user address verification can be implemented by which of the
following
functions?
A) access
B) put_user
C) get_user
D) capable
4. Find the odd function out with reference to short delays inside the kernel
A) ndelay();
B) udelay();
C) mdelay();
D) pdelay();
5. When the flag IRQF_SHIRQ is passed to the request_irq function it is mandatory
to also pass
A) DeviceName
B) Handler
C) HandlerArgument
D) DeviceID

Q. No.1
Question:
An interrupt handler can be registered by using the function
a)request _irq
b) request_region
c) request_mem_region
d) request_irq_region

Q. No.2.
Question:
“kernel is tainted” message will be produced when the module is inserted without
a)MODULE_AUTHOR
b) MODULE_LICENSE
c) MODULE_VERSION
d) MODULE_DESCRIPTION

Q. No.3.
Question:

CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING

Advanced Computing Training School

PG-coursename0813 Course End ExaminationPage 2


All the details about the module like author, version etc can be viewed by using
utility
a)lsmod
b) modprobe
c) dmesg
d)modinfo
Q. No.4
Question:
What is kernel module?
a)Each piece of code that can be added to the kernel at run time.
b)File used to talk to hardware
c) Main kernel image that is built as a static image.
d) none of these.

Q. No.5
Question:
mknod is
used for creating
a)Character device file
b) block device file
c) FIFO

d) all of the above.

CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING

Advanced Computing Training School

PG-coursename0813 Course End ExaminationPage 3


Q. No.6
Question:
Which of the following delayed execution methods allows sleeping inside the
scheduled
task?
a) kernel timers
b) work queues
c) tasklets
d) both (a) &amp; (b)
Q. No.7
Question:
What command is used to remove the directory?
a) rdir
b) remove
c) rd
d) rmdir
e) none of the above
Q. No.8
Question:
IRQ Line Probing is applicable to
a) sharable interrupt
b) non-sharable interrupt
c) both
d) none of the above

Q. No.9
Question:
GPL stands for

CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING

Advanced Computing Training School

PG-coursename0813 Course End ExaminationPage 4


a) general public license
b) general part of linux
c) group of linux
d) none of the above

Q. No.10
Question:
inb_p is used for
a) get a byte of data from specific port with pausing
b) get a word of data from specific port
c) get a bit of data from specific port
d) get a word of data from a specific port with pausing

Q. No.11
Question:
SCHAR_MAJOR is defined in
a) schar.h
b) module.h
c) stdio.h
d) kernel.h

Q. No.12
Question:

CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING

Advanced Computing Training School

PG-coursename0813 Course End ExaminationPage 5


Header file contains the declaration of the module_init and module_exit macros .
a) stdio.h
b) linux/init.h
c) kernel/init.h
d) none of the above

Q. No.13
Question:
Which represents the user home directory
a) /
b) .
c) ..
d) ~
Q. No.14 When using shared interrupts, if our driver handler is invoked but the
hardware device has not generated the interrupt , what should the handler return
a)IRQ_HANDLED
b) IRQ_RESET
c) IRQ_NONE
d) IRQ_CONTINUE

Q. No.15
Question:
EXPORT_SYMBOL is used for

CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING

Advanced Computing Training School

PG-coursename0813 Course End ExaminationPage 6


a)export symbols to other modules
b) export symbols and hide it from other
modules
c) get symbols from other modules
d) none of these
.

Q. No.16.
Question:
SMP stands for
a) simple machine process
b) symmetric multiprocessor system
c) symmetic module system
d) none of the above

Q. No.17.
Question:
________ structure used by the kernel internally to represent files
a) mknode
b) inode
c) structdev
d) all

CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING

Advanced Computing Training School

PG-coursename0813 Course End ExaminationPage 7


Q. No. 18.
Question:
udelay stand for
a) user defined delay
b) microsecond delay
c) millisecond delay
d) none of these

Q. No.19.
Question:

USB is
a) character device
b) block device
c) network device
d) all

Q. No. 20.
Question:
Each process has unique

CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING

Advanced Computing Training School

PG-coursename0813 Course End ExaminationPage 8


a) fd table
b) file table
c) inode table
d) data block table

Q. No.21.
Question:
What are the different bottom-half mechanisms in Linux?
a) softirq
b) tasklet
c) workqueues
d) all of the above

Q. No.22.
Question:
If you export any symbol from your driver, if you want to see the exported
symbols,which file you need to refer________
a) /proc/ksyms
b) /proc/symbols
c) /proc/kcallsyms
d) none of the above
Q. No.23
Question:
What command is used to remove files?
a) dm
b) rm
c) delete

d) erase
e) none of the above

CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING

Advanced Computing Training School

PG-coursename0813 Course End ExaminationPage 9


Q. No.24
Question:
To debug the ports memory region through the proc file ststem ,which file is
concatenated
a) interrupts
b) devices
c) ioports
d) memoinfo

Q. No. 25
Question:
Read and write user address verification can be implemented by which of the
following functions?

a) get_user
b) capable
c) own_user
d) access_ok

Q. No.26.
Question:
Application that use non-blocking I/O uses

CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING

Advanced Computing Training School

PG-coursename0813 Course End ExaminationPage 10


a) poll
b) select
c) epoll
d) all
e) none

Q. No.27.
Question:
Full form of SCULL
a) simple character utility for loading localities
b) simple character utility for localities loading
c) simple character utility for link loading
d) none

Q. No.28.
Question:
Header &lt;linux/fs.h&gt; is
a) collection of file pointer
b) collection of function pointer
c) objects of function
d) its not a header file

CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING

Advanced Computing Training School

PG-coursename0813 Course End ExaminationPage 11


Q. No.29.
Question:
PCI peripheral are defined by
a) bus number
b) device number
c) function number
d) all

Q. No.30.
Question:
In Linux device driver which keyword used to allocate memory

a) malloc
b) dmalloc
c) lmalloc
e) kmalloc

Q. No.31.
Question:
For allocating big chunk of memory we use
a) mallocb) lmalloc

CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING

Advanced Computing Training School

PG-coursename0813 Course End ExaminationPage 12


c) get_free_page
d) none

Q. No.32.
Question:
Inb &amp; outb are used to read and write
a) 8bytes
b) 1 bit
c) a block
d) 8 bits

Q. No.33.
Question:
Block size in Block devices is of
a) 1MB
b) 512 bytes
c)256 bytes
d) 8 bits

Q. No.34.
Question:

CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING

Advanced Computing Training School

PG-coursename0813 Course End ExaminationPage 13


KERN_ALERT are used to
a) call header file of kernel
b) priority of message
c) both (a) &amp;(b)
d)none

Q. No.35.
Question:
Modules run in
a) user space
b) kernel space
c) anywhere
d) all of these

Q. No.36
Question:
To which directory printk messages goes?
A.
B. /proc/messages
C. /var/log/messages
D. /proc/kall
E. /var/log/message

CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING

Advanced Computing Training School

PG-coursename0813 Course End ExaminationPage 14


Q. No.37 .
Question:
Using which utility in Linux, will load the kernel module.
A.
B. insmod
C. rmmod
D. dmesg
E. load

Q. No.38
Question:
If a function or variable defined in one driver is to be shared with other driver.
Which of
the following functions should be used?
A.
B. module_param
C. EXPORT_SYMBOL()
D. module_param_noversion
E. module_param_version

Q. No.39 .
Question:
In a module if its license is not explicitly specified its default license would be
A.
B. GPL
C. GPLV2
D. Dual BSD/GPL
E. Proprietary

CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING

Advanced Computing Training School

PG-coursename0813 Course End ExaminationPage 15


Q. No.40
Question:
The device that can host the filesystem.
A.
B. character device
C. block devices
D. network interfaces
E. none of the above

S-ar putea să vă placă și