The following Kernel Programming - Solaris MCQs have been compiled by our experts through research, in order to test your knowledge of the subject of Kernel Programming - Solaris. We encourage you to answer these 90+ multiple-choice questions to assess your proficiency.
Please continue by scrolling down.
A. DNLC
B. Page Cache
C. Buffer Cache
D. Inode Cache
A. None
B. Two
C. It should be the same as the number of processors.
D. It should be a factor of the available RAM.
A. Initializing and deinitializing the mutex
B. Exclusively locking and unlocking the mutex
C. Reader writer locking semantics on the mutex
D. Try acquire mutex exclusive
A. VOP_FSYNC
B. VFS_SYNC
C. VOP_PUTPAGE
D. VOP_WRITE
A. It drops the reference count on a vnode.
B. It deletes all data associated with a vnode.
C. It drops the reference count on a vnode and if required it deletes all data associated with a vnode.
D. It increments the reference count on a vnode.
A. If set to 1, it indicates that a filesystem is mounted on that vnode.
B. It points to the root vnode of the filesystem to which the vnode belongs.
C. It points to the vfs structure of the mounted on filesystem.
D. It points to the root vnode of the mounted on filesystem.
A. ls
B. drvconf
C. prtconf
D. devlinks
A. biowait
B. cv_broadcast
C. biodone
D. cv_signal
A. True
B. False
A. VOP_WRITE and VOP_READ
B. VOP_GETPAGE and VOP_PUTPAGE
C. VOP_MAP and VOP_UNMAP
D. VOP_PAGEIO
A. cv_broadcast
B. cv_signal
C. cv_wakeall
D. cv_wakeone
A. Page Cache
B. DNLC
C. Buffer Cache
D. Vnode Cache
A. kernel stack.
B. user addresses.
C. kernel heap.
D. kernel code.
A. User context.
B. LWP context.
C. On a separate interrupt stack without any special context.
D. In a kernel thread context.
A. It turns on buffer redzone (write past end of buffer).
B. It turns on freed buffer checking.
C. It turns on allocator auditing.
D. It turns on uninitialized data checking.
E. All of the above
A. cc mymod.c
B. cc -o mymod.o mymod.c; ld -o mymod mymod.o
C. cc -D_KERNEL mymod.c
D. cc -D_KERNEL -o mymod.o; ld -r -o mymod mymod.o
A. It points to the mounted on directory's vnode structure.
B. It points to the root inode of the filesystem.
C. It points to the root directory of the parent filesystem.
D. It points to the vfs structure of the parent filesystem.
Which of the following calls fits in at 'statement xxx'
to produce correct results in the code snippet below?
mutex_enter(mutex pointer);
while (condition is false) {
cv_wait(cv pointer, mutex pointer);
}
statement xxx;
mutex_exit(mutex pointer);
A.
mutex_enter(mutex pointer)
B.
mutex_exit(mutex_pointer)
C.
nothing needs to be done.
D.
cv_signal(cv pointer)
What do the following mdb commands do?
::allocdby
::freedby
A.
They are used to print the log of transactions on a particular memory location.
B.
They are used to print the log of transactions by a particular thread.
C.
They are used to print the slab cache that refers to the particular address.
D.
They are used to print the arenas that refer to the particular address.
A. $b, :d
B. ::break, ::delete
C. $b, ::delete
D. display break, delete break
On a solaris system with no special kmem_flag settings,
what happens when a thread running buggy code frees a buffer twice.
A.
The results are unpredictable including a panic.
B.
The kernel fails the second kmem_free.
C.
The kernel kills the thread with a SEGFAULT.
D.
The second free is harmless as the kernel knows that the memory has already been freed.
A. struct file
B. struct vnode
C. struct inode
D. struct proc
A. struct buf
B. struct file
C. struct uio
D. struct sio
A. memcpy
B. bcopy
C. copyin;copyout
D. memmove
A. User process.
B. LWP.
C. Kernel thread.
D. Interrupt handler.
A. $
B. panic address?ia
C. $r
D. $C
A. True
B. False
A. ufs_read:b
B. ufs_read!break
C. ::break ufs_read
D. ufs_read>break
A. lock
B. ldstub
C. movsb
D. save
A. Yes
B. No
A. _init; _fini
B. open; close
C. attach; detach
D. probe
A. The kernel will detect this situation and will panic the system.
B. The system will hang.
C. The interrupt handler will block until it can run again.
D. None of the above.
A. User thread.
B. Kernel thread.
C. User Process.
D. LWP.
A. $r
B. $
C. $C
D. $
A. restore
B. pop
C. revert
D. ret
A. getmajor(dev_t)
B. getminor(dev_t)
C. open
D. ((dev_t) dev) & 0xFFFF0000;
A. True
B. False
A. printf
B. cmn_err
C. dmesg
D. log
A. It depends on the count associated with the semaphore.
B. 1
C. 2
D. 0
A. $sync
B. sync
C. dump
D. $dump
What does the following kernel interface do?
rw_lock_held(lock pointer);
A.
It checks if the lock is held in the read mode.
B.
It checks if the lock is held in the write mode.
C.
It does 'a' and locks it in the write mode.
D.
It does 'b' and locks it in the read mode.
A. It is double word aligned.
B. It is pageable.
C. It is zero initialized.
D. Its availability is limited to the amount of physical memory.
A. The address of the allocated memory.
B. The size of the allocated memory.
C. The alignment of the allocated memory.
D. The thread that allocated the memory.
A. VOP_LOOKUP
B. VOP_READDIR
C. VOP_GETPAGE
D. VOP_READ
A. Reader-writer locks.
B. Mutex
C. Semaphore
D. Spin lock
A. $
B. $C
C. $r
D. $b
A. Readers
B. Writers
C. Neither (there is FCFS granting of locks).
D. Both (there is one grant from either group).
A. Hidden scheduling.
B. Priority inheritance.
C. Priority inversion.
D. Interrupts.
A. Yes
B. No
A. Yes
B. No