1 CS604 - Operating System Solved MCQS From Midterm Papers May 13,2013 MC100401285 [email protected][email protected]PSMD01 MIDTERM EXAMINATION Spring 2012 CS604 - Operating System Question No: 1 ( Marks: 1 ) - Please choose one _________ command to resume the execution of a suspended job in the foreground ► fg (Page 68) ► bg ► jobs ► kill Question No: 2 ( Marks: 1 ) - Please choose one __________ commands in Linux is used to copy file ►is ►cp (Page 30) ►mv ►mkdir Question No: 3 ( Marks: 1 ) - Please choose one The process id returned to the child process after successful fork system call execution is _____________. ►0 (Page 40) ►1 ►2 ►3 Question No: 4 ( Marks: 1 ) - Please choose one In ________addressing, the recipient is not required to name the sender. ► Symmetric ► Asymmetric (Page 47) ► Both symmetric and asymmetric ► None of the given options
35
Embed
CS604 - Operating System Solved MCQS May 13,2013 …api.ning.com/files/imbe9KBD0dMBEUkutNwk-bb... · · 2016-10-21CS604 - Operating System Solved MCQS From Midterm Papers ... Progress
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
_________ command to resume the execution of a suspended job in the foreground
► fg (Page 68)
► bg
► jobs
► kill
Question No: 2 ( Marks: 1 ) - Please choose one __________ commands in Linux is used to copy file
►is
►cp (Page 30)
►mv
►mkdir
Question No: 3 ( Marks: 1 ) - Please choose one The process id returned to the child process after successful fork system call execution is _____________.
►0 (Page 40)
►1
►2
►3
Question No: 4 ( Marks: 1 ) - Please choose one
In ________addressing, the recipient is not required to name the sender.
Question No: 8 ( Marks: 1 ) - Please choose one Utilities used for system administration (halt, ifconfig, fdisk, etc.) are stored in _____________ directory.
►/dev
►/boot
►/lib
►/sbin (Page 27)
Question No: 9 ( Marks: 1 ) - Please choose one
rm and [r]mkdir commands are used to _____________ directory.
►Create
►Move
►Remove (Page 30) ►Modify
Question No: 10 ( Marks: 1 ) - Please choose one You can use the mv file1 file2 command to move ______________
►file1 to file2. (Page 30) ►file 2 to file 1
►this command will not work for moving files
►None of the option is correct.
►Both option a and b are correct
Question No: 11 ( Marks: 1 ) - Please choose one Taking the CPU from one process and giving the CPU to another process is termed as
►Context Switching click here for detail
►Dispatching
►Swapping
►Tracking
Question No: 12 ( Marks: 1 ) - Please choose one A Process that has finished working, as well as its parent process has also finished its execution. In this state the
Question No: 13 ( Marks: 1 ) - Please choose one Bounded Buffer is a buffer of ____________ size
►variable
►fixed (Page 44)
Question No: 14 ( Marks: 1 ) - Please choose one In ________ communication the process which wants to communicate with the other process must explicitly
name the recipient and the sender.
►Direct (Page 46) ►Indirect
►Automatic
►Self
Question No: 15 ( Marks: 1 ) - Please choose one In indirect inter process communication, a sender ________ mention the name of the recipient.
►does
►does not (Page 47) rep
Question No: 16 ( Marks: 1 ) - Please choose one The returned code to the child process after successful fork system call execution is
►1
►2
►3
►0 (Page 40) rep
Question No: 17 ( Marks: 1 ) - Please choose one If the fork system call fails, it returns
►1
►-1 (Page 40) ►2
►0
Question No: 18 ( Marks: 1 ) - Please choose one When a process opens its first file explicitly it will get descriptor number _________
n-process critical section problem can be solved by using
►The bakery algorithm (Page 105)
►Deterministing modeling
►Analytic evaluation
►None of above
18
CS604 - Operating System
Solved Quizzes (1 and 2)
Quiz No.1 Dated Dec 04, 2012
Question No: 1 of 10 ( Marks: 1 ) - Please choose one ___________ is a piece of code in a cooperating process in which the process may updates shared data (variable, file,
database, etc.).
►Critical analysis
►Critical section (Page 100)
►Critical path
►Critical code
Question No: 2 of 10 ( Marks: 1 ) - Please choose one
Round Robin algorithm is similar to ____________ scheduling but preemption is added to switch between processes.
►Shortest job first
►Shortest Remaining Time First
►First Come First Server (Page 88)
►None of these
Question No: 3 of 10 ( Marks: 1 ) - Please choose one
DOS is single user operating system.
►True (Page 7)
►False
Question No: 4 of 10 ( Marks: 1 ) - Please choose one
A process is said to be in critical section if it executes code that manipulates shared data
►True (Page 100)
►False
Question No: 5 of 10 ( Marks: 1 ) - Please choose one
When process opens its first file explicitly it will get descriptor number ______
Question No: 8 of 10 ( Marks: 1 ) - Please choose one
An operating system is a control program that manages the execution of user programs to prevent errors and improper use
of a computer.
►True (Page 6)
►False
Question No: 9 of 10 ( Marks: 1 ) - Please choose one
The bottom-up view is that operating system is a resource manager who manages the hardware and software resources in
the computer system.
►True (Page 6)
►False
Question No: 10 of 10 ( Marks: 1 ) - Please choose one
________ determines What will be done.
►Mechanism
►Policy (Page 24)
►Mechanism and Policy
►None of the given
Question No: 1 of 10 ( Marks: 1 ) - Please choose one
copy file1 file2 is an example of ______ OS view.
►Top down (Page 6)
►Bottum Up
Question No: 2 of 10 ( Marks: 1 ) - Please choose one
The Top-down view is that it is a program that acts as an intermediary between a user of a computer and the computer
hardware, and makes the computer system convenient to use.
►True (Page 6)
►False
Question No: 3 of 10 ( Marks: 1 ) - Please choose one
Managing Secondary Storage Involves all of the Following except
►Allocating storage space
►Deallocating Storage
►Prevent Overwritting (Page 5)
►Insure integrity of shared data
25
Question No: 4 of 10 ( Marks: 1 ) - Please choose one
The Purpose of Operating System is to generate Executable Programs and to _______ them.
►Regenetrate
►Execute (Page 5)
►Store
►Remove
Question No: 5 of 10 ( Marks: 1 ) - Please choose one
Users are the People, machines or computers that uses the Hardware resources.
►True (Page 4)
►False
Question No: 6 of 10 ( Marks: 1 ) - Please choose one
Database, Complier, Video games are examples of ________.
►Hardware
►Application (Page 4)
►Operating System
►Users
Question No: 7 of 10 ( Marks: 1 ) - Please choose one
Which of the Following is not an Operating System.
►Linux
►Unix
►Windows Xp
►Datebase (Page 7)
Question No: 8 of 10 ( Marks: 1 ) - Please choose one
Operating system enables the user to use the Hardware Resources.
►True (Page 4)
►False
Question No: 9 of 10 ( Marks: 1 ) - Please choose one
Which of the following is NOT a Hardware Resource.
►CPU
►OS (Page 4)
►I/O Devices
►Memory
26
Question No: 10 of 10 (Marks: 1) - Please choose one
Hardware provide basic computing resource.
►True (Page 4)
►False
Question No: 1 of 10 ( Marks: 1 ) - Please choose one
_____________ is a preemptive scheduling algorithm.
►First Come First Serve
►Shortest Job First
►Round Robin (Page 89)
►None of these
Question No: 2 of 10 ( Marks: 1 ) - Please choose one
The priorities of processes in the __________ group remain fixed.
►Kernel (Page 93)
►User
Question No: 3 of 10 ( Marks: 1 ) - Please choose one
The process of switching from one process to another is called latency.
►True
►False (Page 34)
Question No: 4 of 10 ( Marks: 1 ) - Please choose one
In Unix/ Linux, by default the standard input file is attached to the ___________
►Mouse
►Keyboard (Page 55)
►Light pen
►Joystick
Question No: 5 of 10 ( Marks: 1 ) - Please choose one
The nice value helps in assigning ______ to a process.
►Priority (Page 94)
►Weight
►Time
►Scheduling
Question No: 10 of 10 ( Marks: 1 ) - Please choose one
__________ integer shows the highest priority of a process in CPU scheduling
►Small (Page 86)
►Large
27
Quiz No.2
Question No: 1 of 10 ( Marks: 1 ) - Please choose one
If a system is not in a safe state, there can be No deadlocks.
►True
►False (Page 137)
Question No: 1 of 10 ( Marks: 1 ) - Please choose one
A dashed line is used to represent a _________ in Resource Allocation Graph.
►Claim edge (Page 138)
►Request edge
►Assignment edge
►Allocation edge
Question No: 1 of 10 ( Marks: 1 ) - Please choose one
The process of holding at least one resource and waiting to acquire additional resources that are currently being
held by other processes is known as________.
►Mutual exclusion
►Hold and wait (Page 131)
►No preemption
►Circular wait
Question No: 1 of 10 ( Marks: 1 ) - Please choose one
In Resource Allocation Graph, A _______ Pi →Rj indicates that process Pi may request resource Rj at some
time in the future.
►Claim edge (Page 138)
►Request edge
►Assignment edge
►Allocation edge
28
Question No: 1 of 10 ( Marks: 1 ) - Please choose one
If the system can allocate resources to each process in some order and still avoid a deadlock then it said to be in
______ state.
►Safe (Page 137)
►Unsafe
►Mutual
►Starvation
Question No: 1 of 10 ( Marks: 1 ) - Please choose one
A condition where a set of blocked processes each holding a resource and waiting to acquire a resource held by
another process in the set is termed as ________.
►Deadlock (Page 130)
►Starvation
Question No: 1 of 10 ( Marks: 1 ) - Please choose one
The following is NOT a classical problem of synchronization
►Bounded buffer problem
►Reader writer problem
►Dining philosopher‟s problem
►Counting semaphore problem (Page 118)
Question No: 1 of 10 ( Marks: 1 ) - Please choose one
The integer value of ________semaphores can range over an unrestricted integer domain.
►Counting (Page 117)
►Binary
►Mutex
►Bounded buffer
Question No: 1 of 10 ( Marks: 1 ) - Please choose one
The condition in which a set {P0, P1… Pn} of waiting processes must exist such that P0 is waiting for a
resource that is held by P1, P1 is waiting for a resource that is held by P2, and so on, Pn-1 is waiting for a
resource held by Pn, and Pn is waiting for a resource held by P0. This condition is known as ______________.
►Mutual exclusion
►Hold and wait
►No preemption
►Circular wait (Page 131)
29
Question No: 1 of 10 ( Marks: 1 ) - Please choose one
You can use the rm file1 command to __________ file1
►Retrieve
►Remove (Page 30)
►Make
►modify
Question No: 2 of 10 ( Marks: 1 ) - Please choose one
The correct command for compiling C program named program.c in Linux environment is
►gcc program.c –o FirstPrgram (Page 31)
►gcc –o FirstProgram program.c
►gcc –z FirstProgram program.c
►gcc program.c –m FirstPrgram
Question No: 3 of 10 ( Marks: 1 ) - Please choose one Using _________system, we can create a new process in Linux.
►Fork (Page 39)
► exec
►wait
►exit
Question No: 4 of 10 ( Marks: 1 ) - Please choose one
Cooperating processes never share any data, code, memory or state.
►True
►False (Page 5)
Question No: 5 of 10 ( Marks: 1 ) - Please choose one
____ command display the status of a process.
►ls
►ps (Page 66)
►gcc
►cat
Question No: 6 of 10 ( Marks: 1 ) - Please choose one Swapper is also termed as Short term scheduler.
►True
►False (Page 36)
30
Question No: 7 of 10 ( Marks: 1 ) - Please choose one
_____ system call is used to write to a file or FIFO or any other IPC channel.
►read
►write (Page 48)
►open
►fork
Question No: 8 of 10 ( Marks: 1 ) - Please choose one A Process „A‟ that has finished working but its parent process has also finished its execution. In this state the process „A‟
will be called as _____ process.
►Child
►Thread
►Zombie (Page 42)
►Fork
Question No: 9 of 10 ( Marks: 1 ) - Please choose one _________________ scheduling allows a process to move between queues.
►Round Robin
►First Come First Serve
►Multilevel Feedback Queue (Page 92)
►Shortest Remaining Time First
Question No: 10 of 10 ( Marks: 1 ) - Please choose one
Round Robin algorithm is most suitable for __________.
Time sharing system (Page 88) Real time systems and batch systems
Running Batch programs
Expert system
Question No: 1 of 10 ( Marks: 1 ) - Please choose one Kernel is responsible for scheduling the user level threads.
►True
►False (Page 73)
Question No: 2 of 10 ( Marks: 1 ) - Please choose one A ---------------- (or an exception) is a software-generated interrupt caused either by an error (division by zero or invalid
memory access) or by a user request for an operating system service.
► Interrupt
► Trap (Page 10) ► Signal
► Process
31
Question No: 3 of 10 ( Marks: 1 ) - Please choose one
Which register holds the smallest legal physical memory address for a process?
► Base register (Page 13) ► Limit register
► Status register
► None of the given options
Question No: 4 of 10 ( Marks: 1 ) - Please choose one
The --------------semaphore provides mutual exclusion for accesses to the buffer pool and is initialized to the value 1.
► mutex (Page 118) ► binary
► couting
► none of the given options
Question No: 5 of 10 ( Marks: 1 ) - Please choose one
Binary semaphores are those that have only two values---------
► 0 and n
► 0 and 0
► 0 and 1 (Page 117) ► None of the given options
Question No: 6 of 10 ( Marks: 1 ) - Please choose one
Physical memory is broken down into fixed-sized blocks, called----------- and Logical memory is divided into blocks of
the same size, called -----------
► Frames, pages (Page 165) ► Pages, Frames
► Frames, holes
► Holes, segments
Question No: 7 of 10 ( Marks: 1 ) - Please choose one
A page table needed for keeping track of pages of the page table is called --------------
► 2-level paging
► Page directory (Page 173) ► Page size
► Page table size
Question No: 8 of 10 ( Marks: 1 ) - Please choose one
The address generated by the CPU, after any indexing or other addressing-mode arithmetic, is called a --------address, and
the address it gets translated to by the MMU is called a ---------address.