Os QB
Os QB
Os QB
PART – A
1. List and briefly define the four main elements of a computer?
Processor – Controls the operation of the computer & performs its data processing
functions
Main memory – Stores data & programs.it is volatile.
I/O modules – Move data between the computer & its external environment such as disks,
communication equipment & terminals.
System Bus – Provides for communication among processors, main memory & I/O
modules.
3. In general terms, what are the four distinct actions that machine instruction can specify?
Processor – Memory
Processor –I/O
Data Processing
Control
4. What is an Interrupt?
Interrupt are provided primarily as way to improve processor utilization.
It is a mechanism by which other modules( I/O, Memory) may interrupt the normal
sequencing of the processor
Classes of interrupts:-
Program
Timer
I/O
II Year / IV Sem 1
PANIMALAR INSTITUTE OF TECHNOLOGY DEPARTMENT OF IT
Hardware failure
intermediate between a user’s of a computer and the computer hardware. It controls and
coordinates the use of t h e hardware among the various application programs for the various
users.
The boot program then loads the operating system into memory to startup the computer this
arrangement is known as bootstrapping.
21. What does the CPU do when there are no user programs to run? (NOV/DEC 2011)
The CPU will always do processing. Even though there are no application programs running, the
operating system is still running and the CPU will still have to process.
22. Describe the actions taken by a kernel to context-switch between processes. (NOV/DEC
2013)
In general, the operating system must save the state of the currently running process and restore the
state of the process scheduled to be run next. Saving the state of a process typically includes the
values of all the CPU registers in addition to memory allocation. Context switches must also perform
many architecture-specific operations, including flushing data and instruction caches.
26. Can multiple user level threads achieve better performance on a multiprocessor system
than a single processor system? Justify your answer. (MAY/JUNE 2014 )
We assume that user-level threads are not known to the kernel. In that case, the answer is because the
scheduling is done at the process level. On the other hand, some OS allows user-level threads to be
assigned to different kernel-level processes for the purposes of scheduling. In this case the
multithreaded solution could be faster
27. Mention the circumstances that would a user be better off using a time-sharing system
rather than a PC or a single user workstation? (MAY/JUNE 2014)
A user is better off fewer than three situations: when it is cheaper, faster, or easier.
For example:
1. When the user is paying for management costs and the costs are cheaper for a time-sharing system
than for a single-user computer.
2. When running a simulation or calculation that takes too long to run on a single PC or workstation.
3. When a user is travelling and doesn't have laptop to carry around, they can connect remotely to a
time-shared system and do their work.
29. Why API s need to be used rather than system calls? (APR/MAY 2015)
System calls are much slower than APIs (library calls) since for each system call, a context switch
has to occur to load the OS (which then serves the system call).
Most details of OS interface hidden from programmer by API Managed by run-time support library
(Set of functions built into libraries included with compiler.)
30. Describe the actions taken by a thread library to context switch between user-level
threads.
The user-level threads are known only within a given process. To context switch, we only need to
save the thread-specific context: the program counter, CPU registers, and the thread-specific stack
pointer.
II Year / IV Sem 5
PANIMALAR INSTITUTE OF TECHNOLOGY DEPARTMENT OF IT
32. What are the advantages of peer-to-peer systems over client-server systems? (May/Jun
2016)
It is easy to install and so is the configuration of computers on this network, all the resources
and contents are shared by all the peers, unlike server-client architecture where Server shares
all the contents and resources.
P2P is more reliable as central dependency is eliminated. Failure of one peer doesn’t affect
the functioning of other peers. In case of Client –Server network, if server goes down whole
network gets affected.
There is no need for full-time System Administrator. Every user is the administrator of his
machine. User can control their shared resources.
The over-all cost of building and maintaining this type of network is comparatively very less.
33. Compare and contrast DMA and cache memory. (Nov/Dec 2015)
DMA is a hardware device that can move to/from memory without using CPU instructions.
For instance, a hardware device (lets say, your PCI sound device) wants audio to play back.
You can either:
Write a word at a time via a CPU mov instructions.
Configure the DMA device. You give it a start address, a destination, and the number of bytes
to copy. The transfer now occurs while the CPU does something else instead of spoon feeding
the audio device.
DMA can be very complex (scatter gather, etc), and varies by bus type and system.
34. Write the difference between Batch systems and Time sharing systems. (Nov/Dec 2015)
A batch is a sequence of jobs. This batch is submitted to batch processing operating systems,
and output would appear some later time in the form of a program or as program error. To
speed up processing similar jobs are batched together.
The major task of batch operating systems is to transfer control automatically from one job to
next. Here the operating is always in the memory.
Time sharing or multi-tasking is a logical execution of multiprogramming. Multiple jobs are
executed by the CPU switching between them. Here the computer system provides on line
communication between the user and the system.
Here the CPU is never idle. Time shared operating system allows many users to share
the computer simultaneously.
Time sharing systems requires some sort of memory management and protection.
PART – B
1. Explain Operating System Structure and components. [R] (APRIL/MAY 2010, NOV/DEC
2013)
2. Discuss multiprocessor systems in detail. [U] (MAY/JUNE 2013)
3. Explain in detail the types of system calls provided by a typical operating system. [R]
(NOV/DEC 2012)
4. Explain the purpose of system calls and discuss the calls related to device management and
communications in brief. [An] (MAY/JUNE 2014)
5. Explain the concepts of virtual machines, their implementation and benefits in details. [An]
(MAY/JUNE 2014)
II Year / IV Sem 6
PANIMALAR INSTITUTE OF TECHNOLOGY DEPARTMENT OF IT
6. What is a virtual machine? List out the advantages of virtualization. Explain the creation of a
Virtual machine with a architecture diagram [An] (NOV/DEC 2013)
7. Write short notes on operating system services and components. [U] (MAY/JUNE 2012)
8. Write in detail about the real time system and multiprocessor system. [U]
9. Write in detail about hardware protection. [U]
10. Explain the various types of System calls with an example for each?[U] (APR/MAY 2015)
11. Discuss about the functionality of system boot with respect to operating system. [An]
(APR/MAY 2015)
12. Discuss about the evolution of virtual machines. Also explain how virtualization could be
implemented in operating systems. [Ap] (APR/MAY 2015)
13. Sketch the structure of Direct Memory Access in detail. [U] (APR/MAY 2015)
14. (i) With neat sketch discuss computer system overview
(ii) Enumerate the different operating system structure and explain with neat sketch [U]
(Nov/Dec 2015)
15. (i) State the basic functions of OS and DMA.
(ii) Explain system calls, system programs and OS generation. [U] (Nov/Dec 2015)
16. (i) Distinguish between the client-server and peer-to-peer models of distributed systems.
(ii) Describe three general methods for passing parameters to the operating system with
example. [An] (MAY/JUNE 2016)
17. (i) How could a system be designed to allow a choice of operating systems from which to
boot? What would the bootstrap program need to do? [Ap]
18. (ii) Describe the differences between symmetric and asymmetric multiprocessing. What are
three advantages and one disadvantage of multiprocessor systems? [An] (MAY/JUNE 2016)
COURSE OUTCOME: Ability to understand the basics of computer organization, operating system
structures and programs.
UNIT II
PROCESS MANAGEMENT
COURSE OBJECTIVE: Ability to understand, design and analyze various process management
concepts such as scheduling algorithms, synchronization and deadlock algorithms.
PART – A
1. Define Process?
A Process can be thought of as a program in execution. A process will need certain resources such as
CPU time, memory, files & I/O devices to accomplish its task.
II Year / IV Sem 7
PANIMALAR INSTITUTE OF TECHNOLOGY DEPARTMENT OF IT
3. What is process control block? List out the data field associated with PCB.
(APR/MAY2015)
Each process is represented in the operating system by a process control block also called a task cont
rol block.(PCB) Also called a task control block.
Process state
Process number
Program counter
CPU registers
Memory limits
List of open files
CPU scheduling information
Memory management information
Accounting information
I/O status information
II Year / IV Sem 8
PANIMALAR INSTITUTE OF TECHNOLOGY DEPARTMENT OF IT
7. What is a thread?
A thread otherwise called a lightweight process (LWP) is a basic unit of CPU utilization, it
comprises of a thread id, a program counter, a register set and a stack. It shares with otherthreads bel
onging to the same process its code section, data section, and operating system resources such as ope
n files and signals.
Spinlock:-
Busy waiting waster CPU cycles that some other process might be able to use productively. This
this type of semaphore is also called a spinlock. because the process“spin” while waiting
for the lock.
15. What are the difference b/w user level threads and kernel level threads?
(MAY /JUNE 2012) (MAY/ JUNE 2016) (NOV/DEC 2015)
User threads
User threads are supported above the kernel and are implemented by a thread library at the user
level. Thread creation & scheduling are done in the user space, without kernel intervention.
Therefore they are fast to create and manage blocking system call will cause the entire process to
block
Kernel threads
Kernel threads are supported directly by the operating system .Thread creation, scheduling and
management are done by the operating system. Therefore they are slower to create & manage
compared to user threads. If the thread performs a blocking system call, the kernel can schedule
another thread in the application for execution
21. What are the requirements that a solution to the critical section problem must satisfy?
The three requirements are
Mutual exclusion
Progress
Bounded waiting
24. Give two hardware instructions and their definitions which can be used for
implementing mutual exclusion.
TestAndSet
boolean TestAndSet (boolean &target)
{
boolean rv = target;
target = true;
return rv;
}
Swap
void Swap (boolean &a, boolean &b)
{
boolean temp = a;
a = b;
b = temp;
}
25. What is semaphore? Mention its importance in operating system. (APRIL/MAY 2010,
NOV/DEC 2012)
A semaphore 'S' is a synchronization tool which is an integer value that, apart from initialization, is
accessed only through two standard atomic operations; wait and signal. Semaphores can be used to
deal with the n-process critical section problem. It can be also used to solve various Synchronization
problems.
26. How the mutual exclusion may be violated if the signal and wait operations are not
executed automatically. (MAY/JUNE 2014)
A wait operation atomically decrements the value associated with a semaphore. If two wait
operations are executed on a semaphore when its value is1, if the two operations are not performed
atomically, then it is possible that both operations might proceed to decrement the semaphore value,
thereby violating mutual exclusion
II Year / IV Sem 12
PANIMALAR INSTITUTE OF TECHNOLOGY DEPARTMENT OF IT
34. Write the four situations under which CPU scheduling decisions take place?
(MAY/JUNE 2014)
37. What are conditions under which a deadlock situation may arise? (MAY/JUNE 2009 ,
MAY/JUNE 2012, MAY/JUNE 2013) (NOV/DEC 2013)
A deadlock situation can arise if the following four conditions hold simultaneously in a system:
a. Mutual exclusion
b. Hold and wait
c. No pre-emption
d. Circular wait
40. What are the methods for handling deadlocks? (APRIL/MAY 2011)
The deadlock problem can be dealt with in one of the three ways:
1. Use a protocol to prevent or avoid deadlocks, ensuring that the system will never enter a
deadlock state.
2. Allow the system to enter the deadlock state, detect it and then recover.
3. Ignore the problem all together, and pretend that deadlocks never occur in the system.
41. How real-time Scheduling does differs from normal scheduling? (NOV/DEC 2012)
In a normal Scheduling, we have two types of processes. User process & kernel Process. Kernel
processes have time constraints. However, user processes do not have time constraints.
In a RTOS, all process are Kernel process & hence time constraints should be strictly followed. All
process/task (can be used interchangeably) are based on priority and time constraints are important
for the system to run correctly.
II Year / IV Sem 14
PANIMALAR INSTITUTE OF TECHNOLOGY DEPARTMENT OF IT
43. What is the concept behind strong semaphore and spinlock? (NOV/DEC 2015)
A spinlock is one possible implementation of a lock, namely one that is implemented by busy
waiting ("spinning"). A semaphore is a generalization of a lock (or, the other way around, a lock is a
special case of a semaphore). Usually, but not necessarily, spinlocks are only valid within one
process whereas semaphores can be used to synchronize between different processes, too.
A semaphore has a counter and will allow itself being acquired by one or several threads, depending
on what value you post to it, and (in some implementations) depending on what its maximum
allowable value is.
43. What is the meaning of the term busy waiting? (May/Jun 2016)
Busy waiting means that a process is waiting for a condition to be satisfied in a tight loop without
relinquish the processor. Alternatively, a process could wait by relinquishing the processor, and
block on a condition and wait to be awakened at some appropriate time in the future.
PART-B
1) Explain the FCFS, preemptive and non-preemptive versions of Shortest-Job First and Round
Robin (time slice = 2) scheduling algorithms with Gantt charts for the four Processes given. Compare
their average turnaround and waiting time. [E] (NOV/DEC 2012)
Process Arrival Time Waiting Time
P1 0 8
P2 1 4
P3 2 9
P4 3 5
2) Discuss how scheduling algorithms are selected for a system. What are the criteria considered?
Explain the different evaluation Methods.[An] (MAY/JUNE 2014)
3) Write in detail about several CPU scheduling algorithms. [An] (APRIL/MAY2011)
4) What is critical section? Specify the requirements for a solution to critical section problem. [An]
(NOV/DEC 2012)
5) How monitors help in process synchronization. [An] (NOV/DEC 2009)
6) Write in detail about deadlock avoidance. [U] (NOV/DEC 2009)
7) Write in detail about deadlock recovery. [U] (APRIL/MAY2011)
8) Explain the Banker algorithm for deadlock avoidance in detail with an example. [Ap]
(APRIL/MAY2010, NOV/DEC 2012) (NOV/DEC 2013)
9) Consider the following set of processes, with the length of the CPU – burst time given in
Milliseconds:
P5 5 2
The processes are arrived in the order P1, P2, P3, P4, P5, all at time 0.
1. Draw 4 Gantt charts illustrating the execution of these processes using FCFS, SJF Priority
and RR (Time Slice = 1) scheduling
2. What is the turnaround time of each process for each of the scheduling?
3. Calculate the waiting time for each of the process[E] (MAY/JUNE 2012)(NOV/DEC 2015)
11) (i) What is meant by critical section problem? Propose a solution based on bakery algorithm.
(ii) Consider the following snapshot of a system:
P0 – P4 are 5 processes present and A, B, C, D are the resources. The maximum need
of a Process and the allocated resources details are given in the table.
Answer the following based on banker’s algorithm.
(1) What is the content of NEED matrix?
(2) Is the system in a safe state?
(3) If a request from process P0 arrives for (0, 2, 0) can the request be granted immediately. [E]
12) Discuss the threading issues which are considered with multithreaded programs. [An]
(MAY/JUNE 2014)(APRIL/MAY2011, MAY/JUNE 2012)
13) Consider the following snapshot of a system:
P0-p4 are 5 processes present and A, B, C, D are the resources .The maximum need of a process
and the allocated resources details are given in the table.
Allocation Max Available
A B C D A B C D A B C D
II Year / IV Sem 16
PANIMALAR INSTITUTE OF TECHNOLOGY DEPARTMENT OF IT
P0 0 0 1 2 0 0 1 2 1 5 2 0
P1 1 0 0 0 1 7 5 0
P2 1 3 5 4 2 3 5 6
P3 0 6 3 2 0 6 5 2
P4 1 0 1 4 0 6 5 6
Answer the following based on banker’s algorithm
i) What is the content of NEED matrix?
ii) Is the system in a safe state?
iii) Which processes may cause deadlock if the system is not safe
iv)If a request from process p1 arrives for (0, 4, 3, 1) can the request be granted immediately?
Justify. [E] (MAY/JUNE 2014)
14) Discuss in detail the critical section problem and also write the algorithm for Readers-
Writers Problem with semaphores [An] (NOV/DEC 2013)
15) Explain the FCFS, preemptive and non-preemptive versions of Shortest-Job First and
Round Robin (time slice = 2) scheduling algorithms with Gantt charts for the four
Processes given. Compare their average turnaround and waiting time. [Ap] (APR/MAY 2015)
Process Arrival Time Waiting Time
P1 0 10
P2 1 6
P3 2 12
P4 3 15
16) Discuss how deadlocks could be detected in detail. [An] (APR/MAY 2015)
17) Show how wait() and signal() semaphore operations could be implemented in multiprocessor
environments using the test and set instruction. The solution should exhibit minimal busy waiting.
Develop pseudo code for implementing the operations. [An] (APR/MAY 2015)
18) Discuss about the issues to be considered in the multithreaded program. [An] (APR/MAY
2015)
19) (i) Explain thread and SMP management.
(ii) Illustrate Semaphores with neat example.
(iii) The operating system contains 3 resources, the number of instance of each resource type are 7, 7,
10. The current resource allocation state is as shown below:
Process Current Allocation Maximum Need
R1 R2 R3 R1 R2 R3
P1 2 2 3 3 6 8
P2 2 0 3 4 3 3
P3 1 2 4 3 4 4
COURSE OUTCOME: Ability to understand, design and analyze various process management
concepts such as scheduling algorithms, synchronization and deadlock algorithms.
UNIT III
STORAGE MANAGEMENT
COURSE OBJECTIVE: Ability to understand the need for memory management. Compare and
contrast various memory management schemes.
PART-A
1. Why page are sizes always powers of 2?
Recall that paging is implemented by breaking up an address into a page and offset number. It is
most efficient to break the address into X page bits and Y offset bits, rather than perform arithmetic
on the address to calculate the page number and offset. Because each bit 25 26 position represents a
power of 2, splitting an address between bits results in a page size that is a power of 2.
2. Consider a logical address space of eight pages of 1024 words each, mapped onto a physical
memory of 32 frames.
a. How many bits are there in the logical address?
b. How many bits are there in the physical address?
Each page/frame holds 1K; we will need 10 bits to uniquely address each of those 1024 addresses.
Physical memory has 32 frames and we need 25 bits to address each frame, requiring in total
5+10=15 bits. A logical address space of 64 pages requires 6 bits to address each page uniquely,
requiring 16bits in total.
a. Logical address: 13 bits
b. Physical address: 15 bits
3. In the IBM/370, memory protection is provided through the use of keys. A key is a 4-bit
quantity. Each 2K block of memory has a key (the storage key) associated with it. The CPU
also has a key (the protection key) associated with it. A store operation is allowed only if both
keys are equal, or if either is zero. Which of the following memory-management schemes could
be used successfully with this hardware?
a. Bare machine
b. Single-user system
c. Multiprogramming with a fixed number of processes
d. Multiprogramming with a variable number of processes
e. Paging
f. Segmentation
Answer:
a. Protection not necessary set system key to 0.
b. Set system key to 0 when in supervisor mode.
c. Region sizes must be fixed in increments of 2k bytes, allocate key with memory blocks.
d. Same as above.
II Year / IV Sem 18
PANIMALAR INSTITUTE OF TECHNOLOGY DEPARTMENT OF IT
II Year / IV Sem 19
PANIMALAR INSTITUTE OF TECHNOLOGY DEPARTMENT OF IT
Buddy System: - The buddy system allocates memory from a fixed size segment consists of physical
contiguous pages. Memory is allocated using power-of-2. This allocation satisfy request in units
sized as a power of 2.
Slab Allocation:- A Slab is made up of one or more physically contiguous pages. A cache consists
of one or more slabs. The slab allocation uses caches to store kernel Objects.
11. What is virtual memory? Mention its advantages. (NOV/DEC 2012)(MAY/JUNE 2014)
Virtual memory is a technique that allows the execution of processes that may not be completely
in memory. It is the separation of user logical memory from physical memory. This separation
provides an extremely large virtual memory, when only a smaller physical memory is available.
The main visible advantage of this scheme is that programs can be larger than physical memory.
14. Compare paging with segmentation with respect to the amount of memory required by the
address translation structures in order to convert virtual addresses to physical addresses.
Paging requires more memory overhead to maintain the translation structures. Segmentation
requires just two registers per segment: one to maintain the base of the segment and the other to
maintain the extent of the segment.
Paging on the other hand requires one entry per page, and this entry provides the physical address
in which the page is located.
Allows a process to select a replacement Each process select form only its own set
frame from the set of all frames, even if that of allocated frames
frame is currently allocated to some other
process
The number of frames allocated to a process The number of frames allocated to a
can change since a process may happen to process does not change
select only frames allocated to other
processes, thus increasing the number of
frames allocated to it
A process cannot control its own page-fault A process can control its own page-fault
rate rate
26. What are the common strategies to select a free hole from a set of available holes?
II Year / IV Sem 21
PANIMALAR INSTITUTE OF TECHNOLOGY DEPARTMENT OF IT
30. What is the various page replacement algorithms used for page replacement?
FIFO page replacement
Optimal page replacement
LRU page replacement
LRU approximation page replacement
Counting based page replacement
Page buffering algorithm.
31. Differentiate between Global and Local page replacement algorithms. (NOV/DEC 2012)
Global Page Replacement Algorithm Local Page Replacement Algorithm
Allows a process to select a replacement frame Each process select form only its own set of
from the set of all frames, even if that frame is allocated frames
currently allocated to some other process
The number of frames allocated to a process can The number of frames allocated to a process does
change since a process may happen to select only not change
frames allocated to other processes, thus
increasing the number of frames allocated to it
A process cannot control its own page-fault rate A process can control its own page-fault rate
II Year / IV Sem 22
PANIMALAR INSTITUTE OF TECHNOLOGY DEPARTMENT OF IT
38. Define demand paging in memory management. What are the steps required to handle a
page fault in demand paging. (Nov/Dec 2015)
A demand paging system is quite similar to a paging system with swapping where processes reside in
secondary memory and pages are loaded only on demand, not in advance. When a context switch
occurs, the operating system does not copy any of the old program’s pages out to the disk or any of
the new program’s pages into the main memory Instead, it just begins executing the new program
after loading the first page and fetches that program’s pages as they are referenced. While executing
a program, if the program references a page which is not available in the main memory because it
was swapped out a little ago, the processor treats this invalid memory reference as a page fault and
transfers control from the program to the operating system to demand the page back into the
memory.
39. How does the system detect thrashing? (May/Jun 2016)
Thrashing is caused by under allocation of the minimum number of pages required by a process,
forcing it to continuously page fault. The system can detect thrashing by evaluating the level of CPU
II Year / IV Sem 23
PANIMALAR INSTITUTE OF TECHNOLOGY DEPARTMENT OF IT
utilization as compared to the level of multiprogramming. It can be eliminated by reducing the level
of multiprogramming.
40. Name two differences between logical and physical addresses. (May/Jun 2016)
A logical address does not refer to an actual existing address; rather, it refers to an abstract address in
an abstract address space. Contrast this with a physical address that refers to an actual physical
address in memory. A logical address is generated by the CPU and is translated into a physical
address by the memory management unit(MMU). Therefore, physical addresses are generated by the
MMU.
PART-B
1. Describe the hierarchical paging technique for structuring page tables. (8) [An] (MAY/JUNE 2013)
2. What is the cause for thrashing? How does the system detect thrashing? Once it detects, what can the
system do to eliminate this problem? [An] (MAY/JUNE 2009)
3. Write in detail about Segmentation.[U] (NOV/DEC 2009)
4. Write in detail about Segmentation with Paging. [U] (APRIL/MAY2010)
5. Explain the segmentation with paging implemented in OS/2 32-bit IBM system. Describe the
following algorithms: [An] (APRIL/MAY2010)
a. First fit
b. Best Fit
c. Worst Fit
6. Explain how paging supports virtual memory. With a neat diagram explain how logical address is
translated into physical address. [An] (NOV/DEC 2012)
7. Explain the principles of segmented and paging implemented in memory with a diagram. [U]
(NOV/DEC2013)
8. Explain the segmentation with paging implemented in MULTICS system. [U]
9. Explain the various page table structures in detail. [U] (APRIL/MAY2011)(MAY/JUNE 2014)
10. Write short notes on LRU, FIFO and clock replacement strategies? [An] (APRIL/MAY2010,
APRIL/MAY2011)
11. Explain any four page replacement algorithms in detail? [An] (NOV/DEC 2009) (NOV/DEC 2013)
12. (i)Why page sizes are always powers of 2?
(ii)Consider the following segment table:
Segment Base Length
i. 0 0219 600
ii. 1 2300 14
iii. 2 090 100
iv. 3 1327 580
v. 4 1952 96 [Ap]
13. What are the physical addresses for the following logical addresses?
0430
110
2500
400
4112 [E]
14. What is thrashing? Explain the working set model in detail. [An] (MAY/JUNE 2009)
15. Given memory partitions of 100KB, 500KB, 200KB, 300KB and 600KB(in order), how would each
of the first-fit, best-fit and worst-fit algorithms place processes of212KB, 417KB, 12KB and
II Year / IV Sem 24
PANIMALAR INSTITUTE OF TECHNOLOGY DEPARTMENT OF IT
426KB(in order)? Which algorithm makes the most efficient use of memory? [Ap] (NOV/DEC
2008)
16. (i) Explain in briefly and compare, fixed and dynamic memory partitioning schemes.
(ii) Explain FIFO, optimal and LRU page replacement algorithms with an example reference Strings.
Mention the merits and demerits of each of the above algorithms. [An] (NOV/DEC 2012)
17. Consider the following page reference string (MAY/JUNE 2012) (APR/MAY 2015)
1,2,3,4,2,1,5,6,2,1,3,7,6,3,2,1,3,6.
How many page faults would occur for the following replacement algorithms, assuming one, two, three
and four frames?
LRU replacement
FIFO replacement
Optimal replacement [E]
18. (i) Consider the following page reference string:
2, 1, 0, 3, 4, 0, 0, 0, 2, 4, 2, 1, 0, 3, 2.
How many page faults would occur if the working set policy were used with a window size of 4?
Show when each page fault would occur clearly. [E]
(ii) What is meant by thrashing? Discuss in detail. [An] (MAY/JUNE 2013)
19. Explain the concept of demand paging in detail with neat diagram [U] (MAY/JUNE 2014)
20. Why are translation look-aside buffers important? Explain the details stored in a TLB table entry?
[An] (MAY/JUNE 2014)
21. Consider the following page reference string :
1,2,3,4,2,1,5,6,1,2,3,7,6,3,2,1,2,3,6.How Many page faults would occur for the LRU, FIFO, LFU
and optimal page replacement algorithms, assuming two and five frames? [E](MAY/JUNE 2014)
22. Explain the concept of demand paging and the performance issue of short process Explain the issue
of demand paging [An] (NOV/DEC 2013)
23. With a neat sketch, explain how logical address is translated into physical address using paging
mechanism? [An] (APR/MAY 2015)
24. Write short notes on Memory Mapped Files. [U] (APR/MAY 2015)
25. (i) Consider the following page reference string:
1,2,3,2,5,6,3,4,6,3,7,3,1,5,3,6,3,4,2,4,3,4,5,1
Indicate page faults and calculate total number of page faults and successful ratio for FIFO, optimal
and LRU algorithms. Assume there are four frames and initially all the frames are empty. [E]
(ii) Explain the effect of thrashing. [An] (NOV/DEC 2015)
26. Discuss the given memory management techniques with diagrams.
Partition Allocation Methods
Paging and Translation Look-aside Buffer. [An] (NOV/DEC 2015)
27. (i) Describe a mechanism by which one segment could belong to the address space of two different
processes.
(ii) Why are segmentation and paging sometimes combined into one scheme? Explain them in detail
with example. [An] (MAY/JUNE 2016)
28. (i) Under what circumstances do page faults occur? Describe the actions taken by the operating
system when a page fault occurs.
(ii) Discuss situations in which the least frequently used (LFU) page replacement algorithm generates
fewer page faults than the least recently used (LRU) page replacement algorithms. Also discuss
under that circumstances the opposite holds good. [An] (MAY/JUNE 2016)
COURSE OUTCOME: Ability to understand, design and analyze various process management
concepts such as scheduling algorithms, synchronization and deadlock algorithms. Ability to
II Year / IV Sem 25
PANIMALAR INSTITUTE OF TECHNOLOGY DEPARTMENT OF IT
understand the need for memory management. Compare and contrast various memory management
schemes.
UNIT IV
I/O SYSTEMS
SYLLABUS: Mass Storage Structure- Overview, Disk Scheduling and Management; File System
Storage-File Concepts, Directory and Disk Structure, Sharing and Protection; File System
Implementation- File System Structure, Directory Structure, Allocation Methods, Free Space
Management, I/O Systems.
COURSE OBJECTIVE: Ability to Design and Implement a prototype file system Implementation
and disk management
PART-A
1) What is a file?
A file is a named collection of related information that is recorded on secondary storage. A file
contains either programs or data. A file has certain "structure" based on its type.
3) What are the various file operations? (NOV/DEC 2012, APRIL/MAY 2015)
6) What is Directory?
The device directory or simply known as directory records information-such as name, location,
size, and type for all files on that particular partition. The directory can be viewed as a symbol table
that translates file names into their directory entries.
8) What are the most common schemes for defining the logical structure of a directory?
(MAY/JUNE 2012)
The most common schemes for defining the logical structure of directory
Single-Level Directory
Two-level Directory
Tree-Structured Directories
Acyclic-Graph Directories
General Graph Directory
v. I/O control
vi. Devices
12) What are the structures used in file-system implementation? (APRIL/MAY 2011)
Several on-disk and in-memory structures are used to implement a file system
On-disk structure include
Boot control block
Partition block
Directory structure used to organize the files
File control block (FCB)
In-memory structure include
In-memory partition table
In-memory directory structure
System-wide open file table
Per-process open table
20) How can the index blocks be implemented in the indexed allocation scheme?
The index block can be implemented as follows
L
inked scheme
Multilevel scheme
Combined scheme
23) What is the content of a typical file control block? (APR/MAY 2011, APR/MAY 2010)
File Control Block (FCB) is a file system structure in which the state of an open file is maintained.
File permissions
File dates (create, access,
write)
File owner, group, ACL
File size
File data blocks
24) What are the two types of system directories? (MAY/JUNE 2012)
Device directory, describing physical properties of files.
File directory, giving logical properties of the files.
Polling is the process where the computer waits for an external device to check for its readiness. The
computer does not do anything else than checking the status of the device .Polling is often used with
low-level hardware. Example: when a printer connected via a parallel port the computer waits until
the next character has been received by the printer. These processes can be as minute as only reading
1 Byte. Polling is the continuous (or frequent) checking by a controlling device or process of other
devices, processes, queues, etc.
26) State any three disadvantages of placing functionality in a device controller, rather than
in the kernel. (MAY/JUNE 2014)
Three advantages:-
a.Bugs are less likely to cause an operating system crash.
b.Performance can be improved by utilizing dedicated hardware and hard-coded algorithms.
The kernel is simplified by moving algorithms out of it.
Three disadvantages:
a.Bugs are harder to fix - a new firmware version or new hardware is needed
b.Improving algorithms likewise require a hardware update rather than just kernel or device driver
update
c.Embedded algorithms could conflict with application’s use of the device, causing decreased
performance.
27) How free-space is managed using bit vector implementation?
The free-space list is implemented as a bit map or bit vector. Each block is represented by 1 bit. If the
block is free, the bit is 1; if the block is allocated, the bit is 0.
29) What are the information contained in a boot control block and partition control block?
(MAY/JUNE 2014)
Boot control block:
Contain information needed by the system to boot an operating from that partition. If the disk
does not contain an operating system, this block can be empty. It is typically the first block of a
partition. In UFS, this is called the boot block.
Partition Control block:
Contains partition details, such as number of blocks in the partition, size of the blocks, free
block count and free block pointers, and free FCB count and FCB pointers.
II Year / IV Sem 30
PANIMALAR INSTITUTE OF TECHNOLOGY DEPARTMENT OF IT
33) Define rotational latency and disk bandwidth. (NOV/DEC 2010, MAY/JUNE 2013)
Rotational latency is the additional time waiting for the disk to rotate the desired sector to the disk
head.
Disk bandwidth is the total number of bytes transferred, divided by the time between the first
request for service and the completion of the last transfer.
libraries, and optical jukeboxes, accessible to servers so that the devices appear like locally attached
devices to the operating system.
42) What Characteristics determine the disk access speed? (MAY /JUNE 2012)
Seek time
Rotational latency
Command processing time
Settle time
43) Give the importance of Swap space Management. (NOV/DEC 2012, APR/MAY2010
NOV/DEC 2010)
Swap-space management: Swap-space management is low- level task of the operating system. The
main goal for the design and implementation of swap space is to provide the best throughput for the
virtual memory system.
Swap-space use: The operating system needs to release sufficient main memory to bring in a process
that is ready to execute. Operating system uses this swap space in various ways. Paging systems may
simply store pages that have been pushed out of main memory. UNIX operating system allows the
use of multiple swap spaces. These swap space are usually put on separate disks, so the load placed
on the I/O system by paging and swapping can be spread over the systems I/O devices.
Swap-space location: Swap space can reside in two places:
1. Separate disk partition
2. Normal file system
44) Write three basic functions which are provided by the hardware clocks and timers.
(APRIL/MAY 2011)
OSTickInit()
OSTimeSet()
OSTimeGet()
II Year / IV Sem 32
PANIMALAR INSTITUTE OF TECHNOLOGY DEPARTMENT OF IT
49) Draw the diagram for interrupt driven I/O cycle? (NOV/DEC 2014)
51) Identify the two important functions of Virtual File System(VFS) layer in the concept of
file system implementation. (Nov/Dec 2015)
Linux VFS provides a set of common functionalities for each files ystem, using function pointers
accessed through a table. The same functionality is accessed through the same table position for all
file system types, though the actual functions pointed to by the pointers may be files ystem-specific.
Common operations provided include open( ), read( ), write( ), and mmap( ).
II Year / IV Sem 33
PANIMALAR INSTITUTE OF TECHNOLOGY DEPARTMENT OF IT
bus master.
53) Why rotational latency is usually not considered in disk scheduling? (May/Jun 2016)
Most disks do not export their rotational position information to the host. Even if they did, the time
for this information to reach the scheduler would be subject to imprecision and the time consumed by
the scheduler is variable, so the rotational position information would become incorrect. Further, the
disk requests are usually given in terms of logical block numbers, and the mapping between logical
blocks and physical locations is very complex.
PART-B
1) Explain the different disk scheduling algorithms with examples. [An] (APRIL/MAY 2010,
MAY/JUNE 2012, APRIL/MAY 2011, MAY/JUNE 2013) (MAY/JUNE 2014)
2) Explain and compare FCFS, SSTF, C-SCAN and C-LOOK disk scheduling algorithms with
examples. [An] (NOV/DEC 2012)
3) Write short notes on disk management. [U] (NOV/DEC 2009)
4) Write short notes on file system in Linux. [U] (NOV/DEC 2009) (NOV/DEC 2014)
5) Write an elaborate note on RAID and RAID Levels. [U] (APRIL/MAY 2010, MAY/JUNE 2012,
NOV/DEC 2012, MAY/JUNE 2013)
6) Explain the services provided by Kernel I/O subsystem. [An] (APRIL/MAY 2010, APRIL/MAY
2011, NOV/DEC2012, MAY/JUNE 2013)
7) Consider the following I/O scenarios on a single-user PC.
A mouse used with a graphical user interface.
A tape drive on a multitasking operating system (assume no device preallocation is available)
A disk drive containing user files.
A graphics card with direct bus connection, accessible through memory-mapped I/O For each of
these I/O scenarios, would you design the operating system to use buffering, Spooling, caching, or a
combination? Would you use polled I/O, or interruption driven I/O? [An]
8) Write short notes on File types, File attributes, File operations [U]
20) Explain the data structures supported by kernel I/O system [U] (MAY/JUNE 2014)
21) Write a brief note on tertiary storage devices [U] (MAY/JUNE 2014)
22) Explain different directory implementation methods [U](NOV/DEC 2013)
23) Why disk scheduling is necessary? Explain the different seek optimization techniques [An]
(NOV/DEC 2013)
24) Explain about RAID structure in disk management with various RAID levels of organization in
detail [An] (Apr/May 2015)
25) Briefly discuss about the various directory structures. [An] (APR/MAY 2015)
26) Compare the functionalities of FCFS, SSTF, SCAN AND C-LOOK disk scheduling algorithms
with an example for each. [An] (APR/MAY 2015)
27) Write short notes on free space management. [U] (APR/MAY 2015, MAY/JUNE 2013)
28) (i) Discuss the functions of files and file implementation.
(ii) Explain free space management with neat example. [U] (Nov/Dec 2015)
29) On a disk with 200 cylinders, numbered 0 to 199, compute the number of tracks the disk arm must
move to satisfy the entire request in the disk queue. Assume the last request received was at truck 100.
The queue in FIFO order contains requests for the following tracks. 55, 58, 39, 18, 90, 160, 150, 38,
184. Perform the computation to find the seek time for the following disk scheduling algorithms.
FCFS
SSTF
SCAN
C-SCAN
LOOK [E] (Nov/Dec 2015)
30) (i) Why it is important to balance file-system I/O among the disks and controllers on a system in a
multitasking environment?
(ii) Discuss the advantages and disadvantages of supporting links to files that cross mount points.
[An] (MAY/JUNE 2016)
31) (i) Explain why logging metadata updates ensures recovery of a file system after a file-system
crash.
(ii) Could a RAID level 1 organization achieve better performance for read requests than a RAID
level 0 organization? If so, how? [An] (MAY/JUNE 2016)
COURSE OUTCOME: Ability to understand, design and analyze various process management
concepts such as scheduling algorithms, synchronization and deadlock algorithms. Ability to Design
and Implement a prototype files system Implementation and disk management.
UNIT V
CASE STUDY
II Year / IV Sem 35
PANIMALAR INSTITUTE OF TECHNOLOGY DEPARTMENT OF IT
COURSE OBJECTIVE: Learn the basics of Linux system and perform administrative tasks on
Linux Servers
PART-A
1) What is Linux distribution?
A Linux distribution includes all the standard components of the Linux system, plus a set of
administrative tools to simplify the initial installation and subsequent upgrading of Linux and
manage installation and removal of other packages on the system.
5) Define DNS
The domain name system(DNS) provides host-name-to-network-address translations for the entire
Internet. Before DNS became widespread, files containing the same informationwere sent via e-mail
or ftp between all networked hosts.
6) What is virtualization?
Virtualization, in computing, refers to the act of creating a virtual (rather than actual) version of
something, including but not limited to a virtual computer hardware platform, operating system (OS),
storage device, or computer network resources.
II Year / IV Sem 36
PANIMALAR INSTITUTE OF TECHNOLOGY DEPARTMENT OF IT
functions, and password-changing functions (so that, when users change their passwords, all the
necessary authentication mechanisms can be updated at once).’
12) Enumerate the requirements for Linux system administrator. Brief any one. (Nov/Dec 2015)
1. While specific knowledge is a boon, most hiring managers require that you possess basic
knowledge about all aspects of Linux. For example, a little knowledge about Solaris, BSD, nginx
or various flavors of Linux never hurt anyone!
2. Knowledge in at least one of the upper tier scripting language is a must. You have options
before you, for instance, Python, Perl, Ruby or more, but you need to make yourself proficient in
at least one of them.
3. Experience is welcome, but you at least need to have some hands-on experience of system
management, system setup and managing Linux or Solaris based servers as well as configuring
them.
4. Knowledge in shell programming and architecture is valued very much in the job market. If
you know Buorne or Korn well, you can even score a high-paying salary with minimal
experience.
5. Storage technologies like FC, NFS or iSCSI is great, while knowledge regarding backup
technologies is a must for a system administrator.
II Year / IV Sem 37
PANIMALAR INSTITUTE OF TECHNOLOGY DEPARTMENT OF IT
System libraries: The system libraries define a standard set of functions through which
applications can interact with the kernel. These functions implement much of the operating-
system functionality that does not need the full privileges of kernel code.
System utilities: The system utilities are programs that perform individual, specialized
management tasks. Some system utilities are invoked just once to initialize and configure
some aspect of the system.
II Year / IV Sem 38
PANIMALAR INSTITUTE OF TECHNOLOGY DEPARTMENT OF IT
COURSE OUTCOMES
CO-PSO MATRIX:
II Year / IV Sem 39