Professional Documents
Culture Documents
Scheme & Solutions: Q. No. Marks 1. (A) 01
Scheme & Solutions: Q. No. Marks 1. (A) 01
Q. No. Marks
1.(a) The virtual machine is to abstract the hardware of a single computer (the CPU, 01
memory, disk drives, network interface cards, and so forth) into several different
execution environments, thereby creating the illusion that each separate
execution environment is running its own private computer.
By using CPU scheduling and virtual-memory techniques, an operating system
can create the illusion that a process has its own processor with its own (virtual)
memory. The virtual machine provides an interface that is identical to the
underlying bare hardware.
Implementation details 03
Benefits 01
(b)
02
A system can be made modular in many ways. Qne method is the layered 04
approach, in which the operating system is broken in to number of layers. The
bottom layer is hardware, the highest layer is user interface. An operating-
system layer is an implementation of an abstract object made up of data and the
operations that can manipulate those data. A typicaloperating-system layer-say,
layer M -consists of data structures and a set of routines that can be invoked by
higher-level layers. Layer M, in turn, can invoke operations on lower-level
layers.
The main advantage of the layered approach is simplicity of construction and 04
debugging. The layers are selected so that each uses functions and services of
only lower-level layers. This approach simplifies debugging and system
verification. The first layer can be debugged without any concern for the rest of
the system, because, by definition, it uses only the basic hardware to implement
its functions. Once the first layer is debugged, its correct functioning can be
assumed while the second layer is debugged, and so on. If an error is found
during the debugging of a particular layer, the error must be on that layer,
because the layers below it are already debugged. Thus, the design and
implementation of the system are simplified. Each layer is implemented with
only those operations provided by lower level
layers. A layer does not need to know how these operations are implemented; it
needs to know only what these operations do. Hence, each layer hides the
existence of certain data structures, operations, and hardware from higher-level
layers.
1
2.(a) a. four Gantt charts 04
b. Turnaround time
FCFS RR SJF Priority 04
P1 10 19 19 16
P2 11 2 1 1
P3 13 7 4 18
P4 14 4 2 19
P5 19 14 9 6
c. Waiting time (turnaround time minus burst time)
FCFS RR SJF Priority
P1 0 9 9 6 04
P2 10 1 0 0
P3 11 5 2 16
P4 13 3 1 18
P5 14 9 4 1
(b)
01
explanation 02
2
Dining Philosophers problem 03
(b) a.The values of Need for processes P0 through P4 respectively are (0, 0, 0, 0), 06
(0, 7, 5, 0), (1,0, 0, 2), (0, 0, 2, 0), and (0, 6, 4, 2).
b. Yes.With Available being equal to (1,5, 2, 0), either process P0 or P3 could 02
run. Once process P3 runs, it releases its resources which allow all other existing
processes to run.
c. Yes it can. This results in the value of Available being (1, 1, 0, 0).One 02
ordering of processes that can finish is P0, P2, P3, P1, and P4.
3
03+03
5.(a) External fragmentation exists when there is enough total memory space to
satisfy a request but the available spaces are not contiguous; storage is 03
fragmented into a large number of small holes.
The memory allocated to a process may be slightly larger than the requested
memory. The difference between these two numbers is internal fragmentation
unused memory that is internal to a partition.
(b)
02
Explanation 04
(c) The program could have a large code segment or use large sized arrays as data. 06
4
These portions of the program could be allocated to larger pages, thereby
decreasing the memory overheads associated with a page table. The virtual
memory system would then have to maintain multiple free lists of pages for the
different sizes and should also need to have more complex code for address
translation to take into account different page sizes.
6.(a) Common techniques used for structuring the page table are:
Hierarchical Paging 03
Hashed page table 03
Inverted page table 03
(b) Effective access time = (0.8) × (1 _sec) 06
+ (0.1) × (2 _sec) + (0.1) × (5002 _sec)
= 501.2 _sec
= 0.5 millisec
7.(a)
02
(b) The advantage is that while accessing a block that is stored at the middle of a 07
file, its location can be determined by chasing the pointers stored in the FAT as
opposed to accessing all of the individual blocks of the file in a sequential
manner to find the pointer to the target block. Typically, most of the FAT can be
cached in memory and therefore the pointers can be determined with just
memory accesses instead of having to access the disk blocks.