Professional Documents
Culture Documents
<Ctrl-A>
fg
jobs
kill –l (pg 69)
CS604 Operating Systems
1. The priorities of processes in the ----------Group remain fixed whereas the priorities of
processes in the -----------Group are recalculated every second.
Kernel, Kernel
User, Kernel
User, User
Kernel, User (pg 93)
2. Preemptive scheme of Short job first scheduling is known as -------
First Come First Serve Scheduling
Priority Scheduling
Round-Robin Scheduling
Shortest-Remaining-Time-First (pg 85)
3. In Linux directory structure, there is ___________ root directory.
1 (pg 26)
2
3
4
4. Linux uses ___________ directory to store system configuration files.
/bin
/dev
/boot
/etc (pg 26)
5. Process synchronization is a process of helping processes to _________________
update the shared data simultaneously
update the shared data and resources in an orderly fashion (g 98)
not to update the shared data or memory
access data and memory at first come first serve basis
6. All ------------ within a process share the same address space
Threads (pg 70)
Processes
4 CPU burst
IO Burst
7. …………………….. provides basic computing resources.
Application programs
Operating System
Top-down (pg 6)
Bottom-up
External
Internal
14. ___________ and __________ CPU registers are specifically designed to provide memory
protection by limiting access to a process with in its address space.
Counter, add
Base, limit (pg13)
Program counter, accumulator
Buffer, data register
15. A time interval when a process uses I/O devices only is called __________.
CPU burst
I/O burst (Not sure)
Scheduling
Context switching
16. Under _________scheduling, 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.
Short-term scheduler
Preemptive
Non-preemptive (pg 82)
Both preemptive and non- preemptive
17. The non-critical section code in any critical section problem is termed as ____________.
Critical Section
Entry Section
Leave/Exit Section
Remainder Section (pg 101)
18. N-process critical section problem can be solved by using ______________.
The bakery algorithm (page 105)
Deterministic modeling
Analytic Evaluation
TestAndSet instruction
19. In direct communication, link is associated with exactly_______pair(s) of communicating
processes.
Four
Two (pg 47)
One
8 Three
20. In Unix/Linux client server process communication, server process runs in the
background by terminating its command line with --------------.
& (pg 65)
@
19. A ---------process is a process that has terminated but whose exit status has not yet been
received by its parent process or by init.
Parent
Zombie (page 42)
Child
Fork
20. Blocking is considered ___________ and Non-blocking is considered _____________ .
Synchronous , Asynchronous (pg 47)
Asynchronous , Synchronous
Direct , Indirect
Zero capacity , Bounded capacity
11
22. Give at least two real world example that illustrate critical section problem.02
Answer: Critical Section
A piece of code in a cooperating process in which the process may update shared data
(variable, file, database, etc.).
Concurrent transactions in a bank or in an airline reservation (or travel agent) office are a
couple of other examples that illustrates the critical section problem.
23. With respect to UNIX System V scheduling algorithm, Sort the Kernel group
activities in decreasing order of priority as given below:
• Character I/O device control processes
• File manipulation
• Swapper
• User processes
• Block I/O device control processes03
Answer:
• Swapper
• Block I/O device control processes
• File manipulation
• Character I/O device control processes
• User processes
24. Process can run either as background process or as foreground process. If the
12 process is running in background and you wanted to resume a process in a
UNIX/LINUX shell. Which command will you use for it? Write its syntax used in
UNIX/LINUX and explains each part of it.03
Answer:
Moving a process into foreground: fg [%job_id]
26. What do you think that which “critical section problem” is actually depicting and
in how many ways its solution can be categorized?05
Answer: When a process executes code that manipulates shared data (or resource), we say
that the process is in its critical section (for that shared data). The execution of critical
sections must be mutually exclusive: at any time, only one process is allowed to execute in
its critical section (even with multiple processors). So each process must first request
permission to enter its critical section.
There can be three kinds of solution to the critical section problem:
• Software based solutions
• Hardware based solutions
Operating system based solution
21. Which term is best suited for a situation in which a process is in its critical
section, any other process that tries to enter its critical section must loop
continuously in the entry code?02
Answer: This continual looping is clearly a problem in a real multiprogramming system,
where a single CPU is shared among many processes. Busy waiting wastes CPU cycles that
some other process may be able to use productively. This type of semaphore is also called a
spinlock (because the process spins while waiting for the lock).
22.Write the name of threads where OS is fully aware of its creation and mapping
13 methods and also give an example of OS that support these threads.02
Answer: Kernel threads are supported directly by the operating system. The kernel
performs the scheduling, creation, and management in kernel space; the kernel level
threads are hence slower to create and manage, compared to user level threads. However
since the kernel is managing threads, if a thread performs a blocking system call, the kernel
26. Many solutions to critical section problem are given. One of them is the use of
hardware instructions. Can you specify such type of instructions? Name them and
also tell which of the requirements of critical sections are satisfied by these
instructions and which are not.05
Answer:
These instructions are TestAndSet (also known as TestAndSetLock; TSL) and Swap.
• If the machine supports TestAndSet instruction, then we can implement mutual
exclusion by declaring a Boolean variable lock, initialized to false.
• TSL-based solution is not good because even though mutual exclusion and progress
are satisfied, bounded waiting is not.
• Swap-based solution is not good because even though mutual exclusion and
progress are satisfied, bounded waiting is not.
21. There are two assumptions given below: 1) each process executes at a nonzero
speed. 2) No assumption can be made regarding the relative speeds of the N
processes. You have to identify the problem that can be solved by using these
instructions.02
Answer: These Assumption made while formulating a solution to the critical section
problem
22. Suppose there is a thread mapping model used to map user-level threads to
kernel-level threads. Here in this model, there exist many kernel-level threads that
14 support a number of user-level threads and concurrencies in between these threads.
Suggest the name of the model described above. 02
Answer: One-to-One: In this model, there is a kernel thread for every user thread Thus,
this model provides true concurrency. This means that a process does not block when a
thread makes a system call. The main disadvantage of this model is the overhead of
15