Professional Documents
Culture Documents
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?
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:
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
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
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
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.
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.
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***********