You are on page 1of 6

NPTEL Online Certification Courses

Indian Institute of Technology Kharagpur

Cloud Computing
Assignment- Week 0
TYPE OF QUESTION: MSQ
Number of questions: 10 Total mark: 10 X 1 = 10

QUESTION 1:

One of the header fields in an IP datagram is the Time to Live (TTL) field. Which of the
following statements best explains the need for this field?

(a) It can be used to prioritize packets


(b) It can be used to reduce delays
(c) It can be used to optimize throughput
(d) It can be used to prevent packet looping

Correct Answer: d.

Time to Live can be thought as an upper bound on the time that an IP datagram can exist
in the network. The purpose of the TTL field is to avoid a situation in which an undeliverable
datagram keeps circulating.

QUESTION 2:

Threads of a process share

(a) global variables but not heap.


(b) heap but not global variables.
(c) neither global variables nor heap.
(d) both heap and global variables.

Correct Answer: (d)

Thread share all other resources process except local data like – register, stack.
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur

QUESTION 3:
Consider the following statements about process state transitions for a system using
preemptive scheduling.
I. A running process can move to ready state.
II. A ready process can move to ready state.
III. A blocked process can move to running state.
IV. A blocked process can move to ready state.
Which of the above statements are TRUE?
(a) II and III only
(b) I, II and III only
(c) I, II, III and IV
(d) I, II and IV only

Correct Answer: d

Refer process diagram in operating system.

QUESTION 4:

Frames of 1000 bits are sent over a 10^6 bps duplex link between two hosts. The
propagation time is 25ms. Frames are to be transmitted into this link to maximally pack
them in transit (within the link).
What is the minimum number of bits (i) that will be required to represent the sequence
numbers distinctly? Assume that no time gap needs to be given between transmission of
two frames.
(a) i=2
(b) i=3
(c) i=4
(d) i=5

Correct Answer: d

Transmission delay for 1 frame = 1000/(10^6) = 1 ms


Propagation time = 25 ms
The sender can atmost transfer 25 frames before the first frame reaches the destination.
The number of bits needed for representing 25 different frames = 5
QUESTION 5:
Which of the following system calls results in the sending of SYN packets?
(a) socket
(b) connect
(c) listen
(d) bind

Correct Answer: b

socket() creates a new socket of a certain socket type, identified by an integer number, and
allocates system resources to it. bind() is typically used on the server side, and associates
a socket with a socket address structure, i.e. a specified local port number and IP address.
listen() is used on the server side, and causes a bound TCP socket to enter listening state.
connect() is used on the client side, and assigns a free local port number to a socket. In
case of a TCP socket, it causes an attempt to establish a new TCP connection.

QUESTION 6:

If a class B network on the Internet has a subnet mask of 255.255.248.0, what is the
maximum number of hosts per subnet?

(a) 1022
(b) 2048
(c) 2046
(d) 2047

Correct Answer: c

The binary representation of subnet mask is 11111111.11111111.11111000.00000000.


There are 21 bits set in subnet. So 11 (32-21) bits are left for host ids. Total possible values
of host ids is 2^11 = 2048. Out of these 2048 values, 2 addresses are reserved. The address
with all bits as 1 is reserved as broadcast address and address with all host id bits as 0 is
used as network address of subnet.

In general, the number of addresses usable for addressing specific hosts in each network
is always 2^N – 2 where N is the number of bits for host id.

QUESTION 7:

Consider a system with 3 processes that share 4 instances of the same resource type.
Each process can request a maximum of K instances. Resource instances can be
requested and released only one at a time. The largest value of K that will always avoid
deadlock is _________.
a. 6
b. 3
c. 5
d. 2
Correct Answer: d.

No. of process = 3
No. of resources = 4
Let’s distribute each process one less than maximum demands i.e., (k-1) resources.
So, for three processes, 3(k – 1) resources.
For deadlock avoidance provide an additional resource to any one of the process.
∴ Total resources required to avoid deadlock in any case is 3(k – 1) + 1 = 3k – 2
Now this 3k – 2 should be less than equal to available no. of resources, i.e.,
3k – 2 ≤ 4
k≤2
So maximum value of k = 2

QUESTION 8:

A direct mapped cache memory of 1 MB has a block ize of 256 bytes. The cache has an
access time of 3 ns and a hit rate of 94%. During a cache miss, it takes 20 ns to bring the
first word of a block from the main memory, while each subsequent word takes 5 ns. The
word size is 64 bits. The average memory access time in ns (round off to 1 decimal place)
is _____.

(a) 13.5
(b) 12.8
(c) 121
(d) 81

Correct Answer: a.

Cache access time = 3 ns


Hit ratio of cache=0.94
Word size is 64 bits = 8 bytes.
Cache line size = 256 bytes = 32 words
Main memory access time=20ns(time for first word)+155ns(time for remaining 31 words,
31*5=155ns) = 175 ns
Average access time = h1*t1+(1-h1)(t1+t2) = t1+(1-h1)t2
⇒ 3+(0.06)(175) = 13.5 ns

QUESTION 9:
A RAM chip has a capacity of 1024 words of 8 bits each (1K × 8). The number of 2 × 4
decoders with enable line needed to construct a 16K × 16 RAM from 1K × 8 RAM is:
(a) 4
(b) 5
(c) 6
(d) 7
Correct Answer: b.

RAM chip size = 1k ×8[1024 words of 8 bits each]


RAM to construct =16k ×16
Number of chips required = (16k x 16)/ ( 1k x 8) = (16 x 2)
[16 chips vertically with each having 2 chips horizontally]
So to select one chip out of 16 vertical chips, we need 4 x 16 decoder.
Available decoder is 2 x 4 decoder
To be constructed is 4 x 16 decoder

Hence 4 + 1 = 5 decoders are required.

QUESTION 10:
The following C program is executed on a Unix/Linux system:
#include <unistd.h>
int main ()
{
int i ;
for (i=0; i<10; i++)
if (i%2 == 0) fork ( ) ;
return 0 ;
}
The total number of child processes created is _____.
(a) 31
(b) 33
(c) 21
(d) 28
Correct Answer: a.
Fork( ) statement is executed when 'i' is even. Thus the above code is equivalent to
#include
int main( )
{
int i;
fork( );
fork( );
fork( );
fork( );
fork( );
}
n - fork statements will have 2^n-1 child.
Hence, n = 5 ⇒ We have 31 child processes.

************END***********

You might also like