Sie sind auf Seite 1von 41

B+ Tree is an advanced method of ISAM file organization.

It uses the same concept of key-index,


but in a tree like structure. B+ tree is similar to binary search tree, but it can have more than two leaf
nodes. It stores all the records only at the leaf node. Intermediary nodes will have pointers to the leaf
nodes. They do not contain any data/records.

Consider a student table below. The key value here is STUDENT_ID. And each record contains the
details of each student along with its key value and the index/pointer to the next value. In a B+ tree it
can be represented as below.

Please note that the leaf node 100 means, it has name and address of student with ID 100, as we
saw in R1, R2, R3 etc above.

From the above B+ tree structure, it is evident that

There is one main node called root of the tree 105 is the root here.
There is an intermediary layer with nodes. They do not have actual records stored. They are
all pointers to the leaf node. Only the leaf node contains the data in sorted order.
The nodes to the left of the root nodes have prior values of root and nodes to the right have
next values of the root. i.e.; 102 and 108 respectively.
There is one final node, called leaf node, which has only values. i.e.; 100, 101, 103, 104, 106
and 107
All the leaf nodes are balanced all the leaf nodes at same distance from the root node.
Hence searching any record is easier.
Searching any record is linear in this case. Any record can be traversed through single path
and accessed easily.
Since the intermediary nodes have only pointers to the leaf node, the tree structure is of
shorter height. Shorter the height, faster is the traversal and hence the retrieval of records.

Advantages of B+ Trees
Since all records are stored only in the leaf node and are sorted sequential linked list,
searching is becomes very easy.
Using B+, we can retrieve range retrieval or partial retrieval. Traversing through the tree
structure makes this easier and quicker.
As the number of record increases/decreases, B+ tree structure grows/shrinks. There is no
restriction on B+ tree size, like we have in ISAM.
Since it is a balance tree structure, any insert/ delete/ update does not affect the
performance.
Since we have all the data stored in the leaf nodes and more branching of internal nodes
makes height of the tree shorter. This reduces disk I/O. Hence it works well in secondary
storage devices

Fourth Normal Form (4NF)


In the fourth normal form,

It should meet all the requirement of 3NF


Attribute of one or more rows in the table should not result in more than one rows of the
same table leading to multi-valued dependencies

To understand it clearly, consider a table with Subject, Lecturer who teaches each subject and
recommended Books for each subject.
If we observe the data in the table above it satisfies 3NF. But LECTURER and BOOKS are two
independent entities here. There is no relationship between Lecturer and Books. In the above
example, either Alex or Bosco can teach Mathematics. For Mathematics subject , student can refer
either 'Maths Book1' or 'Maths Book2'. i.e.;

SUBJECT --> LECTURER

SUBJECT-->BOOKS

This is a multivalued dependency on SUBJECT. If we need to select both lecturer and books
recommended for any of the subject, it will show up (lecturer, books) combination, which implies
lecturer who recommends which book. This is not correct.

SELECT c.LECTURER, c.BOOKS FROM COURSE c WHERE SUBJECT = 'Mathematics';

To eliminate this dependency, we divide the table into two as below:

Now if we want to know the lecturer names and books recommended for any of the subject, we will
fire two independent queries. Hence it removes the multi-valued dependency and confusion around
the data. Thus the table is in 4NF.

--Select the lecturer names


SELECT c.SUBJECT , c.LECTURER FROM COURSE c WHERE c.SUBJECT = 'Mathematics';

--Select the recommended book names


SELECT c.SUBJECT , c.BOOKS FROM COURSE c WHERE c.SUBJECT = 'Mathematics';

Definition - What does Fourth Normal Form (4NF) mean?


Fourth normal form (4NF) is a level of database normalization where there are no non-trivial
multivalued dependencies other than a candidate key.

It builds on the first three normal forms (1NF, 2NF and 3NF) and the Boyce-Codd Normal Form
(BCNF). It states that, in addition to a database meeting the requirements of BCNF, it must not
contain more than one multivalued dependency.
SEQUENCES

A sequence is used to generate numbers in sequence. You can use sequences to


insert unique values in Primary Key and Unique Key columns of tables. To create a
sequence give the CREATE SEQUENCE statement.

CREATING SEQUENCES

CREATE SEQUENCE bills

START WITH 1

INCREMENT BY 1

MINVALUE 1

MAXVALUE 100/NOMAXVALUE

CYCLE/NOCYCLE

CACHE 10/NOCACHE;

The above statement creates a sequence bills it will start with 1 and increment by 1.
Its MAXVALUE is 100 i.e. after 100 numbers are generated it will stop if you say
NOCYCLE, otherwise if you mention CYCLE then again it will start with no. 1. You can
also specify NOMAXVALUE in that case the sequence will generate infinite numbers.

The CACHE option is used to cache sequence numbers in System Global Area (SGA). If
you say CACHE 10 then oracle will cache next 10 numbers in SGA. If you access a
sequence number then oracle will first try to get the number from cache, if it is not
found then it reads the next number from disk. Since reading the disk is time
consuming rather than reading from SGA it is always recommended to cache
sequence numbers in SGA. If you say NOCACHE then Oracle will not cache any
numbers in SGA and every time you access the sequence number it reads the
number from disk.
Accessing Sequence Numbers.

To generate Sequence Numbers you can use NEXTVAL and CURRVAL for example to
get the next sequence number of bills sequence type the following command.

Select bills.nextval from dual;

BILLS

-----

NEXTVAL gives the next number in sequence. Whereas, CURRVAL returns the
current number of the sequence. This is very handy in situations where you have
insert records in Master Detail tables. For example to insert a record in SALES master
table and SALES_DETAILS detail table.

insert into sales (billno,custname,amt)

values (bills.nextval,Sami,2300);

insert into sales_details (billno,itemname,qty,rate)


values

(bills.currval,Onida,10,13400);
ALTERING SEQUENCES

To alter sequences use ALTER SEQUENCE statement. For example to alter the bill
sequence MAXVALUE give the following command.

ALTER SEQUENCE BILLS

MAXVALUE 200;

Except Starting Value, you can alter any other parameter of a sequence. To change
START WITH parameter you have to drop and recreate the sequence.

DROPPING SEQUENCES

To drop sequences use DROP SEQUENCE command. For example to drop bills
sequence give the following statement

drop sequence bills;

Listing Information About Sequences

To see how many sequences are there in your schema and what are there settings
give the following command.

select * from user_sequences;


SYNONYMS

A synonym is an alias for a table, view, snapshot, sequence, procedure, function, or


package.

There are two types to SYNONYMS they are

PUBLIC SYNONYM

PRIVATE SYNONYM

If you a create a synonym as public then it can be accessed by any other user with
qualifying the synonym name i.e. the user doesnt have to mention the owner name
while accessing the synonym. Nevertheless the other user should have proper
privilege to access the synonym. Private synonyms needs to be qualified with owner
names.

CREATING SYNONYMS

To create a synonym for SCOTT emp table give the following command.

Create synonym employee for scott.emp;

A synonym can be referenced in a DML statement the same way that the underlying
object of the synonym can be referenced. For example, if a synonym
named EMPLOYEE refers to a table or view, then the following statement is valid:
select * from employee;
Suppose you have created a function known as TODAY which returns the current
date and time. Now you have granted execute permission on it to every other user of
the database. Now these users can execute this function but when the call they have
to give the following command:
select scott.today from dual;

Now if you create a public synonym on it then other users dont have to qualify the
function name with owners name. To define a public synonym give the following
command.

create public synonym today for scott.today;

Now the other users can simply type the following command to access the function.

select today from dual;

Dropping Synonyms

To drop a synonym use the DROP SYNONYM statement. For example, to drop
EMPLOYEE synonym give the statement

drop synonym employee;

Listing information about synonyms

To see synonyms information give the following statement.

select * from user_synonyms;


The TCP/IP Reference Model
TCP/IP means Transmission Control Protocol and Internet Protocol. It is the network model used in
the current Internet architecture as well. Protocols are set of rules which govern every possible
communication over a network. These protocols describe the movement of data between the source
and destination or the internet. These protocols offer simple naming and addressing schemes.
Overview of TCP/IP reference model
TCP/IP that is Transmission Control Protocol and Internet Protocol was developed by Department of
Defence's Project Research Agency (ARPA, later DARPA) as a part of a research project of network
interconnection to connect remote machines.
The features that stood out during the research, which led to making the TCP/IP reference model
were:

Support for a flexible architecture. Adding more machines to a network was easy.
The network was robust, and connections remained intact untill the source and destination
machines were functioning.

The overall idea was to allow one application on one computer to talk to(send data packets) another
application running on different computer.

Description of different TCP/IP protocols


Layer 1: Host-to-network Layer

1. Lowest layer of the all.

2. Protocol is used to connect to the host, so that the packets can be sent over it.

3. Varies from host to host and network to network.

Layer 2: Internet layer

1. Selection of a packet switching network which is based on a connectionless internetwork layer is

called a internet layer.

2. It is the layer which holds the whole architecture together.

3. It helps the packet to travel independently to the destination.

4. Order in which packets are received is different from the way they are sent.

5. IP (Internet Protocol) is used in this layer.


Layer 3: Transport Layer

1. It decides if data transmission should be on parallel path or single path.

2. Functions such as multiplexing, segmenting or splitting on the data is done by transport layer.

3. The applications can read and write to the transport layer.

4. Transport layer adds header information to the data.

5. Transport layer breaks the message (data) into small units so that they are handled more

efficiently by the network layer.

6. Transport layer also arrange the packets to be sent, in sequence.

Layer 4: Application Layer


The TCP/IP specifications described a lot of applications that were at the top of the protocol stack.
Some of them were TELNET, FTP, SMTP, DNS etc.

1. TELNET is a two-way communication protocol which allows connecting to a remote machine

and run applications on it.

2. FTP(File Transfer Protocol) is a protocol, that allows File transfer amongst computer users

connected over a network. It is reliable, simple and efficient.

3. SMTP(Simple Mail Transport Protocol) is a protocol, which is used to transport electronic mail

between a source and destination, directed via a route.

4. DNS(Domain Name Server) resolves an IP address into a textual address for Hosts connected

over a network.

Merits of TCP/IP model

1. It operated independently.

2. It is scalable.

3. Client/server architecture.
4. Supports a number of routing protocols.

5. Can be used to establish a connection between two computers.

Demerits of TCP/IP

1. In this, the transport layer does not guarantee delivery of packets.

2. The model cannot be used in any other application.

3. Replacing protocol is not easy.

4. It has not clearly separated its services, interfaces and protocols.

The term wireless communication was introduced in the 19th century and wireless
communication technology has developed over the subsequent years. It is one of the
most important mediums of transmission of information from one device to other
devices. In this technology, the information can be transmitted through the air without
requiring any cable or wires or other electronic conductors, by using electromagnetic
waves like IR, RF, satellite, etc. In the present days, the wireless communication
technology refers to a variety of wireless communication devices and technologies
ranging from smart phones to computers, tabs, laptops, Bluetooth Technology, printers.
This article gives an overview of wireless communication and types of wireless
communications.
Types of Wireless Communciation

Introduction To Wireless Communication


In the present days, wireless communication system has become an essential part of
various types of wireless communication devices, that permits user to communicate
even from remote operated areas. There are many devices used for wireless
communication like mobiles. Cordless telephones, Zigbee wirelss technology, GPS, Wi-Fi,
satellite television and wireless computer parts. Current wireless phones include 3 and
4G networks, Bluetooth and Wi-Fi technologies.
Types of Wireless Communication
The different types of wireless communication mainly include, IR wireless
communication, satellite communication, broadcast radio, Microwave radio, Bluetooth,
Zigbee etc.

Satellite Communication

Satellite communication is one type of self contained wireless communication


technology, it is widely spread all over the world to allow users to stay connected almost
anywhere on the earth. When the signal (a beam of modulated microwave) is sent near
the satellite then, satellite amplifies the signal and sent it back to the antenna receiver
which is located on the surface of the earth. Satellite communication contains two main
components like the space segment and the ground segment.The ground segment
consists of fixed or mobile transmission, reception and ancillary equipment and the
space segment, which mainly is the satellite itself.
Satellite Communciaiton

Infrared Communication

Infrared wireless communication communicates information in a device or systems through


IR radiation . IR is electromagnetic energy at a wavelength that is longer than that of red
light. It is used for security control, TV remote control and short range communications.
In the electromagnetic spectrum, IR radiation lies between microwaves and visible light.
So, they can be used as a source of communication

Infrared Communication

For a successful infrared communication, a photo LED transmitter and a photo diode
receptor are required. The LED transmitter transmits the IR signal in the form of non
visible light, that is captured and saved by the photoreceptor. So the information
between the source and the target is transferred in this way. The source and
destination can be mobile phones, TVs, security systems, laptops etc supports wireless
communication.
Broadcast Radio

The first wireless communication technology is the open radio communication to seek
out widespread use, and it still serves a purpose nowadays. Handy multichannel radios
permit a user to speak over short distances, whereas citizens band and maritime radios
offer communication services for sailors. Ham radio enthusiasts share data and function
emergency communication aids throughout disasters with their powerful broadcasting
gear, and can even communicate digital information over the radio frequency spectrum.

Broadcast Radio

Mostly an audio broadcasting service, radio broadcasts sound through the air as radio
waves. Radio uses a transmitter which is used to transmit the data in the form of radio
waves to a receiving antenna(Different Types of Antennas). To broadcast common
programming, stations are associated with the radio N/Ws. The broadcast happens
either in simulcast or syndication or both. Radio broadcasting may be done via cable
FM, the net and satellites. A broadcast sends information over long distances at up to
two megabits/Sec (AM/FM Radio).
Radio waves are electromagnetic signals, that are transmitted by an antenna.These
waves have completely different frequency segments, and you will be ready to obtain an
audio signal by changing into a frequency segment.
Radio

For example, you can take a radio station. When the RJ says you are listening to 92.7
BIG FM, what he really means is that signals are being broadcasted at a frequency of
92.7megahertz, that successively means the transmitter at the station is periodic at a
frequency of 92.700,000 Cycles/second.

When you would like to listen to 92.7 BIG FM, all you have to do is tune the radio to just
accept that specific frequency and you will receive perfect audio reception.

Microwave Communication

Microwave wireless communication is an effective type of communication, mainly this


transmission uses radio waves, and the wavelengths of radio waves are measured in
centimeters. In this communication, the data or information can be transfers using two
methods. One is satellite method and another one is terrestrial method.

Microwave Communication
Wherein satellite method, the data can be transmitted though a satellite, that orbit
22,300 miles above the earth. Stations on the earth send and receive data signals from
the satellite with a frequency ranging from 11GHz-14GHz and with a transmission
speed of 1Mbps to 10Mbps. In terrestrial method, in which two microwave towers with a
clear line of sight between them are used, ensuring no obstacles to disrupt the line of
sight. So it is used often for the purpose of privacy. The frequency range of the
terrestrial system is typically 4GHz-6GHz and with a transmission speed is usually
1Mbps to 10Mbps.

Channel Capacity or Maximum Data rate the maximum rate (in bps) at which data can
be transmitted over a given communication link, or channel

Local loop

n telephony, the local loop (also referred to as a local tail, subscriber line, or in the aggregate as
the last mile) is the physical link or circuit that connects from the demarcation point of the customer
premises to the edge of the common carrier or telecommunications service provider's network.
At the edge of the carrier access network in a traditional public telephone network, the local loop
terminates in a circuit switch housed in an incumbent local exchange carrier or telephone exchange.
Trunks

In telecommunications, trunking is a method for a system to provide network access to many


clients by sharing a set of lines or frequencies instead of providing them individually. This is
analogous to the structure of a tree with one trunk and many branches.

Multiplexing is a form of data transmission in which one communication channel carries


several transmissions at the same time

In telecommunications, an electronic switching system (ESS) is a telephone switch that uses


digital electronics and computerized control to interconnect telephone circuits for the purpose of
establishing telephone calls.

narrowband describes a channel in which the bandwidth of the message does not significantly
exceed the channel's coherence bandwidth.
In the study of wired channels, narrowband implies that the channel under consideration is
sufficiently narrow that its frequency response can be considered flat. The message bandwidth will
therefore be less than the coherence bandwidth of the channel. That is, no channel has perfectly flat
fading, but the analysis of many aspects of wireless systems is greatly simplified if flat fading can be
assumed.
Narrowband can also be used with the audio spectrum to describe sounds which occupy a narrow
range of frequencies.
In telephony, narrowband is usually considered to cover frequencies 3003400 Hz.

Integrated Services Digital Network (ISDN) is a set of communication standards for


simultaneous digital transmission of voice, video, data, and other network services over the
traditional circuits of the public switched telephone network. It was first defined in 1988 in
the CCITT red book.[1] Prior to ISDN, the telephone system was viewed as a way to transport voice,
with some special services available for data. The key feature of ISDN is that it integrates speech
and data on the same lines, adding features that were not available in the classic telephone system.
The ISDN standards define several kinds of access interfaces, such as Basic Rate
Interface (BRI), Primary Rate Interface (PRI), Narrowband ISDN (N-ISDN), and Broadband ISDN (B-
ISDN).
ISDN is a circuit-switched telephone network system, which also provides access to packet switched
networks, designed to allow digital transmission of voice and data over ordinary telephone copper
wires, resulting in potentially better voice quality than an analog phone can provide. It offers circuit-
switched connections (for either voice or data), and packet-switched connections (for data), in
increments of 64 kilobit/s. In some countries, ISDN found major market application for Internet
access, in which ISDN typically provides a maximum of 128 kbit/s bandwidth in both upstream and
downstream directions. Channel bonding can achieve a greater data rate; typically the ISDN B-
channels of three or four BRIs (six to eight 64 kbit/s channels) are bonded.

Broadband phone service enables voice telephone calls to work over your high-speed
Internet connection. A broadband phone (also known as a VoIP or Internet phone) utilizes the
same IP network as your Internet service

A communications satellite is an artificial satellite that relays and amplifies radio


telecommunications signals via a transponder; it creates a communication channel between a
source transmitter and a receiver at different locations on Earth. Communications satellites are used
for television, telephone, radio, internet, and military applications. There are over 2,000
communications satellites in Earths orbit, used by both private and government organizations

A low Earth orbit (LEO) typically is a circular orbit about 160 to 2,000 kilometres (99 to 1,243 mi)
above the earth's surface[citation needed] and, correspondingly, a period (time to revolve around the earth)
of about 90 minutes.
Because of their low altitude, these satellites are only visible from within a radius of roughly 1,000
kilometres (620 mi) from the sub-satellite point. In addition, satellites in low earth orbit change their
position relative to the ground position quickly. So even for local applications, a large number of
satellites are needed if the mission requires uninterrupted connectivity.
Low-Earth-orbiting satellites are less expensive to launch into orbit than geostationary satellites and,
due to proximity to the ground, do not require as high signal strength (Recall that signal strength falls
off as the square of the distance from the source, so the effect is dramatic). Thus there is a trade off
between the number of satellites and their cost

A geosynchronous satellite is a satellite in geosynchronous orbit, with an orbital period the same
as the Earth's rotation period. Such a satellite returns to the same position in the sky after
each sidereal day, and over the course of a day traces out a path in the sky that is typically some
form of analemma. A special case of geosynchronous satellite is the geostationary satellite, which
has a geostationary orbit a circular geosynchronous orbit directly above the Earth's equator.
Another type of geosynchronous orbit used by satellites is the Tundra elliptical orbit.
Geosynchronous satellites have the advantage of remaining permanently in the same area of the
sky, as viewed from a particular location on Earth, and so permanently within view of a given ground
station

A hub, also called a network hub, is a common connection point for devices in a
network. Hubs are devices commonly used to connect segments of a LAN.

A network bridge is a computer networking device that creates a single


aggregate network from multiple communication networks or network segments. This function
is called network bridging. ... In the OSI model, bridging is performed in the first two layers,
below the network layer (layer 3).

A router is a networking device that forwards data packets between computer


networks. Routers perform the traffic directing functions on the Internet. A data packet is
typically forwarded from one router to another router through thenetworks that constitute the
internetwork until it reaches its destination node

the gateway is the computer that routes the traffic from a workstation to the
outside network that is serving the Web pages. In homes, thegateway is the ISPthat connects
the user to the internet. In enterprises, thegateway node often acts as a proxy server and a
firewall

A virtual circuit (VC) is a means of transporting data over a packet switchedcomputer


network in such a way that it appears as though there is a dedicated physical layer link
between the source and destination end systems of this data. The term virtual circuit is
synonymous with virtual connection and virtual channel.

Tunneling, also known as "port forwarding," is the transmission of data intended for use only
within a private, usually corporate network through a public network in such a way that the
routing nodes in the public network are unaware that the transmission is part of a
private network
The packet fragmentation problem in computer networks is that of breaking a packet into
smaller pieces (fragments) due to packet size limitations along the packet's route. This is a
typical internetworking problem

A firewall is a system designed to prevent unauthorized access to or from a privatenetwork.


You can implement a firewall in either hardware or software form, or a combination of
both. Firewalls prevent unauthorized Internet users from accessing
private networks connected to the Internet, especially intranets

Definition. Routing is the process of moving packets across a networkfrom one host to a
another. It is usually performed by dedicated devices calledrouters. Packets are the
fundamental unit of information transport in all moderncomputer networks, and increasingly in
other communications networks as well

Virtual Circuits & Datagram Networks


Computer networks that provide connection-oriented service are called Virtual Circuits while those
providing connection-oriented services are called as Datagram networks. For prior knowledge, the
Internet which we use is actually based on Datagram network (coonectionless) at network level as all
packets from a source to a destination do not follow same path.
Let us see what are the highlighting differences between these two hot debated topics here:

Virtual Circuits-
1. It is connection-oriented simply meaning that there is a reservation of resources like buffers, CPU,
bandwidth,etc. for the time in which the newly setup VC is going to be used by a data transfer
session.
2. First packet goes and reserves resources for the subsequent packets which as a result follow the
same path for the whole connection time.
3. Since all the packets are going to follow the same path, a global header is required only for the first
packet of the connection and other packets generally dont require global headers.
4. Since data follows a particular dedicated path, packets reach inorder to the destination.
5. From above points, it can be concluded that Virtual Circuits are highly reliable means of transfer.
6. Since each time a new connection has to be setup with reservation of resources and extra
information handling at routers, its simply costly to implement Virtual Circuits.

Datagram Networks :
1. It is connectionless service. There is no need of reservation of resources as there is no dedicated
path for a connection session.
2. All packets are free to go to any path on any intermediate router which is decided on the go by
dynamically changing routing tables on routers.
3. Since every packet is free to choose any path, all packets must be associated with a header with
proper information about source and the upper layer data.
4. The connectionless property makes data packets reach destination in any order, means they need
not reach in the order in which they were sent.
5. Datagram networks are not reliable as Virtual Circuits.
6. But it is always easy and cost efficient to implement datagram networks as there is no extra
headache of reserving resources and making a dedicated each time an application has to
communicate.
Routing Algorithms
The routing algorithms are as follows:

Flooding
Flooding is simplest method packet forwarding. When a packet is received,
the routers send it to all the interfaces except the one on which it was
received. This creates too much burden on the network and lots of duplicate
packets wandering in the network.

Time to Live (TTL) can be used to avoid infinite looping of packets. There
exists another approach for flooding, which is called Selective Flooding to
reduce the overhead on the network. In this method, the router does not
flood out on all the interfaces, but selective ones.

Shortest Path
Routing decision in networks, are mostly taken on the basis of cost between
source and destination. Hop count plays major role here. Shortest path is a
technique which uses various algorithms to decide a path with minimum
number of hops.

Common shortest path algorithms are:

Dijkstra's algorithm

Bellman Ford algorithm

Floyd Warshall algorithm

Network congestion in data networking and queueing theory is the reduced quality of service
that occurs when a network node is carrying more data than it can handle. Typical effects
include queueing delay, packet loss or the blocking of new connections

Congestion Control refers to techniques and mechanisms that can either prevent
congestion, before it happens, or remove congestion, after it has happened. Congestion
control mechanisms are divided into two categories, one category prevents the
congestion from happening and the other category removes congestion after it has taken
place.
These two categories are:

1. Open loop
2. Closed loop

Open Loop Congestion Control


In this method, policies are used to prevent the congestion before it happens.
Congestion control is handled either by the source or by the destination.
The various methods used for open loop congestion control are:
1. Retransmission Policy
The sender retransmits a packet, if it feels that the packet it has sent is lost or
corrupted.
However retransmission in general may increase the congestion in the network. But we
need to implement good retransmission policy to prevent congestion.
The retransmission policy and the retransmission timers need to be designed to
optimize efficiency and at the same time prevent the congestion.
2. Window Policy
To implement window policy, selective reject window method is used for congestion
control.
Selective Reject method is preferred over Go-back-n window as in Go-back-n method,
when timer for a packet times out, several packets are resent, although some may have
arrived safely at the receiver. Thus, this duplication may make congestion worse.
Selective reject method sends only the specific lost or damaged packets.
3. Acknowledgement Policy
The acknowledgement policy imposed by the receiver may also affect congestion.
If the receiver does not acknowledge every packet it receives it may slow down the
sender and help prevent congestion.
Acknowledgments also add to the traffic load on the network. Thus, by sending fewer
acknowledgements we can reduce load on the network.
To implement it, several approaches can be used:

1. A receiver may send an acknowledgement only if it has a packet to be sent.


2. A receiver may send an acknowledgement when a timer expires.
3. A receiver may also decide to acknowledge only N packets at a time.
4. Discarding Policy
A router may discard less sensitive packets when congestion is likely to happen.
Such a discarding policy may prevent congestion and at the same time may not harm
the integrity of the transmission.
5. Admission Policy
An admission policy, which is a quality-of-service mechanism, can also prevent
congestion in virtual circuit networks.
Switches in a flow first check the resource requirement of a flow before admitting it to
the network.
A router can deny establishing a virtual circuit connection if there is congestion in the
"network or if there is a possibility of future congestion.

Closed Loop Congestion Control


Closed loop congestion control mechanisms try to remove the congestion after it
happens.
The various methods used for closed loop congestion control are:
1. Backpressure
Backpressure is a node-to-node congestion control that starts with a node and
propagates, in the opposite direction of data flow.
The backpressure technique can be applied only to virtual circuit networks. In such
virtual circuit each node knows the upstream node from which a data flow is coming.
In this method of congestion control, the congested node stops receiving data from the
immediate upstream node or nodes.
This may cause the upstream node on nodes to become congested, and they, in turn,
reject data from their upstream node or nodes.
As shown in fig node 3 is congested and it stops receiving packets and informs its
upstream node 2 to slow down. Node 2 in turns may be congested and informs node 1 to
slow down. Now node 1 may create congestion and informs the source node to slow
down. In this way the congestion is alleviated. Thus, the pressure on node 3 is moved
backward to the source to remove the congestion.
2. Choke Packet
In this method of congestion control, congested router or node sends a special type of
packet called choke packet to the source to inform it about the congestion.
Here, congested node does not inform its upstream node about the congestion as in
backpressure method.
In choke packet method, congested node sends a warning directly to the source
station i.e. the intermediate nodes through which the packet has traveled are not
warned.

3. Implicit Signaling
In implicit signaling, there is no communication between the congested node or nodes
and the source.
The source guesses that there is congestion somewhere in the network when it does
not receive any acknowledgment. Therefore the delay in receiving an acknowledgment is
interpreted as congestion in the network.
On sensing this congestion, the source slows down.
This type of congestion control policy is used by TCP.
4. Explicit Signaling
In this method, the congested nodes explicitly send a signal to the source or
destination to inform about the congestion.
Explicit signaling is different from the choke packet method. In choke packed method,
a separate packet is used for this purpose whereas in explicit signaling method, the
signal is included in the packets that carry data .
Explicit signaling can occur in either the forward direction or the backward direction .
In backward signaling, a bit is set in a packet moving in the direction opposite to the
congestion. This bit warns the source about the congestion and informs the source to
slow down.
In forward signaling, a bit is set in a packet moving in the direction of congestion. This
bit warns the destination about the congestion. The receiver in this case uses policies
such as slowing down the acknowledgements to remove the congestion.

Cryptography deals with the actual securing of digital data. It refers to the
design of mechanisms based on mathematical algorithms that provide
fundamental information security services. You can think of cryptography as the
establishment of a large toolkit containing different techniques in security
applications.

What is Cryptanalysis?
The art and science of breaking the cipher text is known as cryptanalysis.

Cryptanalysis is the sister branch of cryptography and they both co-exist.


The cryptographic process results in the cipher text for transmission or
storage. It involves the study of cryptographic mechanism with the
intention to break them. Cryptanalysis is also used during the design of the
new cryptographic techniques to test their security strengths.

Note Cryptography concerns with the design of cryptosystems, while


cryptanalysis studies the breaking of cryptosystems

With the spread of more unsecure computer networks in last few decades, a
genuine need was felt to use cryptography at larger scale. The symmetric
key was found to be non-practical due to challenges it faced for key
management. This gave rise to the public key cryptosystems.

The process of encryption and decryption is depicted in the following


illustration
The most important properties of public key encryption scheme are

Different keys are used for encryption and decryption. This is a property which
set this scheme different than symmetric encryption scheme.

Each receiver possesses a unique decryption key, generally referred to as his


private key.

Receiver needs to publish an encryption key, referred to as his public key.

Some assurance of the authenticity of a public key is needed in this scheme to


avoid spoofing by adversary as the receiver. Generally, this type of
cryptosystem involves trusted third party which certifies that a particular public
key belongs to a specific person or entity only.

Encryption algorithm is complex enough to prohibit attacker from deducing the


plaintext from the ciphertext and the encryption (public) key.
Though private and public keys are related mathematically, it is not be feasible
to calculate the private key from the public key. In fact, intelligent part of any
public-key cryptosystem is in designing a relationship between two keys.

The Domain Name System (DNS) is a hierarchical decentralized naming system for
computers, services, or other resources connected to the Internet or a private network. It
associates various information with domain names assigned to each of the participating entities

E-Mail

Electronic mail or e-mail, as it is known by its fans b

ecame known to the public at large and its use grew


exponentially. The first e-mail systems consisted of file transfer
protocols, with the convention that the first line of the message
contained the recipients address. It is a store and forward
method of composing, sending, storing, and receiving messages
over electronic communication systems. The term e-mail
applies both to the Internet e-mail system based on the Simple
Mail Transfer Protocol (SMTP) and to intranet systems allowing
users within one organization to e-mail each other.

Often workgroup collaboration organizations may use the Internet


protocols for internal e-mail service. E-mail is often used to
deliver bulk unwanted messages, or spam, but filter programs
exist which can automatically delete most of these. E-mail
systems based on RFC 822 are widely used.

1 Architecture :

E-mail system normally consists of two sub systems

1. the user agents

2. the message transfer agents


The user agents allow people to read and send e-mails. The
message transfer agents move the messages from source to
destination. The user agents are local programs that provide a
command based, menu-based, or graphical method for
interacting with e-mail system. The message transfer agents are
daemons, which are processes that run in background. Their job
is to move datagram e-mail through system.

A key idea in e-mail system is the distinction between the


envelope and its contents. The envelope encapsulates the
message. It contains all the information needed for transporting
the message like destinations address, priority, and security
level, all of which are distinct from the message itself.

The message transport agents use the envelope for routing. The
message inside the envelope consists of two major sections:

The Header:

The header contains control information for the user agents. It is


structured into fields such as summary, sender, receiver, and
other information about the e-mail.

Body:

The body is entirely for human recipient. The message itself as


unstructured text; sometimes containing a signature block at the
end

2 Header format

The header is separated from the body by a blank line.

consists of following fields

From: The e-mail address, and optionally name, of the sender of


the message.
To: one or more e-mail addresses, and optionally name, of the
receivers of the message.

Subject: A brief summary of the contents of the message.

Date: The local time and date when the message was originally
sent.

E-mail system based on RFC 822 contains the message header as


shown in figure 8.2. The figure gives the fields along with their
meaning.

The fields in the message header of E-mail system based on RFC


822 related to message transport are given in figure 8.3. The
figure gives the fields along with their meaning.

3 User agents:

It is normally a program and sometimes called a mail reader. It


accepts a variety of commands for composing, receiving, replying
messages as well as manipulating the mail boxes. Some user
agents have a fancy menu or icon driven interfaced that require a
mouse where as others are one character commands from
keyboard. Functionally these are same. Some systems are menu
or icon driven but also have keyboard shortcuts.

To send an e-mail, user provides the message, the destination


address and possibly some other parameters. Most e-mail system
supports mailing lists.

Example: Reading e-mail

When a user is started up, it looks at the users mailbox for


incoming e-mail before displaying anything on the screen. Then it
announces the number of messages in the mailbox or displays a
one-line summary of each e-mail and wait for a command.

The display may look something like that is shown in figure 8.4.
Each line of the display contains several fields extracted from the
envelope or header of the corresponding message. In a simple e-
mail system, the choice of fields is built into the program. In
more sophisticated system, user can specify which fields are to
be displayed by providing a user profile.

Referring to the display it contains following fields

1. Message number: it is serial number of the message. It can be


displayed from the most currently received messages or vice
versa.

2. Flags: contains K means the message is not new, A means the


message is already read and F means the message has been
forwarded to someone else.

3. size of the message: indicates the length of the message

4. source of the message: originators address

5. subject: gives a brief summary of what the message is about.

4 E-mail Services

Basic services:

E-mail systems support five basic functions. These basic functions


are:

1. Composition:

It refers to the process of creating messages and answers. Any


text editor can be used for the body of the message, the system
itself can provide assistance with addressing and the numerous
header fields attached to each message.

For example: when answering a message, the e-mail system can


extract the originators address from the incoming e-mail and
automatically insert it into the proper place in the reply.

2. Transfer:
It refers to moving messages from the originator to the recipient.
This requires establishing a connection to the destination or some
intermediate machine, outputting the message, and finally
releasing the connection. E-mail does it automatically without
bothering the user.

3. Reporting:

It refers to acknowledging or telling the originator what happened


to the message. Was the message delivered? Was it rejected?
Numerous applications exist in which confirmation of delivery is
important and may even have a legal significance. E-mail system
is not very reliable.

4. Displaying

The incoming message has to be displayed so that people can


read their e-mail. Sometimes conversation is required or a special
viewer must be invoked. For example: if message is a postscript
file or digitized voice. Simple conversations and formatting are
sometimes attempted.

5. Disposition

It is the final step and concerns what the recipient does with the
message after receiving it. Possibilities include throwing it away
before reading, throwing it away after reading, saving it, and so
on. It should be possible to retrieve and reread saved messages,
forward them or process them in other ways.
Operating System

In computer operating systems, paging is a memory management scheme by which a


computer stores and retrieves data from secondary storage for use in main memory. In this
scheme, the operating system retrieves data from secondary storage in same-size blocks called
pages.

Fragmentation

Refers to the condition of a disk in which files are divided into pieces scattered around the
disk. Fragmentation occurs naturally when you use a disk frequently, creating, deleting, and
modifying files. At some point, the operating system needs to store parts of a file in
noncontiguous clusters.

Concurrent processing is a computing model in which multiple processors


execute instructions simultaneously for better
performance. Concurrent means something that happens at the same time as
something else. Tasks are broken down into subtasks that are then assigned to
separate processors to perform simultaneously, instead of sequentially as they
would have to be carried out by a single processor. Concurrent processing is
sometimes said to be synonymous with parallel processing.
In computer science, mutual exclusion is a property of concurrency control, which is instituted for
the purpose of preventing race conditions; it is the requirement that one thread of execution never
enter its critical section at the same time that another concurrent thread of execution enters its own
critical section

Input/output (I/O) scheduling is the method that computer operating systems use to decide in
which order the block I/O operations will be submitted to storage volumes. I/O scheduling is
sometimes called disk scheduling

resource scheduling

It is also called a job scheduler. A long-termscheduler determines which programs are


admitted to the system for processing. It selects processes from the queue and loads them into
memory for execution. Process loads into the memory for CPUscheduling.
Bankers Algorithm
Bankers algorithm is a deadlock avoidance algorithm. It is named so because this algorithm is used
in banking systems to determine whether a loan can be granted or not.
Consider there are n account holders in a bank and the sum of the money in all of their accounts is
S. Everytime a loan has to be granted by the bank, it subtracts the loan amount from the total money
the bank has. Then it checks if that difference is greater than S. It is done because, only then, the
bank would have enough money even if all the n account holders draw all their money at once.
Bankers algorithm works in a similar way in computers. Whenever a new process is created, it must
exactly specify the maximum instances of each resource type that it needs

UNIX

pr - convert text files for printing

SYNOPSIS
pr [OPTION]... [FILE]...

DESCRIPTION

Paginate or columnate FILE(s) for printing.

head - output the first part of files

SYNOPSIS
head [OPTION]... [FILE]...

DESCRIPTION
head by default, prints the first 10 lines of each FILE to standard output.
With more than one FILE, it precedes each set of output with a header
identifying the file name. If no FILE is specified, or when FILE is specified as
a dash ("-"), head reads from standard input.

tail - output the last part of files


SYNOPSIS
tail [OPTION]... [FILE]...

DESCRIPTION

Print the last 10 lines of each FILE to standard output. With more than one FILE,
precede each with a header giving the file name. With no FILE, or when FILE is -,
read standard input.

cut - To divide a file into several parts (columns)

SYNOPSIS
cut [OPTION]... [FILE]...

DESCRIPTION
cur writes to standard output selected parts of each line of each input file,
or standard input if no files are given or for a file name of '-'.

paste - merge lines of files

SYNOPSIS
paste [OPTION]... [FILE]...

DESCRIPTION

Write lines consisting of the sequentially corresponding lines from each FILE,
separated by TABs, to standard output. With no FILE, or when FILE is -, read
standard input.

uniq - report or omit repeated lines

SYNOPSIS
uniq [OPTION]... [INPUT [OUTPUT]]
DESCRIPTION

Discard all but one of successive identical lines from INPUT (or standard input),
writing to OUTPUT (or standard output)

tr - translate or delete characters

SYNOPSIS
tr [OPTION]... SET1 [SET2]

DESCRIPTION

Translate, squeeze, and/or delete characters from standard input, writing to standard
output.

join - join lines of two files on a common field

SYNOPSIS
join [OPTION]... FILE1 FILE2

DESCRIPTION

For each pair of input lines with identical join fields, write a line to standard output.
The default join field is the first, delimited by whitespace. When FILE1 or FILE2 (not
both) is -, read standard input

grep, egrep, fgrep - print lines matching a pattern

SYNOPSIS
grep [options] PATTERN [FILE...]
grep [options] [-e PATTERN | -f FILE] [FILE...]
DESCRIPTION

Grep searches the named input FILEs (or standard input if no files are named, or the
file name - is given) for lines containing a match to the given PATTERN. By
default, grep prints the matching lines.

sed - stream editor for filtering and transforming text

SYNOPSIS
sed [OPTION]... {script-only-if-no-other-script} [input-file]...

DESCRIPTION
Sed is a stream editor. A stream editor is used to perform basic text transformations
on an input stream (a file or input from a pipeline). While in some ways similar to an
editor which permits scripted edits (such as ed), sed works by making only one pass
over the input(s), and is consequently more efficient. But it is seds ability to filter
text in a pipeline which particularly distinguishes it from other types of editors.

awk - Finds and Replaces text, database sort/validate/index

SYNOPSIS
awk 'Program' input-file1 input-file2 ... awk -f PROGRAM-FILE input-file1 input-file2 ...

DESCRIPTION
awk command searches files for text containing a pattern. When a line or text matches, awk
performs a specific action on that line/text. The Program statement tells awk what operation to
do; Program statement consists of a series of "rules" where each rule specifies one pattern to
search for, and one action to perform when a particular pattern is found. A regular expression
enclosed in slashes (/) is an awk pattern to match every input record whose text belongs to that
set
process management in unix
When you execute a program on your Unix system, the system creates a
special environment for that program. This environment contains everything
needed for the system to run the program as if no other program were
running on the system.

Whenever you issue a command in Unix, it creates, or starts, a new


process. When you tried out the ls command to list the directory contents,
you started a process. A process, in simple terms, is an instance of a
running program.

The operating system tracks processes through a five-digit ID number


known as the pid or the process ID. Each process in the system has a
unique pid.

Pids eventually repeat because all the possible numbers are used up and
the next pid rolls or starts over. At any point of time, no two processes with
the same pid exist in the system because it is the pid that Unix uses to
track each process.

Starting a Process
When you start a process (run a command), there are two ways you can
run it

Foreground Processes

Background Processes

Foreground Processes
By default, every process that you start runs in the foreground. It gets its
input from the keyboard and sends its output to the screen.

You can see this happen with the ls command. If you wish to list all the files
in your current directory, you can use the following command

$ls ch*.doc

This would display all the files, the names of which start with ch and end
with .doc
ch01-1.doc ch010.doc ch02.doc ch03-2.doc
ch04-1.doc ch040.doc ch05.doc ch06-2.doc
ch01-2.doc ch02-1.doc

The process runs in the foreground, the output is directed to my screen,


and if the ls command wants any input (which it does not), it waits for it
from the keyboard.

While a program is running in the foreground and is time-consuming, no


other commands can be run (start any other processes) because the
prompt would not be available until the program finishes processing and
comes out.

Background Processes
A background process runs without being connected to your keyboard. If
the background process requires any keyboard input, it waits.

The advantage of running a process in the background is that you can run
other commands; you do not have to wait until it completes to start
another!

The simplest way to start a background process is to add an ampersand (&)


at the end of the command.

$ls ch*.doc &

This displays all those files the names of which start with ch and end
with .doc

ch01-1.doc ch010.doc ch02.doc ch03-2.doc


ch04-1.doc ch040.doc ch05.doc ch06-2.doc
ch01-2.doc ch02-1.doc

Here, if the ls command wants any input (which it does not), it goes into a
stop state until we move it into the foreground and give it the data from the
keyboard.

That first line contains information about the background process - the job
number and the process ID. You need to know the job number to
manipulate it between the background and the foreground.

Press the Enter key and you will see the following
[1] + Done ls ch*.doc &
$

The first line tells you that the ls command background process finishes
successfully. The second is a prompt for another command.

Bourne Shell

Bourne Again Shell (Bash) is the free version of the Bourne shell distributed
with Linux systems. Bash is similar to the original, but has added features such
as command line editing. Its name is sometimes spelled as Bourne Again SHell,
the capitalized Hell referring to the difficulty some people have with it.

Zsh was developed by Paul Falstad as a replacement for both the Bourne and C
shell. It incorporates features of all the other shells (such as file name completion
and a history mechanism) as well as new capabilities. Zsh is considered similar
to the Korn shell. Falstad intended to create in zsh a shell that would do whatever
a programmer might reasonably hope it would do. Zsh is popular with advanced
users.

Along with the Korn shell and the C shell, the Bourne shell remains among the
three most widely used and is included with all UNIX systems. The Bourne shell
is often considered the best shell for developing scripts.

Shell variables
Shell Variables

Name Meaning
$PATH List of directories to search for commands.
$USER Your user name.
$SHELL Absolute pathname of your login shell.
$TERM The type of your terminal
NAME
stat, fstat, lstat - get file status

SYNOPSIS
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

int stat(const char *path, struct stat *buf);


int fstat(int filedes, struct stat *buf);
int lstat(const char *path, struct stat *buf);

DESCRIPTION

These functions return information about a file. No permissions are required on the
file itself, but in the case of stat() and lstat() execute (search) permission is
required on all of the directories in path that lead to the file.

stat() stats the file pointed to by path and fills in buf.

lstat() is identical to stat(), except that if path is a symbolic link, then the link itself is
stat-ed, not the file that it refers to.

fstat() is identical to stat(), except that the file to be stat-ed is specified by the file
descriptorfiledes

NAME

umask - set file mode creation mask

SYNOPSIS
#include <sys/types.h>
#include <sys/stat.h>
mode_t umask(mode_t mask);

DESCRIPTION

umask() sets the calling processs file mode creation mask (umask) to mask & 0777.

The umask is used by open(2), mkdir(2), and other system calls that create files to
modify the permissions placed on newly created files or directories. Specifically,
permissions in the umask are turned off from the mode argument to open(2)
and mkdir(2)

NAME

chmod, fchmod - change permissions of a file

SYNOPSIS
#include <sys/types.h>
#include <sys/stat.h>

int chmod(const char *path, mode_t mode);

int fchmod(int fildes, mode_t mode);

DESCRIPTION

The mode of the file given by path or referenced by fildes is changed

Das könnte Ihnen auch gefallen