Wednesday, March 23, 2011

Computer Network Questions and Answers

1. The IP datagram for a TCP ACK message is 40 bytes long: It contains 20 bytes of TCP header and 20 bytes of IP header. Assume that this ACK is traversing an ATM network that uses AAL5 to encapsulate IP packets. How many ATM layer packets will it take to carry the ACK for each of AAL layer?
a. AAL5
b. AAL3/4
ANS
a)) The length of the AAL5 CS-PDU into which the ACK is encapsulated is exactly 48 bytes, and this fits into a single ATM cell.
b)) When AAL3/4 is used the CS-PDU is again 48 bytes, but now the per-cell payload is only 44 bytes and two cells are necessary.

2. Suppose there are N stations on a LAN that has capacity (transmission rate) C. All packets have a fixed length L and the end-to-end propagation delay of the channel is P. If only one station ever has a message to send (i.e., the other N-1 stations generate no traffic). What is the maximum possible throughput seen by this single node under each of the protocols:
a. CSMA
Assuming that the station senses the channel immediately after finishing its transmission, and finding it idle, sends another packet, the throughput is C. Note that this ignores the overhead time needed to do channel sensing.

b. Slotted Aloha
Assuming the station always has data to send, it will always to do under slotted Aloha, so the throughput would be C.

c. Token Passing
After sending a message, a station gives up the token. The token circulates around the ring (taking time P). Assuming that L is the amount of time needed to transmit a message, the throughput is thus (L/(L+PC))*C.


3. Consider sending a 1500-byte datagram into a link that has an MTU of 500 bytes. Suppose the original datagram is stamped with the identification number 1. Assume that IPv4 is used.
a. Where does fragmentation happen? Where are the fragments reassembled?
Fragmentation happens in the router preceding the link with the small MTU. The fragments are reassembled in the end system.

b. How many fragments are generated?
The maximum size of the data field in each fragment = 480 (because there are 20 bytes IP header). Thus the number of required fragments= 1500-20/480 = 4

c. What are the values of the fragmentation-related fields in the generated IP datagram(s)?
Each fragment will have an identical identification number. Each fragment except the last one will be of size 500 bytes (including the IP header). The last datagram will be of size 60 bytes (including the IP header). The offsets of the 4 fragments will be 0, 60, 120, 180. Each of the first 3 fragments will have flag=1; the last fragment will have flag=0.

d. What changes if IPv6 were used?
The router preceding the link with the small MTU will drop the packet and send an ICMP error message “Packet Too Big” back to the source. The source is responsible for adjusting the packet size.

4. Consider building a CSMA/CD network running at 1 Gbps over a 1-km cable with no repeaters. The signal speed in the cable is 200,000 km/sec. What is the minimum frame size?
ANS
For a 1-km cable, the one-way propagation time is 5 μsec, so 2τ = 10 μsec. To make CSMA/CD work, it must be impossible to transmit an entire frame in this interval. At 1 Gbps, all frames shorter than 10,000 bits can be completely transmitted in under 10 μsec, so the minimum frame is 10,000 bits or 1250 bytes

5. In the CSMA/CD protocol, what condition on the transmission delay Ttrans and the propagation delay Tprop has to be satisfied to guarantee that a node always detects a collision?
ANS Ttrans>2Tprop


6. At low load, consider the delay of pure ALOHA versus slotted ALOHA. Which one is less? Explain your answer.
ANSWith pure ALOHA, transmission can start instantly. At low load, no collisions are expected so the transmission is likely to be successful. With slotted ALOHA, it has to wait for the next slot. This introduces half a slot time of delay.

Tuesday, March 22, 2011

Operating System Questions

1. Define operating system (MU AP-96)
An operating system is a set of program that controls, co-ordinates and supervises the activities of the computer hardware and software.

2. What is the role of an os?

An OS acts as an interface between the user and the computer. It acts as The manager of the resources of the computer.

3. Write the functions of an OS(BU Ap-97)

(i) Memory Management.
(ii) Processor management.
(iii) Interrupt Handling.
(iv) Accounting.
(v) Automatic job sequencing.
(vi) Management and control of I/O devices

4. What is the need for an OS?
A medium is needed to communicate between the user and the m/c. An OS acts as a medium of interface

5. What are the characteristics of an OS(MSU Ap-96)
(i) User friendly .
(ii) Keep track of the status of eaCH RESOURCE.
(iii) Allows sharing of resources(H/W and S/W).
(iv) Provides adequate security.
(v) Protection.

6. What is a process?
A process is basically a program in execution. It is the unit of work in a Modern operating system.


7. What is meant by a process state?
When a process executes, it changes, its status. This is known as process's State.

8. What are the various process states ?

The various process states are
(i) new
(ii) ready
(iii) running
(iv) suspended
(v) terminated

9. How does a process differ from a job?(BDU Ap-96).
A process is an active entity with a program counter specifying the next instructions to execute and a set to associated resources, whereas a batch System executes jobs.(which is a collection of processes).

10. Differentiate program and a process?
A process is a program in execution(ie) A program is a passive entity, Where as a process is an active entity.


11. What is process control Block?
Each process is represented in the operating system by a process control Block(PCB) also called a task control block.

12. What is the function of a process control block?
A (PCB) contains many pieces of information associated with a specific Process. It serves as the repository for any information that may vary From process to process.


13. What are the information contained in a PCB?
A PCB contains pieces of information associated with a specific process, Namely

(i) process state
(ii) program counter
(iii) CPU register
(iv) CPU scheduling information
(v) Memory management information
(vi) Accounting information
(vii) I/O status information

14. What are the operations on process?
(i) create a process
(ii) destroy a process
(iii) suspend a process
(iv) resume a process
(v) change the priority of a process
(vi) block a process
(vii) wakeup a process
(viii) dispatch a process
(ix) enable a process to communicate with another

15. What are the operation involved in creating a process?
(i) name the process
(ii) insert it in the system’s known processes list(or) process table.
(iii) Determine the process’s initial priority
(iv) Create the process control block
(v) Allocate the process’s initial resource.

16. What is the nucleus or kernel of an operating system?

Kernel is the part of the OS which directly makes interface with the Hardware system.

17. What are the main functions of the kernel?

To provide mechanism for
(i) creation and deletion of processes
(ii) inter process communication
(iii) synchronization of processes.

18. What are the components of an OS?
OS which is a collection of programs are of 2 types
(i) control program
(ii) supervisory program


19. What is multi programming?
The ability of keeping several jobs in the memory at one time, where The cpu is switched back and forth among them is called as Multi programming

20. What is the use of Multi Programming ?
Multi programming helps to increase CPU utilization, and to decrease the total time needed to execute the jobs.

21. Illustrate the factors that usually determine the degree of Multi Programming
(MSU: Nov-96)
(i) The number of Programs residing in Primary memory.
(ii) Passing of the control of the CPU rapidly between these programs.
(iii) Protection of user process from one another.

Search Aptipedia