Week 2 Solution
Week 2 Solution
Q1.
In connection with the system call, which of the statements seem to be appropriate?
(A) the transition from user mode to kernel mode is done using a system call
(B) mode bit is set to 0 when a process is executing in user mode
(C) mode bit is set to 1 when a process is executing in kernel mode
(D) a trap is a software interrupt generated by the user during system call execution
(E) timer is a software that is used to prevent the infinite loop in a user program
Ans: (A) the transition from user mode to kernel mode is done using a system call
Q2.
A multi-threaded process
(A) has multiple program counters, one for each thread
(B) has multiple identities, one for each thread
(C) can manage multiple requests from the same user
(D) can be implemented as user-level threads or kernel-level threads
(E) All of the above
Q3.
A multicore system executes a thread by the following number of core(s).
(A) One
(B) Two
(C) Multiple
(D) Depends on the structure of the thread
(E) Depends on the structure of the CPU
Q4.
For the execution of a program, which of the statement is correct?
(A) the entire program may be in the main memory
(B) the part of the program may be in the main memory
(C) MAR may store the memory address from which data will be fetched
(D) MAR may store the address to which data will be sent and stored
(E) All of the above
Q6.
The fork() system call returns
(A) a negative value to the parent process if the creation of the child process is successful
(B) zero to the parent process if the parent process gets interrupted during the child
process creation
(C) a positive value to the parent process if the creation of a child process is unsuccessful
(D) the process ID of the child process to the parent process if the child process creation
was successful
(E) the process ID of the parent process to the child process if the child process creation
was successful
Ans: (D) the process ID of the child process to the parent process if the child process
creation was successful
Q7.
Which of the statements is incorrect?
(A) Shared memory is a tightly coupled system
(B) Shared memory is a loosely coupled system
(C) Shared memory is used for inter-process communication
(D) Multiple processes can simultaneously access a shared memory
(E) Process synchronization is needed when multiple processes access a shared memory
Q8.
Which of the statements is incorrect?
(A) The kernel is a program that constitutes the central core of the OS
(B) The kernel provides essential services to all other parts of the OS
(C) The kernel can directly interact with the user
(D) The kernel can directly interact with the shell program
(E) The kernel can directly interact with the hardware
Ans: (C) The kernel can directly interact with the user
Q9.
Which of the statements is incorrect?
(A) Shell is a program that provides a text-only interface to the user
(B) Shell reads a command from the console and executes it
(C) Shell is the outermost part of the layered architecture of the UNIX OS
(D) Shell is an interface between the user and kernel
(E) Shell can be only a command-line interface (CLI)
Q10.
A system program
(A) provides a convenient environment for program development and execution
(B) is a user interface to system calls
(C) fulfills the requirements of a user program
(D) provide the mechanism for creating virtual connections among processes
(E) All of the above
Q11.
Which of the following is not a system program?
(A) Operating system
(B) Device driver
(C) Boot loader
(D) Shell
(E) User program
Q12.
Which of the following is not a UNIX system call?
(A) fork()
(B) pipe()
(C) ioctl()
(D) Sleep()
(E) open()
Q13.
Which of the operating system supports microkernel structure?
(A) Tru64 UNIX
(B) Mac OS X
(C) QNX
(D) Windows NT
(E) All of the above
Ans: (E) All of the above
Q14.
Which of the operating system does not support modular structure?
(A) UNIX
(B) Solaris
(C) MS-DOS
(D) Linux
(E) Windows
Q15.
Which of the following provides the interface for the user to get services from the operating
system?
(A) System call
(B) Library function
(C) Debugger
(D) Assembler
(E) Compiler