Beruflich Dokumente
Kultur Dokumente
It is a linear list in which insertion and deletion will take place in different end. As shown in
figure 1.6 the end where we insert an element is called the rear end and deletion at front end.
The element entered first need to be removed first, so it is also called as first- in first- out
(FIFO).
5) Sparse graph: Graphs are said to be sparse if the number of edges is far less than |V |2 i.e.
|E| << |V |2.
6) Acyclic graph: It is defined as a graph with no path and starts and ends at the same vertex.
An acyclic undirected graphic is like a tree.
Directed Acyclic graph (DAG) is a directed graph with no path that starts and ends at the same
vertex. It is also known as oriented acyclic graph.
7) Graph with isolated vertices: If a vertex is not adjacent to any other vertices in a graph,
then such type of vertex is known as Isolated Vertex.
8) Null graph: A graph containing only isolated vertices is called Null Graph.
9) Strongly connected graph: A directed graph G is said to be strongly connected if for each
pair (v1, v2) of nodes in G there is a path from v1 to v2 and there is also a path from v2 to v1.
Whereas G is said to be unilaterally connected graph if for any pair (u, v) of nodes in G, there is a
path from u to v or a path v to u.
10) Unilaterally connected graph: A graph is said to be Unilaterally connected graph if for
any pair (v1,v2) of nodes in G, there is a path from v1 to v2 or a path from v2 to v1. .
5 Explain
1. Fixed block storage allocation.
2. Variable block storage allocation [5+5] = 10
Answer:
Fixed block storage allocation
First block storage allocation is the simplest case of dynamic storage allocation. This is the
straight forward method in which, all the blocks are of identical in size. The user can decide the
size of the block. The operating system keeps a pointer called AVAIL. This pointer points to
memory as shown in figure 10.1.
AVAIL
FIXED
NODE
SIZE
Procedure RETURNNODE(ptr)
Ptr1=AVAIL
While(ptr1.LINK is not NULL)
Ptr1=ptr1.LINK
Ptr1.LINK=ptr
Ptr.LINK=NULL
Procedure RETURNNODE() used to return back the used memory to the AVAIL list, it will be
added at the end of the list as shown in the figure 10.3.
Figure 10.4: Availing a node from a pool with variable sized blocks.
Procedure GETNODE(NODE)
If (AVAIL=NULL) then
Print Memory is insufficient
Exit.
Endif
Ptr=AVAIL
While (ptr.LINK is not NULL) and
(ptr.SIZE<SIZEOF(NODE)) do
ptr1=ptr
ptr=ptr.LINK
Endwhile
if (ptr.LINK is NULL) and
(ptr.SIZE<SIZEOF(NODE)) then
Print Memory request is too large: unable to serve
Else
Ptr1.LINK=ptr.LINK
Return (ptr)
Endif
Exit
This procedure assumes the blocks of memory are stored in ascending order of their sizes. The
node structure maintains a field to store the size of the block, namely SIZE. SIZEOF() is a
method that will return the size of the node. The above procedure initially check for the NULL
status of AVAIL list and proceeds with the search for the exact size of block which is requested
and return the same, if the pool does not have the requested size it will return the bigger size of
block.
Procedure RETURNNODE(ptr)
Ptr1=AVAIL
While (ptr1.SIZE < ptr. SIZE) and (ptr1.LINK NULL) do
Ptr2=ptr1
Ptr1=ptr.LINK
Endwhile
If (ptr.SIZE <ptr1.SIZE) then
Ptr2.LINK =ptr
Ptr.LINK=ptr1
Else
Ptr1.LINK=ptr
Ptr.LINK=NULL
Endif
Exit
Procedure RETURNNODE() will return the used block of memory to the memory pool. While
returning unless like fixed block, it searches for the size the existing pool where it can be
inserted. Because we assume that the free pool memory blocks are arranged in ascending order.
So while returning, procedure will find the place according the size of the returning block and
the same will be inserted into the memory pool.
6 What is the use of external Storage Devices? Explain any two external storage
devices [4+3+3]=10
Answer:
An external storage device may be defined as device other than the main memory on which
information or data can be stored and from which the information retrieved for processing.
External storage devices are having larger capacities and fewer expenses to store compared to
main memory.
Primary uses of external storage devices are:
Backup or overlay of program during execution.
Storage of programs, subprograms and data.
Storage of information in files.
Magnetic drums
A magnetic drum, is a direct-access or random-access storage device, also referred to as drum.
is a metal cylinder coated with magnetic iron-oxide material on which data and programs can be
stored. Magnetic drums were once used as a primary storage device but have since been
implemented as auxiliary storage devices.
The tracks on a magnetic drum are assigned to channels located around the circumference of the
drum, forming adjacent circular bands that wind around the drum. A single drum can have up to
200 tracks. As the drum rotates at a speed of up to 3,000 rpm, the device's read/write heads
deposit magnetized spots on the drum during the write operation and sense these spots during a
read operation. This action is similar to that of a magnetic tape or disk drive.
Unlike some disk packs, the magnetic drum cannot be physically removed. The drum is
permanently mounted in the device. Magnetic drums are able to retrieve data at a quicker rate
than tape or disk devices but are not able to store as much data as either of them.
A magnetic drum differs from a magnetic disk in that the tracks in which the data is stored are
assigned to channels located around the circumference of the drum as shown in figure 12.2. That
is, the channels form circular bands around the drum. The coded representation of data in figure
12.2 is similar to that used on 9-track magnetic tape, 8-bit code. The basic functions of the
read/write heads are to place magnetized spots (those little binary 0's and 1's) on the drum
during a writing operation and to sense these spots during a reading operation. The read/write
heads of a drum perform in a manner similar to the read/write heads of a magnetic tape unit or
disk drive unit.
The tracks on each channel are grouped into sectors. It is almost like the format used on disk
packs when referring to tracks (or cylinders) and sectors. As the drum rotates, the reading or
writing occurs when the specified sector of a given channel passes under the read/write head for
that channel. Some drums are mounted in a horizontal position, while others are mounted in a
vertical position. Another major difference in the design is the number of read/write heads.
Some drums use only one read/write head, which services all channels on the drum. In this case,
the head moves back and forth (or up and down) over the surface of the drum as required. Other
drums, using multiple read/write heads, have one principal advantage over drums with the
single-head type. Since one read/write head is assigned to each channel, no read/write head
movement is required. That is, the time required for head positioning is zero. The only
significant time required when reading or writing is the rotational delay that occurs in
reaching a desired record location.