Cs604 Midterm Solved Mcqs by Junaid Malik
Cs604 Midterm Solved Mcqs by Junaid Malik
SYSYTEM
(SOLVED MCQs)
FROM MIDTERM PAPERS
LECTURE (1-22)
ajtechinstitute24@gmail. For More Visit: vujunaid.com JUNAID MALIK (0304-
com 1659294)
ÂL-JÛÑÂÎD TÊCH
JOIN OUR GROUP FOR MORE UPDATE
Click Button
CS619 & CS519 ÂL-JÛÑÂÎD TÊCH
• Bounded waiting
3. Which of the following is not a major advantage of multiprogramming
system is
• More than one jobs can be processed at a given time
• CPU utilization can be increases
• Jobs can be completed quickly
If more process can exist, the rest must wait until the
CPU is free and can be rescheduled page 31
4. We can suspend a foreground process by pressing which
sends a STOP/SUSPEND signal to the process.
• Ctrl-w
• Ctrl-x
0304-1659294 1
ÂL-JÛÑÂÎD TÊCH
• Ctrl-y
Ctrl-z pg#65
5. command in LINUX is used to copy file.
• ls
• cp pg#27
• mv
• mkdir
6. System calls provide the interface between a _ and the Operating System.
• User
• Machine
• Process pg#15
• Kernel
0304-1659294 2
ÂL-JÛÑÂÎD TÊCH
10. The___________ defines an operating system as a bridge between computer user
and hardware for a user’s convenience.
• System-view
• Bottom-up view
• Top-down view ( page 03)
• Layered-view
11. The section of code before the critical section is called .
o Entry section (Page 97)
o Remainder section
• Exit section
• Crystal section AL-JUNAID INSTITUTE OF GROUP
12. are used by shell commands to pass data from one shell
pipeline to another, without creating temporary files.
• Pipes
• Message queues
• BSD sockets
• FIFOs (Page 58)
13. system call is used to create a child process.
• Fork ( page 48)
• Parent
• Child
• None of them
13. The problem with priority scheduling algorithm is .
• Deadlock
0304-1659294 3
ÂL-JÛÑÂÎD TÊCH
• Application software
• All software
• All of the given
15. If your processor doesnot have two slots empty in Pre Process file
Descriptor Table, then your system call will fail.
Pipe (page 52)
• Read
• Write
• Open
16. Which of the following are TRUE for direct communication?
• A communication link can be associated with N number of
process(N=maximum number of processes supported by system)
A communication link can be associated with exactly two processes (pg 44)
• Exactly N/2 links exist between each pair of
processes(N=maximum number of processes supported by
system)
• Exactly two links exist between each pair of processes
0304-1659294 4
ÂL-JÛÑÂÎD TÊCH
• Bakery algorithm ( page 102)
19. Which scheduling algorithm allocates the CPU first to the process that
request the CPU first?
• First come First served scheduling (page 80)
• Shortest job scheduling
• Priority scheduling
• None of the given
20. Bounded buffer is a buffer of size.
• Variable
0304-1659294 5
ÂL-JÛÑÂÎD TÊCH
• Nice
26. In addressing, the recipient is not required to name the sender.
• Symmetric
Asymmetric (page 44)
• Both(Symmetric and Asymmetric )
• None
27. An operating system is easily portable between varying hardware designs in
structural approach.
• Virtual Machines
• Simple
• Layered
• Micro kernels Page
28. The approach include the ease of extending the OS.
• Macro Kernels AL-JUNAID INSTITUTE OF GROUP
• Small Kernel
• Monolithic Kernel
• Micro Kernel (page 19)
29. Which of the following information is not displayed with top command?
0304-1659294 6
ÂL-JÛÑÂÎD TÊCH
SIGINT (page 66)
• SIGKILL
• SIGTRAP
34. CPU bound processes are scheduled before short or I/O bound
processes in __________scheduling, therefore, resulting in less CPU
and device utilization.
• First Come First Serve (Page 81)
• Round Robin
• Shortest Job First
• Shortest Remaining Time First
0304-1659294 7
ÂL-JÛÑÂÎD TÊCH
36. In multi-threaded process thread () take two argument, they are used to take
and .
• Program counter value, address space limit.
• New thread ID, process name
• Register count, program counter
• New thread function name, new thread ID Page 68
37. In the Bakery algorithm, processes are prioritized based on highest ticks among
computing processes.
• True
• False Page 102
38. The solution type where in critical section we use “entry section and “exit
section” is
called kind of .
• Hardware solution
• Assumption
Software Solution (Page 98)
• Operating System Solution
0304-1659294 8
ÂL-JÛÑÂÎD TÊCH
41. A parent process calling system call will be suspended until children
processes terminate.
• Multi user
• Multitasking
• Interactive
43. Pipes simply used on the command line to connect the standard input of
one process to the standard input of another. Which of the following
syntax is correct use of command line Linux/UNIX pipes?
• CPU
• Memory
Compact Disc (Page 1)
• I/O Devices
45. Consider a system of N processes (Po, P1……..Pn-1). Each process in its
critical section and process may be changing common, updating a table.
0304-1659294 9
ÂL-JÛÑÂÎD TÊCH
No other process is allowed to execute in its section. This problem is
called _.
• Bakery algorithm
48. A thread shares its resources (like data section, code section, open
files, signal) with
• Other process similar to the one that the thread belongs to
• Other threads that belong to similar processes
Other thread that belong to the same processes pg#69+Google
• All of the mentioned
49. is a piece of code in a cooperating process in which the process
may update shared data (variable, file, database, etc).
• Critical Analysis
Critical Section pg#97
• Critical Path
• Critical Code
0304-1659294 10
ÂL-JÛÑÂÎD TÊCH
50. A program in execution is called a
• Command
Process pg#12
• Software
• Compiler
51. This layered approach is taken to its logical conclusion in the concept of a
• Virtual Machine pg#19
• Logical Machine AL-JUNAID INSTITUTE OF GROUP
• Physical Machine
• None of the given
52. CPU bound processes are scheduled before short or I/O bound
processes in scheduling therefore, resulting in less CPU
and device utilization.
• Shortest Job First
• Shortest Remaining Time first
First Come First Serve (page 80)
• Round-Robin
53. Using system, we can create a new process in Linux.
• Fork pg#36
• Exec
• Wait
• Exit
54. A shell command mkfifo can be used to create a/an _
• Named pipe pg57
• Message queue
• Pipe
• Unnamed pipe
55. While using the read /write system call which data type is used to return
the size of file to buffer from file descriptor fd?
• Pipefd
0304-1659294 11
ÂL-JÛÑÂÎD TÊCH
•
SSIZE-MaX pg#45
• FIFO
• Ssize_t
56. For reading input, which of the following system call is used?
• write
• rd
read pg#45
• change
0304-1659294 12
ÂL-JÛÑÂÎD TÊCH
61. The file descriptor for Standard Input (stdin) is
0 pg#52
1
2 AL-JUNAID INSTITUTE OF GROUP
3
62. Rather than maximizing CPU utilization and use of peripheral devices,
systems are for maximizing user convenience and responsiveness.
• Single-user Page 4
• Batch
• Multi-user Batch
• Time-sharing
63. The Operating system isa layer of software between and .
Hardware, software application My Point Of View
• Kernel, hardware
• Dos, Windows
• Windows, Kernel
64. You can have a thread wait for another thread with the same process by using the
system call.
pthread_join() pg#73
• pthread_exit()
• pthread_create()
• pthread_terminate()
65. In indirect communication between processes P and Q
• There is another process R to handle and pass on the messages between P and
Q.
• There is another machine between the two processes to help communication
• There is mailbox to help communication between P and Q Page
44
• A link is associated with exactly two processes
66. Which process can be affected by other processes executing in the system?
cooperating process pg#41+Google
0304-1659294 13
ÂL-JÛÑÂÎD TÊCH
• child process
• parent process
• init process
67. are used to show executions of processes.
• Gantt charts pg#85
• Time slice
• Quantum
• Sequence
0304-1659294 14
ÂL-JÛÑÂÎD TÊCH
• Mutex
• Busy waiting
72. _______displays information about the top processes.
• Is
• Cs
• Top Page 64
• Cd
73. In critical section problem, each process must first request permission to
enter its critical section. The section of code implementing this request is
called the .
• Remainder section
Entry section page 97
• Exit section
• Sub section
74. scheduling allows a process to move between queues.
• Round Robin
• First Come First Serve
Multilevel Feedback Queue page 89
• Shortest Remaining Time First
75. To terminate a process <ctrl-c> is pressed, which signal it actually pass to
process for
termination?
• SIGTERM
SIGINT pg#66
• SIGKILL
• SIGTRAP
76. The time it takes for the dispatcher to stop one process and start another
running is
known as the
• Dispatch latency Page 79
• Dispatch time
• Stop time
• Sleep time
77. In inter process communication, a sender mention the name of a
recipient.
0304-1659294 15
ÂL-JÛÑÂÎD TÊCH
• Indirect
Direct pg#43
• Automatic
• Synchronous
78. Consider three processes in scheduling. Here are the waiting time for
three processes P1=5,P2=10,P3=3.Which one of the following is
correct average waiting time per process?
3
2
18
• 6 My Point of View
79. The priorities of processes in the_____group remain fixed
• Kernel pg#90
• User
0304-1659294 16
ÂL-JÛÑÂÎD TÊCH
• Open
• Fork
83. In LINUX/UNIX environment Ali want to know the number of processes running
on the
system and their status, number of CPUs in the system and their usage, amount of
main memory and its usage. Which of the following command will help in this
regard?
• $ ps
• $ gcc
• $ fifo
• $ top Page 64
0304-1659294 17
ÂL-JÛÑÂÎD TÊCH
• Bottom Layer(N) is the hardware
• Highest Layer(N) is the hardwar
88. A heavy weight process .
• Has multiple threads of execution
Has a single thread of execution pg#67
• Multiple or single thread
• None of the mentioned
89. Is a solution of the problem of indefinite blockage of low-priority processes.
• Starvation
• Deadlock
Aging pg#84
• None of these
90. The child process can
91. FIFO’s(also
known as named pipes)are used for communication between
UNIX/Linux system.
• Related and Unrelated
• Parent-child
• Unrelated processes
• Related processes Page 49
0304-1659294 18
ÂL-JÛÑÂÎD TÊCH
$ ps Page 63
• $ gcc
• $ top
• $ fifo
94. Which of the following conditions must be satisfied to solve the critical section
problem?
• Mutual Exclusion
• Progress
• Bounded waiting
• All of the mentioned Page 98
95. The process creates two FIFOs, FIFO2, and opens FIFO1 for
reading and FIFO2 writing
• Server Page 60
• Client
• Both server and client AL-JUNAID INSTITUTE OF GROUP
• None of the given options
96. Use of semaphore create problem of busy waiting , this wastes CPU
cycle that some other process may be able to use productively. This
type of semaphore is also called
.
• semaphore S
• spinlock Page 109
• locking semaphore
• mutex
97. Kernel is responsible for scheduling the user level threads
• True
• False Page 70
98. Which of the following of two operations are provided by the IPC facility?
• Write & Delete message
• Delete & Receive message
0304-1659294 19
ÂL-JÛÑÂÎD TÊCH
• Send & Delete message
• Receive & send message My Point of View
99. Access of variable semaphore is possible only through two atomic operation
and
•
TestAndSet, Swap
• Lock, Key
• Boolean, integer
Wait, signal pg#108
100. Kill command is used to terminate a process. The syntax of the
command is kill {- signal}PID when executed without a signal number,
the command sends the
signal to the process.
• SIGINT
• SIGKILL
• SIGTERM pg#66
• None of the given option
101. Given below to statement can be categorized in some sort of
message passing technique. This type is named as
1.Send (A message)
2.Receive (B message)
• Synchronization
Direct communication pg#43
• Explicit buffering
• Send by copy communication
102. Cooperating processes never share any data, code, memory or state.
• True
0304-1659294 20
•
ÂL-JÛÑÂÎD TÊCH
False (Page 41)
103. Command display the status of the process.
• Is
Ps pg#63
• Gcc
• Cat
104. Command display the status of the process.
• Is
Ps pg#63
• Gcc
• Cat
105. For undivided and uninterrupted testing and setting of semaphore,
uni-processor systems tend to .
• Trap (page 8)
0304-1659294 21
ÂL-JÛÑÂÎD TÊCH
• win()
• slow() AL-JUNAID INSTITUTE OF GROUP
108. Ali is an operating system designer. One user requirement regarding
OS is easy to debug and modify. In your opinion which one of the
following OS structure Ali needs to follow?
• Simple OS Approach
• Micro kernels
0304-1659294 22
ÂL-JÛÑÂÎD TÊCH
113. Round Robin algorithm is most suitable for .
• Time sharing system (Page 85)
• Real time system and batch systems
• Running batch progress
• Expert system
114. Concurrent processes must be synchronized to prevent .
•
Mutual exclusion
Race condition (Page 96)
• Critical Section
• Waiting
0304-1659294 23
ÂL-JÛÑÂÎD TÊCH
• Library call
• Assembly Instructions
119. In process management some of the jobs can be suspended for some time in
order
to give other job a chance to be in execution. Which command can be used to place
back a suspended command?
fg (Page 65)
• top
• ps AL-JUNAID INSTITUTE OF GROUP
• bg
120. ~symbol in the pathname ~/docs/cs604/handouts represented .
• Root directory
• Login directory pg#22
• Parent directory
• Child directory
121. Which of the following statement is not true regarding the cooperating
processes?
• It provides an environment to allow concurrent user to access same resources.
• It provide an environment to run parallel processes to speedup computation.
• It construct the system in a modular fashion, dividing the system
functions into separate processes or threads.
It may affect or be affected by any other process
executing in the system. (Page 41)
122. 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 My Point of View
• Fork
123. The nice value helps in assigning___to process
• Priority My Point of View
• Weight
• Time
• Scheduling
0304-1659294 24
ÂL-JÛÑÂÎD TÊCH
124. In critical section problem ____requirement illustrates that “There exists a
bound on the number of times that other processes are allowed their critical
sections after a process has made a request to enter its critical section and
before that request is granted.”
o Progress
o Mutual Exclusion
o Bounded Waiting Page 98
o Race Condition
125. When process opens its first file explicitly it will get descriptor
number_____
1
2
3 My Point of View
4
0304-1659294 25
ÂL-JÛÑÂÎD TÊCH
more than one thread of execution.
• Multithreading
• Context switching
Critical section My Point of View
• Pipelining
130. Under once the CPU has been allocated to a process the process
keeps
the CPU until either it switches to the waiting state, finishes its CPU burst, or
terminates.
o Non-preemptive scheduling pg#79
o Preemptive scheduling
o Force scheduling
o Dynamic scheduling
131. The round-robin RR scheduling algorithm is designed especially for____
• Single-user systems
• Nice systems
• Batch system
• Time-sharing system pg#85
132. In producer-consumer problem synchronization is required. On which shared
area
this synchronization actually effect?
• Entry section
• Exit section
• Counter
• Buffer Page 94
0304-1659294 26
134.
ÂL-JÛÑÂÎD TÊCH
Command-line interpreter is also called____ in some operating system
o Shell My Point of View
o Signal
o API
o Kernel
AL-JUNAID INSTITUTE OF GROUP
135. When processes are generated using fork () system call and then after they
are
coordinated with each other using IPC channel. They are utilizing a separate
address space for each process (parent. child) .Kernel resources and IPC channel.
This makes it a more heavy. Which strategy can be used to make it light?
• Termination of child process when these become more
• Scheduling of each process
• Use of batch systems
• Use of threads (Page 67)
136. All UNIX and LINUX systems have one thing in common which is .
• Set of system calls My Point Of View
▪ Set of commands
▪ Set of instructions
▪ Set of text editors
First
137. entries in pre-process file descriptor table are used as soon as the
process is created.
• 1
• 2
• 3 Page 52
• 4
138. ______directory includes essential system boot files including the kernel
image
• /bin
• /boot Page 23
• /dev
• /etc
139. A signal is generated when a write performed to fifo that no process is
0304-1659294 27
ÂL-JÛÑÂÎD TÊCH
opened for reading.
141. The process id returned to the child process after successful fork
system call execution is .
0 (Page 37)
1
2
3
142. Semaphore S is a/an____ type of variable to use as synchronization tool.
• Integer (Page 108)
• Boolean
• Double
• Float
143. In the bakery algorithm to solve the critical section problem .
• Each process is put into a queue and picked up in an ordered manner
Each process receives a number(may or may not be
unique) and the one with the lowest number is served next
(Page 102)
• Each process gets a unique number and the one with the highest
number is served next
0304-1659294 28
ÂL-JÛÑÂÎD TÊCH
•Each process gets a unique number and the one with the lowest
number is served next
144. The BSD sockets are used for communication between related or unrelated
processes on the same system or on different systems.
Unrelated processes (Page 50)
• Related processes
• Both(related and unrelated)
• Sibling process
145. While a process executes its critical section, other entering processes loop in a
continual function in their entry sections, thus causing .
o Bounded waiting
• Race condition
• Mutual exclusion
• Busy waiting Page 109
• Conclusion
• Aging
• Termination
• Starvation (Page 83)
147. The manual pages can be read in Linux using command.
Man (Page 24)
• wan
• desc
• help
148. The creating process is called a process while the new process
are called the of the process.
• Children, parent
• Zombie, single
• None of the given
• Parent,children Page 35
149. UNIX system V Scheduling algorithm in every second, the priority number
of all
those processes that are in the main memory and ready to run is updated by
0304-1659294 29
ÂL-JÛÑÂÎD TÊCH
using the following formula:
• Priority # = Threshold priority + nice
• Priority # = (Recent CPU Usage)/2 + nice
• Priority # = (Recent CPU Usage)/2 + Threshold priority
• Priority #=(Recent CPU Usage)/2+Threshold priority+nice Page 90
150. An operating system is a /an___ that manages the execution of user
programs to prevent errors and improper use of a computer
o Disk
o Application program
o Control program Page 03
• Physical unit
152. Taking the CPU from one process and giving the CPU to
another process is termed as
Context Switching (Page 31)
• Dispatching
• Swapping
• Tracking
153. In priority-scheduling algorithm equal priority processes are scheduled
in order.
0304-1659294 30
ÂL-JÛÑÂÎD TÊCH
an operating system service
• Trap (Page 7)
• Interrupt
• Signal
• System call
155. Critical section problem can be solved by using how many ways?
o 4
o 3 Page 97
o 2
o 1
156. The write() system call may not fail for____reason(s)
o Invalid argument
o File size limit for process or for system would exceed
o Disk is full
o Valid argument Page 51
157. If a parent exits terminating its children processes, these children are handed
over
process.
• Init Page 37
• Root
• Daemon
• Sibling
159. The system call suspends the calling process until one of the
immediate children terminate.
Wait (Page 39)
• Signal
• Trap
• Interrupt
160. The correct command when pipes are used on the command line to connect the
standard input of one process to the standard input of another is.
• Cmd1 % cmd2% …………. %cmdN
Cmd1 | cmd2 | …………. | cmdN (Page 53)
• Cmd1 $ cmd2 $ …………. $ cmdN
0304-1659294 31
ÂL-JÛÑÂÎD TÊCH
• Cmd1 & cmd2 & …………. & cmdN
161. A system has well defined, fixed time constraints, and if the system
does not produce output for an input within the time constraints, the system fail.
• Operating
• Real-time Page 7
• Limited
• Andriod
162. In round-robin (RR) scheduling algorithm the CPU scheduler goes around
the
ready queue, allocating the CPU to each process for time interval of up to time
quantum.
4 AL-JUNAID INSTITUTE OF GROUP
3
2
1 (Page 85)
163. In hardware multiprocessor environment two instructions are
executed
which are swap and TestAndSet.
Atomically (Page 105)
• Automatically
• Manually
• By force
164. We can perform the solution to critical section problem by allowing
only one process to enter at a time but another solution hold some
instruction use. One of them is TSL, how it is written in program?
• TestAndSet (Boolean &target) (Page 105)
• Testandset(Bolean &target)
• TSL (Bolean &target)
• TSL ()
165. The segment of code in which the process may change common
variables, update tables, write into files is known as
0304-1659294 32
ÂL-JÛÑÂÎD TÊCH
• Program
0304-1659294 33
ÂL-JÛÑÂÎD TÊCH
move between queues.
• List
Queue (page 89)
• Array
• Time
171. The link between two processes P and Q to send and receive messages is
called
Communication link (page 43)
• Message-Passing link
• Synchronization link
• All of the mentioned
172. command in Linux helps to create a new directory
• ls
• cp
• mv
173. ______is the basis of queuing theory which is branch of mathematics used to
analyze systems involving queues and servers.
• Little’s Formula (page 93)
• Deterministic Modeling
• Queuing Theory
• Queuing Analysis
174. TSL based solution can implement mutual exclusion, it abbreviates
TestAndSet Instruction (page 106)
• Test Swap Instruction
• Trap Set Solution
• Test Set Instrument
175. You can have a thread wait for another thread within the same process
by using the
system call
0304-1659294 34
ÂL-JÛÑÂÎD TÊCH
Pthread_join() (page 73)
• Pthread_exit()
• Pthread_create()
• Pthread_terminate()
176. A signal is an event generated to get attention of
• Hard disk
Process (page 7)
• Trap
• Interrupts
177. Both in two atomic instructions TestAndSet and swap two critical
section requirements are satisfied but not
• Mutual exclusion
• Progress AL-JUNAID INSTITUTE OF GROUP
0304-1659294 35
ÂL-JÛÑÂÎD TÊCH
• Semaphore S
Spinlock (page 109)
• Locking Semaphore
• Mutex
181. As a result of <Ctrl-C>, a SIGINT signal is sent to a process.
Signal number for SIGINT is
15
1
9
2 (page 66)
182. The section of code after the critical section is called .
• Crystal section
• Entry section
0304-1659294 36
ÂL-JÛÑÂÎD TÊCH
to solve
• Waiting problem
o Non-concurrency problem
• Aging problem
o Critical section problem Page 97
186. Software section to critical section problem can run only in environment
• Multiprocessor
• Multithreading
• Uniprocessor Page 105
• Separate address spacing
187. _____command displays the contents of current working directory.
• Is Page 25
• Cs
• Mv
• Cp
188. When processes communicate with each other, they perform communication
through
synchronization and utilizing separate address spaces. This action is termed as
• Process management
• Synchronization
• Direct/indirect Communication
• Inter Process Communication Page 43
189. We can use semaphore to deal with the number of process critical
section problem. AL-JUNAID INSTITUTE OF GROUP
• 1
n (Page 108)
n-1
• 2n
190. Which is not considered a role of an operating system?
• Memory allocation and de-allocation of a process
• Synchronization of cooperating processes My Point of View
0304-1659294 37
ÂL-JÛÑÂÎD TÊCH
• Program execution
• Protection of a user’s file and directories
191. In system call that creates a pipe for IPC. If one of the operation from
read/write
would fail then what will be returned as result?
• -1+1
• 1
• -1 Page 46
• 0
192. Which of the following is not true for a time-sharing system?
• Multi user
• Iterative
• CPU sit idle when process requires I/O operation
• Rigid time requirements My Point of View
193. Which could not be the advantage of thread?
Separate address space (Page 69)
• Quick response
• Economical
• Best in multiprocessing environment
• Copy
• Copi
• Cp
0304-1659294 38
ÂL-JÛÑÂÎD TÊCH
• Both Copy and CP My Point Of View
198. Processes P1,P2,P3,P4 enter the ready queue at time 0,3,3,11 with burst
times
P1=8, P2=2, P3=1, P4=1. With shortest remaining time first , process is given
CPU at time=3.
• P1
• P2
P3 My Point of View
• P4
199. If size of a process is 376052 bytes and its smallest physical memory
address is
242785.Its address space cannot exceed beyond .
376053
376051
618836
618837 My Point of View
200. Which of the following is a correct command line for running in
background?
• cat code.c | grep print %
cat code.c | grep print & (Page 62)
0304-1659294 39
ÂL-JÛÑÂÎD TÊCH
• cat code.c | grep print #
• cat code.c | grep print @
201. Which of the following command is used to read data from file named
academics?
• con<academics
• socket>academics
• ran>academics
• cat<academics (Page 55)
202. Using hardware solution to synchronization for complex problems, introduce
a
new synchronization tool known as .
• Trap
• Semaphore (Page 108)
• SWAP
• TestAndSet
203. In LINUX directory structure, there is root directory.
• 1 Page 23
• 2
• 4 AL-JUNAID INSTITUTE OF GROUP
• 3
204. The time interval from submission of a process to the time
when its output is generated is termed as .
Turnaround time (Page 80)
• CPU burst
• Responsive time
• Throughput
0304-1659294 40
ÂL-JÛÑÂÎD TÊCH
•gcc -o FirstProgram program.c
• gcc program.c -o First Program (Page 28)
206. The Kernel is_____user threads
o Is part of
o Unaware of Page 70
o Aware of
o The creater of
207. scheduling algorithm is sometimes called shortest
remaining time first scheduling algorithm.
• Priority scheduling
• Non-preemptive SJF
Preemptive Shortest Job First (Page 82)
• FCFS
208. You can use the bg command to put the current or a suspended
process into the background. What is the correct syntax of bg command
from the following?
• bg [%id]
• bg [job#]
• bg [id#]
bg [%job_id] (Page 65)
209. The region in the memory that a process is allowed to
access is known as .
Address space (Page 10)
• Instruction
• Operation
• Register
210. In Unix/Linux by default the standard output file is attached to the
• File
0304-1659294 41
ÂL-JÛÑÂÎD TÊCH
211. The procedure “The time at which the process finished working MINUS
the
arrival time of the process MINUS CPU burst for that process” will help
calculate the
.Non-preemptive Shortest Job First scheduling.
• -e (Page 63)
• -u
215. Clock interrupt handler is an example of kernel level thread that is
not executed for serving a request by a user thread. It is named as .
• EINVAL
0304-1659294 42
ÂL-JÛÑÂÎD TÊCH
• EAGAIN
LWP (Page 72)
• POSIX
216. Consider three processes in scheduling. Here are the waiting times for three
process P1=4,P2=2,P3=6.Which one of the following is correct average
waiting time.
• 2
• 4 My Point of View
• 3
• 6
217. Processes P1,P2,P3 having burst time P1=3,P2=4,P3=3 and turnaround time
P1=7,P2=10,P3=9 enter the ready queue at T=0 waiting time for process P2 is .
o 3
o 4
o 6 My Poit of View
o 0
218. P1,P2,P3,P4,P5 are five processes with tick numbers
P1=1,P2=2,P3=4,P4=2,P5=4
then considering Lamport’s bakery algorithm_____ process enters critical
section after P1.
P2 My Point of View
• P3
• P4
• P5
219. Four processes P1, P2, P3, P4 enter the ready queue at time 0 with
burst times P1=3, P2=10, P3=4. Waiting time of P3 would be .
12
13 My Point of View
14
17
0304-1659294 43
ÂL-JÛÑÂÎD TÊCH
0304-1659294 44