Friday, March 28, 2008

Dividing Hosts into Groups


Hierarchical Addressing

To be able to divide networks, we need hierarchical addressing. A hierarchical address uniquely identifies each host. It also has levels that assist in forwarding packets across internetworks, which enables a network to be divided based on those levels.

To support data communications between networks over internetworks, Network layer addressing schemes are hierarchical.

As shown in the figure, postal addresses are prime examples of hierarchical addresses.

Consider the case of sending a letter from Japan to an employee working at Cisco Systems, Inc.

The letter would be addressed:

Employee Name

Cisco Systems, Inc.

170 West Tasman Drive

San Jose, CA 95134

USA

When a letter is posted in the country of origin, the postal authority would only look at the destination country and note that the letter was destined for the U.S. No other address details need to be processed at this level.Upon arrival in the U.S., the post office first looks at the state, California. The city, street, and company name would not be examined if the letter still needed to be forwarded to the correct state. Once in California, the letter would be directed to San Jose. There the local mail carrier would take the letter to West Tasman Drive, and then refer to the street address and deliver it to 170. When the letter is actually on Cisco premises, the employee name would be used to forward it to its ultimate destination.

Referring only to the relevant address level (country, state, city, street, number, and employee) at each stage when directing the letter onto the next hop makes this process very efficient. There is no need for each forwarding stage to know the exact location of the destination; the letter was directed in the general direction until the employee's name was finally used at the destination.

Hierarchical Network layer addresses work in much the same way. Layer 3 addresses supply the network portion of the address. Routers forward packets between networks by referring only to the part of the Network layer address that is required to direct the packet toward the destination network. By the time the packet arrives at the destination host network, the whole destination address of the host will have been used to deliver the packet.

If a large network needs to be divided into smaller networks, additional layers of addressing can be created. Using a hierarchical addressing scheme means that the higher levels of the address (similar to the country in the postal address) can be retained, with the middle level denoting the network addresses (state or city) and the lower level the individual hosts.

OSI Network Layer


IPv4 Packet Header



Typical IP Packet
The figure represents a complete IP packet with typical header field values.
Ver = 4; IP version.
IHL = 5; size of header in 32 bit words (4 bytes). This header is 5*4 = 20 bytes, the minimum valid size.
Total Length = 472; size of packet (header and data) is 472 bytes.
Identification = 111; original packet identifier (required if it is later fragmented).
Flag = 0; denotes packet can be fragmented if required.
Fragment Offset = 0; denotes that this packet is not currently fragmented (there is no offset).
Time to Live = 123; denotes the Layer 3 processing time in seconds before the packet is dropped (decremented by at least 1 every time a device processes the packet header).
Protocol = 6; denotes that the data carried by this packet is a TCP segment .

Thursday, March 27, 2008

TCP Acknowledgement With Windowing


Confirming Receipt of Segments


One of TCP's functions is making sure that each segment reaches its destination. The TCP services on the destination host acknowledge the data that it has received to the source application.
The segment header sequence number and acknowledgement number are used together to confirm receipt of the bytes of data contained in the segments. The sequence number indicates the relative number of bytes that have been transmitted in this session including the bytes in the current segment. TCP uses the acknowledgement number in segments sent back to the source to indicate the next byte in this session that the receiver expects to receive. This is called expectational acknowledgement.
The source is informed that the destination has received all bytes in this data stream up to, but not including, the byte indicated by the acknowledgement number. The sending host is expected to send a segment that uses a sequence number that is equal to the acknowledgement number.
Remember, each connection is actually two one-way sessions. Sequence numbers and acknowledgement numbers are being exchanged in both directions.
In the example in the figure, the host on the left is sending data to the host on the right. It sends a segment containing 10 bytes of data for this session and a sequence number equal to 1 in the header.
The receiving host on the right receives the segment at Layer 4 and determines that the sequence number is 1 and that it has 10 bytes of data. The host then sends a segment back to the host on the left to acknowledge the receipt of this data. In this segment, the host sets the acknowledgement number to 11 to indicate that the next byte of data it expects to receive in this session is byte number 11.
When the sending host on the left receives this acknowledgement, it can now send the next segment containing data for this session starting with byte number 11.
Looking at this example, if the sending host had to wait for acknowledgement of the receipt of each 10 bytes, the network would have a lot of overhead. To reduce the overhead of these acknowledgements, multiple segments of data can be sent before and acknowledged with a single TCP message in the opposite direction. This acknowledgement contains an acknowledgement number based on the total number of bytes received in the session.
For example, starting with a sequence number of 2000, if 10 segments of 1000 bytes each were received, an acknowledgement number of 12001 would be returned to the source.
The amount of data that a source can transmit before an acknowledgement must be received is called the window size. Window Size is a field in the TCP header that enables the management of lost data and flow control.

TCP/IP Model


Tranasport Layer


Resequencing Segments to Order Transmitted


When services send data using TCP, segments may arrive at their destination out of order. For the original message to be understood by the recipient, the data in these segments is reassembled into the original order. Sequence numbers are assigned in the header of each packet to achieve this goal.
During session setup, an initial sequence number (ISN) is set. This initial sequence number represents the starting value for the bytes for this session that will be transmitted to the receiving application. As data is transmitted during the session, the sequence number is incremented by the number of bytes that have been transmitted. This tracking of data byte enables each segment to be uniquely identified and acknowledged. Missing segments can be identified.
Segment sequence numbers enable reliability by indicating how to reassemble and reorder received segments, as shown in the figure.
The receiving TCP process places the data from a segment into a receiving buffer. Segments are placed in the proper sequence number order and passed to the Application layer when reassembled. Any segments that arrive with noncontiguous sequence numbers are held for later processing. Then, when the segments with the missing bytes arrive, these segments are processed.

Tuesday, March 18, 2008

Operating System concepts

Round Robin Scheduling
The round robin Scheduling algorithm is designed especially for time sharing systems. A small unit of time, called time quantum, or a time slice. The ready queue is treated as a circular queue. The CPU scheduler goes around the ready queue, allocating the CPU to each process for a time interval of up to 1 time quantum.
To implement RR scheduling the ready queue as a FIFO queue of process. New process are added to the tail of the ready queue. The CPU scheduler picks the first process from the ready queue ,sets a timer to interrupt after 1 time quantum, and dispatches the process.

The average waiting time under the RR policy, however, is often quite long.
Consider the following set of processes that arrive at time 0,with the length of the CPU –burst time given in milliseconds:
Process Burst Time
p1 4
p2 3
p3 6
p4 3
Quantum=2;
P1 p2 p3 p4 p1 p2 p3 p4 p3
0 2 4 6 8 10 11 13 14 16

Monday, March 17, 2008

System analysis and Design

Open or Closed System

Five characteristics of open system can be identified:

1. Input from outside

2.Entropy

3.Process,output, and cycles

4.Differentiation

5.Equifinality


Man-Made Information System

In information system may defined as set of devices,procedures, and operating system designed around user-based criteria to produce information and communicate it to the user for planning control and performance.
the major infomation systems are (1) formal .(2) informal .and (3) computer based.

OSI and TCP/IP Model


The TCP/IP protocol suite was developed prior to the definition of the OSI model, the functionality of the TCP/IP application layer protocols fit roughly into the framework of the top three layers of the OSI model: Application, Presentation and Session layers.
Most TCP/IP application layer protocols were developed before the emergence of personal computers, graphical user interfaces and multimedia objects. As a result, these protocols implement very little of the functionality that is specified in the OSI model Presentation and Session layers.
The Presentation Layer
The Presentation layer has three primary functions:

1.Coding and conversion of Application layer data to ensure that data from the source device can be interpreted by the appropriate application on the destination device.

2.Compression of the data in a manner that can be decompressed by the destination device.

3.Encryption of the data for transmission and the decryption of data upon receipt by the destination.
Presentation layer implementations are not typically associated with a particular protocol stack. The standards for video and graphics are examples. Some well-known standards for video include QuickTime and Motion Picture Experts Group (MPEG). QuickTime is an Apple Computer specification for video and audio, and MPEG is a standard for video compression and coding.
Among the well-known graphic image formats are Graphics Interchange Format (GIF), Joint Photographic Experts Group (JPEG), and Tagged Image File Format (TIFF). GIF and JPEG are compression and coding standards for graphic images, and TIFF is a standard coding format for graphic images.
The Session Layer
As the name of the Session layer implies, functions at this layer create and maintain dialogs between source and destination applications. The Session layer handles the exchange of information to initiate dialogs, keep them active, and to restart sessions that are disrupted or idle for a long period of time.
Most applications, like web browsers or e-mail clients, incorporate functionality of the OSI layers 5, 6 and 7.