Operating System Questions and Answers Part-1

1. Which one of the following is not a real time operating system?
a) VxWorks
b) QNX
c) Palm OS
d) RTLinux

Answer: c
Explanation: VxWorks, QNX & RTLinux are real-time operating systems. Palm OS is a mobile operating system.

2. Which one of the following error will be handle by the operating system?
a) lack of paper in printer
b) power failure
c) connection failure in the network
d) all of the above

Answer: d
Explanation: All the above errors are handled by OS. The OS is continuously monitoring all of its resources. Also, the OS is constantly detecting and correcting errors.

3. What is an operating system?
a) collection of programs that manages hardware resources
b) interface between the hardware and application programs
c) system service provider to the application programs
d) all of the above

Answer: d
Explanation: An Operating System acts as an intermediary between a computer user and computer hardware. It is a program that manages hardware resources. It provides services to application programs.

4. What is the main function of the command interpreter?
a) to get and execute the next user-specified command
b) to handle the files in operating system
c) to provide the interface between the API and application program
d) none of the above

Answer: a
Explanation: The main function of command interpreter is to get and execute the next user-specified command. Command Interpreter checks for valid command and then runs that command else it will throw an error.

5. If a process fails, most operating system write the error information to a ______
a) another running process
b) log file
c) new file
d) none of the above

Answer: b
Explanation: If a process fails, most operating systems write the error information to a log file. Log file is examined by the debugger, to find out what is the actual cause of that particular problem.

6. To access the services of operating system, the interface is provided by the ___________
a) System calls
b) Assembly instructions
c) Library
d) API

Answer: a
Explanation: To access services of the Operating System an interface is provided by the System Calls.

7. The OS X has ____________
a) monolithic kernel
b) microkernel
c) hybrid kernel
d) monolithic kernel with modules

Answer: c
Explanation: OS X has a hybrid kernel. Hybrid kernel is a combination of two different kernels. OS X is developed by Apple and originally it is known as Mac OS X.

8. Which system call can be used by a parent process to determine the termination of child process?
a) get
b) wait
c) exit
d) fork

Answer: b
Explanation: wait() system call is used by the parent process to determine termination of child process. The parent process uses wait() system call and gets the exit status of the child process as well as the pid of the child process which is terminated.

9. Which one of the following is not true?
a) kernel is the program that constitutes the central core of the operating system
b) kernel remains in the memory during the entire computer session
c) kernel is made of various modules which can not be loaded in running operating system
d) kernel is the first part of operating system to load into memory during booting

Answer: c
Explanation: Kernel is the first program which is loaded in memory when OS is loading as well as it remains in memory till OS is running. Kernel is the core part of the OS which is responsible for managing resources, allowing multiple processes to use the resources and provide services to various processes. Kernel modules can be loaded and unloaded in run-time i.e. in running OS.

10. Which facility dynamically adds probes to a running system, both in user processes and in the kernel?
a) DMap
b) DAdd
c) DLocate
d) DTrace

Answer: d
Explanation: A facility that dynamically adds probes to a running system, both in user process and in the kernel is called DTrace. This is very much useful in troubleshooting kernels in real-time.