Home
MCQS
Unix/Lunux MCQ Quiz Hub
Linux Mcqs Questions Set 13
Choose a topic to test your knowledge and improve your Unix/Lunux skills
1. What is a context switch?
Kernel switches from executing one process to another
Process switches from kernel mode to user mode
Process switches from user mode to kernel mode
None of the mentioned
2. Pid of init process
0
1
32767
none of the mentioned
3. What is the default maximum number of processes that can exist in Linux?
32768
1024
4096
unlimited
4. How do you get parent process identification number?
waitpid
getpid()
getppid()
parentid()
5. Parent process id of a deamon process is
2
3
4
1
6. The process which terminates before the parent process exits becomes
Zombie
Orphan
Child
None of the mentioned
7. Return value of fork() system call can be:
-1,<0, 0
-1,>0, 0
-1,<0
none of the mentioned
8. If the fork() system call returns -1, then it means?
No new child process is created
The child process is an orphan
The child process is in Zombie
none of the mentioned
9. Fork returns _____ to parent process on success
0
child process id
parent process id
none
10. On x86-32 Linux, at which address the code segment of the program starts?
0x00000000
0x08048000
0x80000000
0xbfff0000
11. On x86-32 Linux, at which address the user stack resides normally?
0x00000000
0x3fff0000
0x7fff0000
0xbfff0000
12. A system has 512MB of physical memory. Which among the following is not a suitable virtual memory size for this system architecture?
512MB
256M
4GB
None of the mentioned
13. LRU stands for
Last received Unit
Least recently Used
Least recently usable
Lost Recoverd unit
14. Mm_struct maintains?
memory files
open files
pipe
active memory regions
15. Which sytem call can be used by a user process to lock a memory so that it cannot be swapped out?
memory files()
memlock()
pipe()
active memory regions
16. Among these files which has an ELF format
shared objects
core
executables
all of the mentioned
17. What is the use of strace command?
strace can be used to check the system calls called by the program. So, this can be used for debugging and benchmarking purposes
strace cannot be used to check the system calls called by the program
all of the mentioned
none of the mentioned
18. If one of the thread in multithreaded process is blocked on an I/O, which of the following is true?
The entire process with block if their is no kernel supported threads
Other threads of the process will continue to execute even if there is no kernel supported threads
It depends on specific implementatation
All of the mentioned
19. Which one can be a real time schedule policy?
SCHED_FIFO
SCHED_SPF
SCHED_OTHER
SCHED_FILO
20. In Linux kernel-2.6 Real time priority ranges from
0 to 99
0 to 139
-20 to 19
100 to 139
21. Solaris real time class priority is
0-59
60-99
100-159
160-169
22. Solaris System class priority is
0-59
60-99
100-159
160-169
23. Each process has unique
fd table
file table
inode table
data block table
24. File descriptor table indexes which kernel structure?
struct file
strruct fs_struct
files_struct
struct inode
25. What is the default number of files open per user process?
0
1
2
3
26. The file system information is stored in
Boot block
Super Block
Inode Table
Data Block
27. Switch table is used by
device special file
directory file
fifo
link file
28. What is the use of fcntl function?
locking a file
reading the file descriptor flag
changing the file status flag
all of the mentioned
29. Which function can be used instead of the dup2 to duplicate the file descriptor?
read()
open()
stat()
fcntl()
30. printf() uses which system call
open
read
write
close
31. read() system call on success returns
0
-1
number of character
none
32. Which system call is used to create a hard link?
hardlink
link
symlink
ln
33. namei() is
ANSI C library function
C library function
System call
34. dup2(1,0)
closes the stdout and copies the stdin descriptor to stdout
closes the stdin and copies the stdout descriptor to stdin
will produce compilation error
None of the mentioned
35. If a signal is received by a process, when will it be processed?
It is processed immediately
It is processed when process is switching to kernel mode
It is processsed in the next timeslice given to the process
None of the mentioned
36. Which signal is generated when we press control-C?
SIGINT
SIGTERM
SIGKILL
SIGSEGV
37. Which signal is generated when we press ctrl-Z?
SIGKILL
SIGSTOP
SIGABRT
SIGINT
38. Which signal is sent when the Child process terminates?
SIGINIT
SIGKILL
SIGSTOP
SIGCHLD
39. Which of the following signal cannot be handled or ignored?
SIGINT
SIGCHLD
SIGKILL
SIGALRM
40. Another signal that cannot be caught is:
SIGPIPE
SIGHUP
SIGSTOP
SIGUSR1
41. When real interval timer expires which signal is generated?
SIGINT
SIGCHLD
SIGKILL
SIGALRM
42. Signals are handled using which system call?
kill
signal
both
none
43. Default action of SIGSEGV is
Terminate
Core dump + Terminate
Stop
Cont
44. The kill system call is used to
Send shutdown messages to all by superuser
Send a signal to a process
Kill processes
Stop the processes
45. Which is true regarding pipes?
half duplex
full duplex
message boundaries are preserved
unordered data
46. The persistancy of a FIFO is
process
kernel
file system
none of the mentioned
47. Advantage of FIFO over pipe is
related processes can communicate
unrelated processes can communicate
all of the mentioned
none of the mentioned
48. What mkfifo() creats?
pipe
unnamed pipe
named pipe
msg queue
49. System V IPC common attributes are
key
id
owner
all of the mentioned
50. Which one of the following is not system V IPC ?
Shared Memory
Semaphores
FIFO
Message Queues
Submit