Computer Network
System of interconnected computers and computerized peripherals such as
printers is called computer network .This interconnection among computers
facilitates information sharing among them. Computers may connect to each
other by either wired or wireless media.
Characteristics of a Network-
A network is a group of systems that are
connected to allow sharing of resourcessuch as files or printersor sharing
of services-such as an Internet connection .There are two aspects of setting up a
network: the hardware used to connect the systems together and the software installed on the computers to
allow them to communicate.
Servers-
The server is a special computer that contains more disk space and memory than are found on client
workstations. The server has special software installed that allows it to function as a server. This special
software can provide file and print services (to allow sharing of files and printers), provide web pages to
clients, or provide e-mail functionality to the company.
Workstations -
The workstation also is known as a client, which is just a basic computer running a client
operating system such as Windows XP or Linux. These users typically store their files on a central server so
that they can share the files with other users on the network.
Hosts-
The term host refers to any computer or device that is connected to a network and sends or receives
information on that network. A host can be a server, a workstation, a printer with its own network card, or a
device such as a router. We can summarize by saying that any system or
device that is connected to the network is known as a host.
Types of Networks-
Organizations of different sizes, structures, and budgets need different
types of networks. Networks can be divided into one of two categories:
peer-to-peer or server-based networks.
1. Peer-to-Peer Network
2. Server-Based Networks
Peer-to-Peer Network-
A peer-to-peer network has no dedicated servers instead; a number of workstations
are connected together for the purpose of sharing information or devices. When there is no dedicated server, all
workstations are considered equal; any one of them can participate as the client or the server. Peer-to-peer
networks are designed to satisfy the networking needs of home networks or of small companies that do not
want to spend a lot of money on a dedicated server but still want to have the Capability to share information or
devices. For example, A small peer-to-peer network will allow these three computers to share the printer and
the customer information with one another .The extra cost of a server was not incurred because the existing
client systems were networked together to create the peer-to-peer network. A big disadvantage of peer-to-peer
networking is that you cant do your day-today administration in a single place.
Server-Based Networks-
Usually after four or five systems
have been networked, the need for a dedicated server to store all
of the user accounts and data files becomes apparentthis is a
server-based network. The advantage of a server-based network
is that the data files that will be used by all of the users are
stored on the one server. This will help you by giving you a
central point to set up permissions on the data files, and it will
give you a central point from which to back up all of the data in
case data loss should occur. With a server-based network, the
network server stores a list of users who may use network
resources and usually holds the resources as well. The server in
a server-based network may provide a number of different
services. The services it will offer to the network usually are decided by the servers role. There are a number
of different roles that a server could play on a network:
1. File and print servers 2. Application servers 3. Web servers 4. Directory servers
1. File and print servers-:
File and print servers control, share printers
and files among clients on the network. File and print servers were the
original reason to have a network; a large number of users needed
access to the same files, so the files were placed on a server, and all
clients were connected to the server when they needed to work with the
files.
2. Application servers-:
Application servers are servers that run some form of special program on the server. A
good example of an application server is a server that runs the companys e-mail server. The e-mail server
software is special software that can be run on a server operating system. Another example of software that
would run on an application server is a database server product such as Microsoft SQL Server. A database
server is a server that holds the companys core business data and typically gives this data to custom
applications that run on the workstations. These are some applications that you might find on an application
server:
1. Microsoft SQL Server 2.Oracle 3.Microsoft Exchange Server
4. IBM Lotus Domino
3. Web servers-:
Web servers are servers that run the Hypertext Transfer Protocol (HTTP) and are designed to
publish information on the Internet or the corporate intranet. Web servers are popular in todays businesses
because they host web applications (web sites) for the organization. These web applications could be designed
for internal use, or they could be used to publish information to the rest of the world on the Internet. Examples
of web server software are Microsofts Internet Information Services that runs on Windows or Apache web
server software that runs on UNIX/Linux, Novell NetWare, and Windows.
4. Directory servers-
Directory servers hold a list of the user accounts that are allowed to log on to the
network. This list of user accounts is stored in a database (known as the directory database) and can store
information about these user accounts such as address, city, phone number, and fax number. A directory
service is designed to be a central database that can be used to store everything about such objects as users and
printers.
Ethernet-:
Ethernet is a widely deployed LAN technology. This technology was invented by Bob Metcalfe and
D.R. Boggs in the year 1970. It was standardized in IEEE 802.3 in 1980. Ethernet shares media. Network
which uses shared media has high probability of data collision. Ethernet uses Carrier Sense Multi
Access/Collision Detection (CSMA/CD) technology to detect collisions. On the occurrence of collision in
Ethernet, all its hosts roll back, wait for some random amount of time, and then re-transmit the data. Ethernet
connector is network interface card equipped with 48-bits MAC address. This helps other Ethernet devices to
identify and communicate with remote devices in Ethernet. Traditional Ethernet uses 10BASE-T
specifications. The number 10 depicts 10MBPS speed, BASE stands for baseband, and T stands for Thick
Ethernet. 10BASE-T Ethernet provides transmission speed up to 10MBPS and uses coaxial cable or Cat-5
twisted pair cable with RJ-5 connector. Ethernet follows Star topology with segment length up to 100 meters.
All devices are connected to a hub/switch in a star fashion.
Fast-Ethernet-:
To encompass need of fast emerging software and hardware technologies, Ethernet extends
itself as Fast-Ethernet. It can run on UTP, Optical Fiber, and wirelessly too. It can provide speed up to
100MBPS. This standard is named as 100BASE-T in IEEE 803.2 using Cat-5 twisted pair cable. It uses
CSMA/CD technique for wired media sharing among the Ethernet hosts and CSMA/CA (CA stands for
Collision Avoidance) technique for wireless Ethernet LAN. Fast Ethernet on fiber is defined under 100BASE-
FX standard which provides speed up to 100MBPS on fiber. Ethernet over fiber can be extended up to 100
meters in half-duplex mode and can reach maximum of 2000 meters in full-duplex over multimode fibers.
Giga-Ethernet-:
After being introduced in 1995, Fast-Ethernet retained its high speed status only for three
years till Giga-Ethernet introduced. Giga-Ethernet provides speed up to 1000 mbits/seconds. IEEE802.3ab
standardizes Giga-Ethernet over UTP using Cat-5, Cat-5e and Cat-6 cables. IEEE802.3ah defines Giga-
Ethernet over Fiber.
Internet, Intranet and Extranet-:
Internet If you wish to expose Intranet An application is considered to Extranet From time to time, an
information to everyone in the be on the companys intranet if it is using application that has been built
world, then you would build an Internet-type protocols such as HTTP or for the Companys intranet and
Internet-type application. An FTP but the application is available only used by internal employees will
Internet-type application within the company. The information on a need to be extended to select
Uses Internet protocols such as companys intranet would not be business partners or customers.
HTTP, FTP, or SMTP and is accessible to persons on the Internet If you extend your intranet out
available to persons anywhere because it is not for public use. For to select business partners or
on the Internet. We use the example, a few years ago I was sitting customers, you have created an
Internet and web applications with my banking officer going over my extranet. An extranet cannot be
as ways to extend who the account and noticed that the bank had used by anyone else external to
application can reach. For moved all of its customer account the company except for those
example, I no longer need to go information to a web site and that the selected individuals.
to the bank to transfer funds. banking officer was using a Web browser
Because the bank has built a to retrieve my account details. Although
web site on the Internet, I can the application was being used by a web
do that from the comfort of my browser, it was still an internal
own home. application meant only for banking
officers.
Network Topologies-:
A network topology is the physical layout of computers, cables, and other components
on a network. There are a number of different network topologies, and a network may be built using multiple
topologies. The different types of network layouts are
1. Bus topology 2.Star topology 3.Mesh topology 4. Ring topology 5. Hybrid topology
6. Wireless topology
Network devices-:
Network devices are components used to connect computers or other electronic devices
together so that they can share files or resources like printers or fax machines. Devices used to setup a Local
Area Network (LAN) are the most common types of network devices used by the public. A LAN requires a
hub, router, cabling or radio technology, network cards, and if online access is desired, a high-speed
modem. This is much less complicated than it might sound to someone new to networking.
HUB-:
A hub is used in a wired network to connect Ethernet cables from
a number of devices together. The hub allows each device to talk to the
others. Hubs arent used in networks with only wireless connections, since
network devices such as routers and adapters communicate directly with
one another. Hubs are such simple devices they require no
configuration, and have no manuals that their function is now included
in other devices such as routers and modems.
Router -:
A router is a communications device that connects multiple
computers or other routers together and transmits data to its correct
destination on the network. A router can be used on any size of network.
On the largest scale, routers along the Internet backbone forward data
packets to their destination using the fastest available path. For smaller
business and home networks, a router allows multiple computers to share
a single high-speed Internet connection such as through a cable modem
or DSL modem. These routers connect from 2 to 250 computers. To
prevent unauthorized users from accessing files and computers, many
routers are protected by a built-in antivirus protection. Routers also
support wireless communications, eliminating the need for a separate
wireless access point in a wireless network. If network has a separate
wireless access point, it connects to the router via a cable. Some routers
also include additional functionality such as including a built-in print server.
Modem-:
A computers digital signals must be converted to analog signals
before they are transmitted over standard telephone lines. The
communications devices that perform this conversion in a modem,
sometimes called a dial-up modem. The word, modem, is derived from the
combination of the words, modulation, to change into an analog signal,
and demodulation, to convert an analog signal into a digital signal. Both the
sending and receiving ends o a standard telephone line (communications
channel) must have a dial-up modem or data transmission to occur. For
example, a dial-up modem connected to a sending computer converts the
computers digital signals into analog signals. The analog signals then can travel over a standard telephone
line. At the receiving end, another dial-up modem converts the analog signals
back into digital signals that a receiving computer can process.
Bridge-:
A bridge reads the outermost section of data on the data packet, to
tell where the message is going. It reduces the traffic on other network
segments, since it does not send all packets. Bridges can be programmed to
reject packets from particular networks. Bridging occurs at the data link layer
of the OSI model, which means the bridge cannot read IP address, but only
the outermost hardware address of the packet. In our case the bridge can read
the Ethernet data which gives the hardware address of the destination address, not the IP address. Bridges
forward all broadcast messages. Only a special bridge called a translation bridge will allow two networks of
different architectures to be connected. Bridges do not normally allow connection of networks with different
architectures. The hardware address is also called the MAC (media access control) address. To determine the
network segment a MAC address belongs to, bridges use one of the following
Transparent Bridging :
They build a table of addresses (bridging table) as they receive packets. If the
address is not in the bridging table, the packet is forwarded to all segments other than the one it came from.
This type of bridge is used on Ethernet networks.
Source Route Bridging :
The source computer provides path information inside the packet. This is used on
Token Ring networks. A gateway can translate information between different network data formats or network
architectures. It can translate TCP/IP to AppleTalk so computers supporting TCP/IP can communicate with
Apple brand computers. Most gateways operate at the application layer, but can operate at the network or
session layer o the OSI model. Gateways will start at the lower level and strip information until it gets to the
required level and repackage the information and work its way back toward the hardware layer of the OSI
model. To confuse issues, when talking about a router that is used to interface to another network, the word
gateway is often used. This does not mean the routing machine is a gateway as defined here, although it could
be.
Layer 7-:
The application layer - This is the layer at
which communication partners are identified,
quality of service (QoS) is identified, user
authentication and privacy are considered, and any
constraints on data syntax are identified. (This layer
is not the application itself, although some
applications may perform application layer
functions.)
Layer 6-:
The presentation layer - This is a layer, usually part of an operating system (OS), that converts
incoming and outgoing data from one presentation format to another (for example, from a text stream into a
popup window with the newly-arrived text).
Layer 5-:
The session layer - This layer sets up, coordinates, and terminates conversations, exchanges, and
dialogs between the applications at each end. It deals with session and connection coordination.
Layer 4-:
The transport layer - This layer manages the end-to-end control (for example, determining whether all
packets have arrived) and error-checking. It ensures complete data transfer.
Layer 3-:
The network layer - This layer handles the routing of the data (sending it in the right direction to the
right destination on outgoing transmissions and receiving incoming transmissions at the packet level). The
network layer does routing and forwarding.
Layer 2-:
The data-link layer - This layer provides synchronization for the physical level and does bit-stuffing
for strings of 1's in excess of 5. It furnishes transmission protocol knowledge and management. This layer has
two sub layers, the Logical Link Control Layer and the Media Access Control Layer.
Layer 1-:
The physical layer - This layer conveys the
bit stream through the network at the electrical and
mechanical level. It provides the hardware means of
sending and receiving data on a carrier network.
TCP/IP Model -:
The Transmission Control Protocol
/ Internet Protocol (TCP/IP) was created by the
Department of Defense (DoD) to make sure and
protect data integrity, and also maintained
communications in the time of disastrous war.
However, if designed and deployed properly
according to standard, a TCP/IP network can be a
truly reliable and flexible one. Essentially, the
Department of Defense (DoD) Model is a reduced version of the OSI Reference Model. The DoD model based
on four layers:
IP Address-:
Every machine on a network has a unique identifier. Most networks today, including all
computers on the Internet, use the TCP/IP protocol as the standard for how to communicate on the network. In
the TCP/IP protocol, the unique identifier for a computer is called its IP address.
avoid confusion with the developing information space known as the World Wide Web. The first Web
browser with a graphical user interface was Mosaic, which appeared in 1993. Many of the user interface
features in Mosaic went into Netscape Navigator. Microsoft followed with its Internet Explorer (IE).
Bandwidth -:
Bandwidth describes the rate at which data can be transferred to your computer from a website
or internet service within a specific time. Therefore the amount of bandwidth you have (the bandwidth
'strength') determines the efficiency and speed of your internet activity that is, when you open web pages,
download files and so on. A useful analogy is a pipe with water running through it the wider the pipe, the
greater the volume of water that can flow through it. The same applies to bandwidth strength and the flow of
the volume of data. Bandwidth is generally measured in bits per second' or sometimes bytes per second'.
ARPANET- :
Advanced Research Projects Agency Network, ARPANET or ARPAnet began development
in 1966 by the United States ARPA. ARPANET was a Wide Area Network linking many Universities and
research centers, was first to use packet switching, and was the beginning of what we consider the Internet
today. Some of the reasons for creating ARPANET include making it easier for people to access computers, to
improve computer equipment, and to have a more effective communication method for the military.
Bookmark - :
When referring to the Internet or a browser, a bookmark or electronic bookmark is a method of
saving a web page's address. For example, with most browsers pressing Ctrl + D will bookmark the page you
are viewing.
Bounce - :
A description of what occurs when an e-mail message returns back to the sender as undeliverable.
Some e-mail programs also have a bounce or bounce back feature built into them, which allows the user to
bounce messages back to the sender causing the e-mail address to appear invalid.
Cyber Law-:
Cyber law is the part of the overall legal system that deals with the Internet, cyberspace, and
their respective legal issues. Cyber law covers a fairly broad area, encompassing several subtopics including
freedom of expression, access to and usage of the Internet, and online privacy. Generically, cyber law has been
referred to as the Law of the Internet.
DNS-:
Domain Name System or Domain Name Service, a DNS is an Internet or other network server that
helps to point domain names or the hostname to their associated IP address that was introduced by Paul
Mockapetris and Jon Postel in1984. If a domain name is not found within the local database, the server may
query other domain servers to obtain the address of a domain name. For example, when a user is accessing the
ibtindia domain a user would enter the easy to remember domain: ibtindia.com. When entered that domain
name is looked up on a Domain Name System to translate that name into an IP address that can be better
understood by computer, e.g. 69.72.169.241. Using that IP address the computers can then find the computer
containing the ibtindia web page and forward that information to your computer.
Phishing-:
Pronounced like fishing, phishing is a term used to describe a
malicious individual or group of individuals scamming users by sending
e-mails or creating web pages that are designed to collect an individual's
online bank, credit card, or other login information. Because these e-mails
and web pages look like legitimate companies users trust them and enter
their personal information.
Search engine-:
A search engine is a software program or script
available through the Internet that searches documents and files for
keywords and returns the results of any files containing those keywords.
Today, there are thousands of different search engines available on the
Internet, each with their own abilities and features. The first search
engine ever developed is considered Archie, which was used to search for
FTP files and the first text-based search engine is considered Veronica.
Today, the most popular and well known search engine is Google.
Firewall-:
A firewall is a software utility or hardware device that limits outside network access to a computer
or local network by blocking or restricting network ports. Firewalls are a great step for helping prevent un-
authorized access to a company or home network. The picture is an example of a hardware firewall, the
ZyXEL ZyWALL a Unified Security Gateway with a Firewall and other security features. In addition to
hardware firewalls like that shown above, basic hardware firewalls are also commonly found in most network
routers and can be configured and setup through the router setup. Software firewalls are designed to protect the
computer they are installed onto by blocking any unrestricted programs from sending and receiving
information from the network or Internet. A good example of a software Firewall is the Windows Firewall that
is included with Microsoft Windows.
Hacking-:
Hacking in simple terms means an illegal intrusion into a
computer system and/or network. There is an equivalent term to
hacking i.e. cracking, but from Indian Laws perspective there is no
difference between the term hacking and cracking. Every act
committed towards breaking into a computer and/or network is
hacking. Hackers write or use ready-made computer programs to
attack the target computer. They possess the desire to destruct and
they get the kick out of such destruction. Some hackers hack for
personal monetary gains, such as to stealing the credit card
information, transferring money from various bank accounts to their
own account followed by withdrawal of money. They extort money
from some corporate giant threatening him to publish the stolen
information which is critical in nature.
Message Switching-:
In this switching method, a different strategy is used, where instead of
establishing a dedicated physical line between the sender and the
receiver, the message is sent to the nearest directly connected switching
node. This node stores the message, checks for errors, selects the best
available route and forwards the message to the next intermediate node.
The line becomes free again for other messages, while the process is
being continued in some other nodes. Due to the mode of action, this
method is also known as store-and-forward technology where the
message hops from node to node to its final destination. Each node
stores the full message, checks for errors and forwards it. In this
switching technique, more devices can share the network bandwidth, as
compared with circuit switching technique. Temporary storage of
message reduces traffic congestion to some extent. Higher priority can be given to urgent messages, so that the
low priority messages are delayed while the urgent ones are forwarded faster. Through broadcast addresses one
message can be sent to several users. Last of all, since the destination host need not be active when the
message is sent, message switching techniques improve global communications.
Packet Switching -:
The basic approach is not much
different from message switching. It is also based on the
same store-and-forward approach. However, to overcome
the limitations of message switching, messages are divided
into subsets of equal length called packets. This approach
was developed for long-distance data communication
(1970) and it has evolved over time. In packet switching
approach, data are transmitted in short packets (few
Kbytes). A long message is broken up into a series of
packets as shown in Fig. Every packet contains some
control information in its header, which is required for
routing and other purposes. Main difference between
Packet switching and Circuit Switching is that the
communication lines are not dedicated to passing messages
from the source to the destination. In Packet Switching,
different messages (and even different packets) can pass
through different routes, and when there is a "dead time" in the communication between the source and the
destination, the lines can be used by other sources.
Circuit switching-:
A networking technology that provides a
temporary, but dedicated, connection between two stations no
matter how many switching devices the data are routed
through. Circuit switching was originally developed for the
analog-based telephone system in order to guarantee steady,
consistent service for two people engaged in a phone
conversation. Analog circuit switching Frequency Division
Multiplexing (FDM) has given way to digital circuit switching
Time Division Multiplexing (TDM), and the digital
counterpart still maintains the connection until broken.
each one. Private key encryption is essentially the same as a secret code that the two computers must each
know in order to decode the information. The code would provide the key to decoding the message. Think of it
like this. You create a coded message to send to a friend where each letter is substituted by the letter that is
second from it. So "A" becomes "C" and "B" becomes "D". You have already told a trusted friend that the
code is "Shift by 2". Your friend gets the message and decodes it. Anyone else who sees the message will only
see nonsense.
Digital signature-:
A digital signature is basically a way to ensure that an electronic document (e-mail,
spreadsheet, text file, etc.) is authentic. Authentic means that you know who created the document and you
know that it has not been altered in any way since that person created it. Digital signatures rely on certain types
of encryption to ensure authentication. Encryption is the process of taking all the data that one computer is
sending to another and encoding it into a form that only the other computer will be able to decode.
Authentication is the process of verifying that information is coming from a trusted source. These two
processes work hand in hand for digital signatures.
III-tier Architecture -:
Three levels of data abstraction (III-tier Architecture)-:
They are three levels of abstraction are given below,
1. Physical level: The lowest level of abstraction
describes how data are stored. (How to store the
data?)
2. Logical level: The next higher level of abstraction,
describes what data are stored in database and what
relationship among those data. (What type of data to
be stored?)
3. View level: The highest level of abstraction describes
only part of entire database. (How to show the data?)
Integrity rules-:
There are two types of Integrity rules
1. Entity Integrity: States that "Primary key cannot have NULL value"
2. Referential Integrity: States that "Foreign Key can be either a NULL value or should be Primary
Key value of other relation.
Data Independence-:
Data independence means that "the application is independent of the storage structure
and access strategy of data". In other words, the ability to modify the schema definition in one level should not
affect the schema definition in the next higher level.
Two types of Data Independence:
1. Physical Data Independence: Modification in physical level should not affect the logical level.
2. Logical Data Independence: Modification in logical level should affect the view level.
The people who use the database can be categorized -
a) Database users b) Database administrator (DBA)
1) Naive users:
These are the unsophisticated users who interact with the system by invoking one of the
application programs that have been written previously. E.g. consider a user who checks for account balance
information over the World Wide Web. Such a user access a form, enters the account number and password
etc. And the application program on the internet then retrieves the account balance using given account
information which is passed to the user.
2) Application programmers-:
These are computer professionals who write application programs, used to
develop user interfaces. The application programmer uses Rapid Application Development (RAD) toolkit or
special type of programming languages which include special features to facilitate generation of forms and
display of date on screen.
3) Sophisticated users-:
These users interact with the database using database query language. They submit
their query to the query processor. Then Data Manipulation Language (DML) functions are performed on the
database to retrieve the data. Tools used by these users are OLAP (Online Analytical Processing) and data
mining tools.
4) Specialized users-:
These users write specialized database applications to retrieve data. These applications
can be used to retrieve data with complex data types e.g. graphics data and audio data.
Relational Model-:
The most popular data model in
DBMS is the Relational Model. It is more scientific a
model than others. This model is based on first-order
predicate logic and defines a table as an n-array relation.
The main highlights of this model are
1. Data is stored in tables called relations.
2. Relations can be normalized.
3. In normalized relations, values saved are
atomic values.
descriptive name, its relationship is described (or it becomes part of some structure that implicitly describes
relationship), the type of data (such as text or image or binary value) is described, possible predefined values
are listed, and a brief textual description is provided. This collection can be organized for reference into a book
called a data dictionary.
ER model-:
The ER model defines the conceptual view of a database. It works around real-world entities and
the associations among them. At view level, the ER model is considered a good option for designing databases.
Entity-:
An entity can be a real-world object, either
animate or inanimate, that can be easily identifiable. For
example, in a school database, students, teachers, classes,
and courses offered can be considered as entities. All these
entities have some attributes or properties that give them their identity.
Entity set-:
An entity set is a collection of similar types of entities. An entity set may contain entities with
attribute sharing similar values. For example, a Students set may contain all the students of a school; likewise a
Teachers set may contain all the teachers of a school from all faculties. Entity sets need not be disjoint.
Attributes-:
Entities are represented by means of their properties, called attributes. All attributes have values.
For example, a student entity may have name, class, and age as attributes. There are different type of attributes
that are given below-
1. Simple attribute:
Simple attributes are atomic values, which cannot be divided further. For example, a
student's phone number is an atomic value of 10 digits.
2. Composite attribute:
Composite attributes are made of more than one simple attribute. For example, a
student's complete name may have first_name and last_name.
3. Derived attribute :
Derived attributes are the attributes that do not exist in the physical database, but
their values are derived from other attributes present in the database. For example, average_salary in a
department should not be saved directly in the database, instead it can be derived. For another example, age
can be derived from data_of_birth.
4. Single-value attribute:
Single-value attributes contain single value. For example
Social_Security_Number.
5. Multi-value attribute:
Multi-value attributes may contain more than one values. For example, a person
can have more than one phone number, email_address, etc.
Generalization-:
As mentioned above, the process of generalizing entities,
where the generalized entities contain the properties of all the generalized
entities is called generalization. In generalization, a number of entities
are brought together into one generalized entity based on their similar
characteristics. For example, pigeon, house sparrow, crow and dove can
all be generalized as Birds.
Specialization-:
customer, or vendor, based on what role they play in the company. Similarly, in a school database, persons can
be specialized as teacher, student, or a staff, based on what role they play in school as entities.
Normalization-:
If a database design is not perfect, it may contain anomalies, which are like a bad dream for any
database administrator. Managing a database with anomalies is next to impossible.
Update anomalies :
If data items are scattered and are not linked to each other properly, then it could lead to
strange situations. For example, when we try to update one data item having its copies scattered over several
places, a few instances get updated properly while a few others are left with old values. Such instances leave
the database in an inconsistent state.
Deletion anomalies -:
We tried to delete a record, but parts of it was left undeleted because of unawareness,
the data is also saved somewhere else.
Insert anomalies -:
We tried to insert data in a record that does not exist at all. Normalization is a method to
remove all these anomalies and bring the database to a consistent state.
Each attribute must contain only a single value from its pre-defined domain.
Second Normal Form-:
Before we learn about the second normal form, we need to understand the following
1. Prime attribute : An attribute, which is a part of the prime-key, is known as a prime attribute.
2. Non-prime attribute : An attribute, which is not a part of the prime-key, is said to be a non-prime
attribute. If we follow second normal form, then every non-prime attribute should be fully functionally
dependent on prime key attribute. That is, if X A holds, then there should not be any proper subset Y of X,
for which Y A also holds true. We see here in Student_Project relation that the prime key attributes are
Stu_ID and Proj_ID. According to the rule, non-key attributes, i.e. Stu_Name and Proj_Name must be
dependent upon both and not on any of the prime key attribute individually. But we find that Stu_Name can be
identified by Stu_ID and Proj_Name can be identified by Proj_ID independently. This is called partial
dependency, which is not allowed in Second Normal Form. We broke the relation in two as depicted in the
above picture. So there exists no partial dependency.
Atomicity This property states that a transaction must be treated as an atomic unit, that is, either all
of its operations are executed or none. There must be no state in a database where a transaction is left
partially completed. States should be defined either before the execution of the transaction or after
the execution/abortion/failure of the transaction.
Consistency The database must remain in a consistent state after any transaction. No transaction
should have any adverse effect on the data residing in the database. If the database was in a
consistent state before the execution of a transaction, it must remain consistent after the execution of
the transaction as well.
Durability The database should be durable enough to hold all its latest updates even if the system
fails or restarts. If a transaction updates a chunk of data in a database and commits, then the database
will hold the modified data. If a transaction commits but the system fails before the data could be
written on to the disk, then that data will be updated once the system springs back into action.
Isolation In a database system where more than one transaction are being executed simultaneously
and in parallel, the property of isolation states that all the transactions will be carried out and
executed as if it is the only transaction in the system. No transaction will affect the existence of any
other transaction.
OLAP-:
On Line Analytical Processing (OLAP) is a Business Intelligence (BI) reporting system. OLAP
provides the user with the capability to sum, count, average and do other simple arithmetic operations on
groups of data. An OLAP report has measures and dimensions. Measures are the data values to be displayed.
Dimensions are characteristics of the measures. OLAP reports are called OLAP cubes, although such reports
are not limited to three dimensions.
ODBC-:
ODBC is a standard that contains an interface that provides a common language for application
programs to access and process SQL databases. In order to use ODBC, a driver, server name, database name,
user id, and password are required. ODBC is important for Internet applications and has gained wide
acceptance.
ODBC- :
ODBC is a standard that contains an interface that provides a common language for application
programs to access and process SQL databases. In order to use ODBC, a driver, server name, database name,
user id, and password are required. ODBC is important for Internet applications and has gained wide
acceptance.
Entity-:
It is a 'thing' in the real world with an independent existence.
Entity type-:
It is a collection (set) of entities that have same attributes.
Entity set-:
It is a collection of all entities of particular entity type in the database.
Triggers can be viewed as similar to stored procedures in that both consist of procedural logic that is stored at
the database level. Stored procedures, however, are not event-drive and are not attached to a specific table as
triggers are. Stored procedures are explicitly executed by invoking a CALL to the procedure while triggers are
implicitly executed. In addition, triggers can also execute stored procedures.
What is Cursor-:
Cursor is a database object used by applications to manipulate data in a set on a row-by- row
basis, instead of the typical SQL commands that operate on all the rows in the set at one time.
In order to work with a cursor we need to perform some steps in the following order:
1. Declare cursor
2. Open cursor
3. Fetch row from the cursor
4. Process fetched row
5. Close cursor
6. Deallocate cursor
Different Types of Join-:
Cross Join a cross join that does not have a WHERE clause produces the Cartesian
product of the tables involved in the join. The size of a Cartesian product result set is the number of rows in the
first table multiplied by the number of rows in the second table. The common example is when company wants
to combine each product with a pricing table to analyze each product at each price.
Inner Join- A join that displays only the rows that have a match in both joined tables is known as inner Join.
This is the default type of join in the Query and View Designer.
Outer Join- A join that includes rows even if they do not have related rows in the joined table is an Outer
Join. You can create three different outer join to specify the unmatched rows to be included:
Left Outer Join- In Left Outer Join all rows in the first-named table i.e. "left" table, which appears leftmost in
the JOIN clause are included. Unmatched rows in the right table do not appear.
Right Outer Join- In Right Outer Join all rows in the second-named table i.e. "right" table, which appears
rightmost in the JOIN clause are included. Unmatched rows in the left table are not included.
Full Outer Join- In Full Outer Join all rows in all joined tables are included, whether they are matched or not.
Self Join-This is a particular case when one table joins to itself, with one or two aliases to avoid confusion. A
self join can be of any type, as long as the joined tables are the same. A self join is rather unique in that it
involves a relationship with only one table. The common example is when company has a hierarchal reporting
structure whereby one member of staff reports to another. Self Join can be Outer Join or Inner Join.
Data Warehousing-:
Subject-oriented, meaning that the data in the database is organized so that all the data
elements relating to the same real world event or object are linked together; Time-variant, meaning that the
changes to the data in the database are tracked and recorded so that reports can be produced showing changes
over time; Non-volatile, meaning that data in the database is never over-written or deleted, once committed,
the data is static, read-only, but retained for future reporting. Integrated, meaning that the database contains
data from most or all of an organization's operational applications, and that this data is made consistent.
DATA STRUCTURE
DATA STRUCTURE-:
In computer science, a data structure is a particular way of storing and organizing
data in a computers memory so that it can be used efficiently. Data may be organized in many different ways;
the logical or mathematical model of a particular organization of data is called a data structure. The choice of a
particular data model depends on the two considerations first; it must be rich enough in structure to mirror the
actual relationships of the data in the real world. On the other hand, the structure should be simple enough that
one can effectively process the data whenever necessary.
Need of data structure-:
It gives different level of organization data.
It tells how data can be stored and accessed in its elementary level.
Provide operation on group of data, such as adding an item, looking up highest priority item.
Provide a means to manage huge amount of data efficiently.
Provide fast searching and sorting of data.
Selecting a data structure-:
Selection of suitable data structure involve following steps
Analyze the problem to determine the resource constraints a solution must meet.
Determine basic operation that must be supported. Quantify resource constraint for each operation
Select the data structure that best meets these requirements.
Each data structure has cost and benefits. Rarely is one data structure better than other in all situations.
Type of data structure-:
1. Static data structure: A data structure whose organizational characteristics are invariant throughout its
lifetime. Such structures are well supported by high-level languages and familiar examples are arrays and
records. The prime features of static structures are
[A]None of the structural information need be stored explicitly within the elements it is often held in a
distinct logical/physical header;
[B]The elements of an allocated structure are physically contiguous, held in a single segment of memory.
[C]All descriptive information, other than the physical location of the allocated structure, is determined by the
structure definition.
[D]Relationships between elements do not change during the lifetime of the structure.
2. Dynamic data structure-:
A data structure whose organizational characteristics may change during its
lifetime. The adaptability afforded by such structures, e.g. linked lists, is often at the expense of decreased
efficiency in accessing elements of the structure. Two main features distinguish dynamic structures from static
data structures. Firstly, it is no longer possible to infer all structural information from a header; each data
element will have to contain information relating it logically to other elements of the structure. Secondly, using
a single block of contiguous storage is often not appropriate, and hence it is necessary to provide some storage
management scheme at run-time.
Array-:
The simplest type of data structure is a linear (or one dimensional) array. A list of a finite number n of
similar data referenced respectively by a set of n consecutive numbers, usually 1, 2, 3 . . . . . . . n. if we choose
the name A for the array, then the elements of A are denoted by subscript notation.
Linked List-:
A linked list or one way list is a linear collection of data elements, called nodes, where the linear
order is given by means of pointers. Each node is divided into two parts:
1.The first part contains the information of the element/node
2.The second part contains the address of the next node (link /next pointer field) in the list.
There is a special pointer Start/List contains the address of first node in the list. If this special pointer contains
null, means that List is empty.
Abstract Data Type-:
It can be defined as a collection of data items together with the operations on the data.
The word abstract refers to the fact that the data and the basic operations defined on it are being studied
independently of how they are implemented. It involves what can be done with the data, not how has to be
done. For ex, in the below figure the user would be involved in checking that what can be done with the data
collected not how it has to be done.
Queue- :
A queue is a linear list of elements in
which deletion can take place only at one end,
called the front, and insertions can take place only
at the other end, called the rear. The term front
and rear are used in describing a linear list only
when it is implemented as a queue. Queue is also
called first-in-first-out (FIFO) lists. Since the first
element in a queue will be the first element out of
the queue. In other words, the order in which elements enters a queue is the order in which they leave.
There are main two ways to implement a queue:
1. Circular queue using array
2. Linked Structures (Pointers)
Primary queue operations:
Enqueue : insert an element at the rear of the queue.
Dequeue : remove an element from the front of the queue Following is the algorithm which describes the
implementation of Queue using an Array.
Priority queue-:
Priority queue is a linear data structure. It is having a list of items in which each item has
associated priority. It works on a principle add an element to the queue with an associated priority and remove
the element from the queue that has the highest priority. In general different items may have different
priorities. In this queue highest or the lowest priority item are inserted in random order. It is possible to delete
an element from a priority queue in order of their priorities starting with the highest priority. While priority
queues are often implemented with heaps, they are
conceptually distinct from heaps. A priority queue is an
abstract concept like "a list" or "a map"; just as a list can be
implemented with a linked list or an array, a priority queue
can be implemented with a heap or a variety of other
methods such as an unordered array.
Stack-:
It is an ordered group of homogeneous items of
elements. Elements are added to and removed from the top
of the stack (the most recently added items are at the top of
the stack). The last element to be added is the first to be
removed (LIFO: Last In, First Out).
Stack Operations-:
These are two basic operations associated with stack:
1. Push() is the term used to insert/add an element into a stack.
2. Pop() is the term used to delete/remove an element from a stack.
Tree - :
A node is a structure which may contain a value, a condition, or represent a separate data structure
(which could be a tree of its own). Each node in a tree has zero or more child nodes, which are below it in the
tree (by convention, trees grow down, not up as they do in nature). A node that has a child is called the child's
parent node (or ancestor node, or superior). A node has at most one parent. Nodes that do not have any
children are called leaf nodes. They are also referred to as terminal nodes. The height of a node is the length
of the longest downward path to a leaf from that node. The height of the root is the height of the tree. The
depth of a node is the length of the path to its root (i.e., its root path).
Binary Tree -:
The binary tree is a fundamental data structure
used in computer science. The binary tree is a useful data
structure for rapidly storing sorted data and rapidly retrieving
stored data. A binary tree is composed of parent nodes, or
leaves, each of which stores data and also links to up to two
other child nodes (leaves) which can be visualized spatially as
below the first node with one placed to the left and with one
placed to the right. It is the relationship between the leaves
linked to and the linking leaf, also known as the parent node,
which makes the binary tree such an efficient data structure. It is
the leaf on the left which has a lesser key value (i.e, the value
used to search for a leaf in the tree), and it is the leaf on the right
which has an equal or greater key value. As a result, the leaves
on the farthest left of the tree have the lowest values, whereas
the leaves on the right of the tree have the greatest values. More
importantly, as each leaf connects to two other leaves, it is the beginning of a new, smaller, binary tree. Due to
this nature, it is possible to easily access and insert data in a binary tree using search and insert functions
recursively called on successive leaves.
Traversal:-
A traversal is a process that visits all the nodes in the tree. Since a tree
is a nonlinear data structure, there is no unique traversal.
There are three different types traversals,
PreOrder traversal - visit the parent first and then left and right children.
InOrder traversal - visit the left child, then the parent and the right child.
PostOrder traversal - visit left child, then the right child and then the parent.
There is only one kind of breadth-first traversal--the level order traversal.
This traversal visits nodes by levels from top to bottom and from left to right. As an example consider the
following tree and its four traversals:
PreOrder - 8, 5, 9, 7, 1, 12, 2, 4, 11, 3
InOrder - 9, 5, 1, 7, 2, 12, 8, 4, 3,11
PostOrder - 9, 1, 2, 12, 7, 5, 3, 11,4, 8
In the next picture we demonstrate the order of node visitation. Number 1 denotes the first node in a particular
traversal and 7 denote the last node.
Linear Search-:
Linear search or sequential search is a method for finding a particular value in a list that consists
of checking every one of its elements, one at a time and in sequence, until the desired one is found.
Binary search-:
A binary search or half-interval search algorithm finds the position of a specified input value
(the search "key") within an array sorted by key value. For binary search, the array should be arranged in
ascending or descending order. In each step, the algorithm compares the search key value with the key value of
the middle element of the array. If the keys match, then a matching element has been found and its index is
returned. Otherwise, if the search key is less than the middle element's key, then the algorithm repeats its
action on the sub-array to the left of the middle element or, if the search key is greater, on the sub-array to the
right. If the remaining array to be searched is empty, then the key cannot be found in the array and a special
"not found" indication is returned.
Graph-:
Data sometimes contains a relationship between
pairs of elements which is not necessarily hierarchical in
nature, e.g. an airline flights only between the cities
connected by lines. This data structure is called Graph.
OPERATING SYSTEM
Operating system -:
An operating system is a
program that acts as an interface between the user and
the computer hardware and controls the execution of all
kinds of programs.
Following are some of important functions of an
operating System.
1. Memory Management
2. Processor Management
3. Device Management
4. File Management
5. Security
6. Control over system performance
7. Job accounting
8. Error detecting aids
9. Coordination between other software and users
Following are some of the important activities that Operating System does.
Security -- By means of password and similar other techniques, preventing unauthorized access to
programs and data.
Control over system performance -- Recording delays between request for a service and response
from the system.
Job accounting -- Keeping track of time and resources used by various jobs and users.
Error detecting aids -- Production of dumps, traces, error messages and other debugging and error
detecting aids.
Coordination between other software and users -- Coordination and assignment of compilers,
interpreters, assemblers and other software to the various users of the computer systems.
Types of operating System-:
1. Real Time operating System-:
Real time system is defines as a data processing system in which the
time interval required to process and respond to inputs is so small that it controls the environment. Real time
processing is always on line whereas on line system need not be real time. The time taken by the system to
respond to an input and display of required updated information is termed as response time. So in this method
response time is very less as compared to the online processing. Real-time systems are used when there are
rigid time requirements on the operation of a processor or the flow of data and real-time systems can be used
as a control device in a dedicated application. Real-time operating system has well-defined, fixed time
constraints otherwise system will fail. For example Scientific experiments, medical imaging systems, industrial
control systems, weapon systems, robots, and home-applicance controllers, Air traffic control system etc.
There are two types of real-time operating systems.
a) Hard real-time systems-: Hard real-time systems guarantee that critical tasks complete on time. In
hard real-time systems secondary storage is limited or missing with data stored in ROM. In these
systems virtual memory is almost never found.
b) Soft real-time systems-: Soft real time systems are less restrictive. Critical real-time task gets priority
over other tasks and retains the priority until it completes. Soft real-time systems have limited utility
than hard real-time systems. For example, Multimedia, virtual reality, Advanced Scientific Projects
like undersea exploration and planetary rovers etc.
2. Distributed operating System-:
Distributed systems use multiple central processors to serve multiple
real time application and multiple users. Data processing jobs are distributed among the processors
accordingly to which one can perform each job most efficiently. The processors communicate with
one another through various communication lines (such as high-speed buses or telephone lines). These
are referred as loosely coupled systems or distributed systems. Processors in a distributed system may
vary in size and function. These processors are referred as sites, nodes, computers and so on.
3. Time-sharing operating systems-:
Time sharing is a technique which enables many people, located at
various terminals, to use a particular computer system at the same time. Time-sharing or multitasking is a
logical extension of multiprogramming. Processor's time which is shared among multiple users simultaneously
is termed as time-sharing. The main difference between Multiprogrammed Batch Systems and Time-Sharing
Systems is that in case of Multiprogrammed batch systems, objective is to maximize processor use, whereas in
Time-Sharing Systems objective is to minimize response time. Multiple jobs are executed by the CPU by
switching between them, but the switches occur so frequently. Thus, the user can receive an immediate
response. Operating system uses CPU scheduling and multiprogramming to provide each user with a small
portion of a time. Computer systems that were designed primarily as batch systems have been modified to
time-sharing systems.
Advantages of Timesharing operating systems are following-:
Provide advantage of quick response.
Avoids duplication of software.
Reduces CPU idle time.
Disadvantages of Timesharing operating systems are following.
Problem of reliability.
Question of security and integrity of user programs and data.
Problem of data communication.
4. Batch operating system-:
The users of batch operating system do not interact with the computer directly.
Each user prepares his job on an off-line device like punch cards and submits it to the computer operator. To
speed up processing, jobs with similar needs are batched together and run as a group. Thus, the programmers
left their programs with the operator. The operator then sorts programs into batches with similar requirements.
5. Multitasking -:
Multitasking refers to term where multiple
jobs are executed by the CPU simultaneously by switching
between them. Switches occur so frequently that the users
may interact with each program while it is running. Operating
system does the following activities related to multitasking.
The user gives instructions to the operating system or to a
program directly, and receives an immediate response.
Operating System handles multitasking in the way that it can
handle multiple operations / executes multiple programs at a
time. Multitasking Operating Systems are also known as
Time-sharing systems. These Operating Systems were developed to provide interactive use of a computer
system at a reasonable cost.
A time-shared operating system uses concept of CPU scheduling and multiprogramming to provide each user
with a small portion of a time-shared CPU. Each user has at least one separate program in memory.
6. Multiprogramming-:
When two or more
programs are residing in memory at the same
time, then sharing the processor is referred to the
multiprogramming. Multiprogramming assumes a
single shared processor. Multiprogramming
increases CPU utilization by organizing jobs so
that the CPU always has one to execute.
Following figure shows the memory layout for a
multiprogramming system. Operating system does
the following activities related to
multiprogramming.
The operating system keeps several jobs in memory at a time.
This set of jobs is a subset of the jobs kept in the job pool.
The operating system picks and begins to execute one of the job in the memory.
Multiprogramming operating system monitors the state of all active programs and system resources
using memory management programs to ensures that the CPU is never idle unless there are no jobs
Advantages
High and efficient CPU utilization.
User feels that many programs are allotted CPU almost simultaneously.
Disadvantages
CPU scheduling is required.
To accommodate many jobs in memory, memory management is required.
Spooling -:
Spooling is an acronym for simultaneous peripheral
operations on line. Spooling refers to putting data of various I/O
jobs in a buffer. This buffer is a special area in memory or hard
disk which is accessible to I/O devices. Operating system does the
following activates related to distributed environment. OS handles
I/O device data spooling as devices have different data access
rates. OS maintains the spooling buffer which provides a waiting
station where data can rest while the slower device catches up. OS
maintains parallel computation because of spooling process as a
computer can perform I/O in parallel fashion. It becomes possible
to have the computer read data from a tape, write data to disk and
to write out to a tape printer while it is doing its computing task.
Advantages-:
The spooling operation uses a disk as a very large buffer. Spooling is capable of overlapping I/O
operation for one job with processor operations for another job.
Process-:
A process is a program in execution. The execution of a process must progress in a sequential
fashion. Definition of process is following. A process is defined as an entity which represents the basic unit of
work to be implemented in the system.
Program-:
A program by itself is not a process. It is a static entity made up of program statement while process
is a dynamic entity. Program contains the instructions to be executed by processor. A program takes a space at
single place in main memory and continues to stay there. A program does not perform any action by itself.
Process States-:
As a process executes, it changes state. The state of a process is defined as the current activity
of the process. Process can have one of the following five states at a time.
Process control block includes CPU scheduling, I/O resource management, file management information etc.
The PCB serves as the repository for any information which can vary from process to process. Loader/linker
sets flags and registers when a process is created. If that process get suspended, the contents of the registers are
saved on a stack and the pointer to the particular stack frame is stored in the PCB. By this technique, the
hardware state can be restored so that the process can be scheduled to run again.
Schedulers-:
Schedulers are special system softwares which handles process scheduling in various ways.
Their main task is to select the jobs to be submitted into the system and to decide which process to run.
Schedulers are of three types-
Long Term Scheduler
Short Term Scheduler
Medium Term Scheduler
Long Term Scheduler -:
It is also called job scheduler. Long term scheduler determines which programs are
admitted to the system for processing. Job scheduler selects processes from the queue and loads them into
memory for execution. Process loads into the memory for CPU scheduling. The primary objective of the job
scheduler is to provide a balanced mix of jobs, such as I/O bound and processor bound. It also controls the
degree of multiprogramming. If the degree of multiprogramming is stable, then the average rate of process
creation must be equal to the average departure rate of processes leaving the system. On some systems, the
long term scheduler may not be available or minimal. Time-sharing operating systems have no long term
scheduler. When process changes the state from new to ready, then there is use of long term scheduler.
Short Term Scheduler-:
It is also called CPU scheduler. Main objective is increasing system performance in
accordance with the chosen set of criteria. It is the change of ready state to running state of the process. CPU
scheduler selects process among the processes that are ready to execute and allocates CPU to one of them.
Short term scheduler also known as dispatcher, execute most frequently and makes the fine grained decision of
which process to execute next. Short term scheduler is faster than long term scheduler.
Medium Term Scheduler-:
Medium term scheduling is part of the swapping. It removes the processes from
the memory. It reduces the degree of multiprogramming. The medium term scheduler is in-charge of handling
the swapped out-processes. Running process may become suspended if it makes an I/O request. Suspended
processes cannot make any progress towards completion. In this condition, to remove the process from
memory and make space for other process, the suspended process is moved to the secondary storage. This
process is called swapping, and the process is said to be swapped out or rolled out. Swapping may be
necessary to improve the process mix. Comparison between Scheduler-:
S.N. Long Term Scheduler Short Term Scheduler Medium Term Scheduler
1 It is a job scheduler It is a CPU scheduler It is a process swapping scheduler.
2 Speed is lesser than short Speed is fastest among Speed is in between both short and long
term scheduler other two term scheduler.
3 It controls the degree of It provides lesser control It reduces the degree of multiprogramming.
multiprogramming over degree of
multiprogramming
4 It is almost absent or It is also minimal in time It is a part of Time sharing systems.
minimal in time sharing sharing system
system
5 It selects processes from It selects those processes It can re-introduce the process into memory
pool and loads them into which are ready to and execution can be continued.
memory for execution execute
Scheduling Algorithms-: there are different types of algorithms that are given below
1. First Come First Serve (FCFS) Scheduling 2. Shortest-Job-First (SJF) Scheduling
3. Priority Scheduling 4. Round Robin(RR) Scheduling
5. Multilevel Queue Scheduling
Thread-:
A thread is a flow of execution through the process code, with its own program counter, system
registers and stack. A thread is also called a light weight process. Threads provide a way to improve
application performance through parallelism. Threads represent a software approach to improving performance
of operating system by reducing the overhead thread is equivalent to a classical process. Each thread belongs
to exactly one process and no thread can exist outside a process. Each thread represents a separate flow of
control. Threads have been successfully used in implementing network servers and web server. They also
provide a suitable foundation for parallel execution of applications on shared memory multiprocessors.
Following figure shows the working of the single and multithreaded processes.
Difference between Process and Thread
Swapping- :
Swapping is a mechanism in which a process can be swapped temporarily out of main memory to
a backing store, and then brought back into memory for continued execution. Backing store is a usually a hard
disk drive or any other secondary storage which fast in access and large enough to accommodate copies of all
memory images for all users. It must be capable of providing direct access to these memory images. Major
time consuming part of swapping is transfer time. Total transfer time is directly proportional to the amount of
memory swapped. Let us assume that the user process is of size 100KB and the backing store is a standard
hard disk with transfer rate of 1 MB per second. The actual transfer of the 100K process to or from memory
will take 100KB / 1000KB per second
= 1/10 second
= 100 milliseconds
Fragmentation- :
As processes are loaded and removed from memory, the free memory space is broken into
little pieces. It happens after sometimes that processes cannot be allocated to memory blocks considering their
small size and memory blocks remains unused. This problem is known as Fragmentation.
Paging-:
External fragmentation is avoided by using paging technique. Paging is a technique in which physical
memory is broken into blocks of the same size called pages (size is power of 2, between 512 bytes and 8192
bytes). When a process is to be executed, it's corresponding pages are loaded into any available memory
frames. Logical address space of a process can be non-contiguous and a process is allocated physical memory
whenever the free memory frame is available. Operating system keeps track of all free frames. Operating
system needs n free frames to run a program of size n pages. Address generated by CPU is divided into
Page number (p) - page number is used as an index into a page table which contains base address of each
page in physical memory.
Page offset [D] - page offset is combined with base address to define the physical memory address.
Segmentation-:
Segmentation is a technique to break memory into logical pieces where each piece represents a
group of related information. For example, data segments or code segment for each process, data segment for
operating system and so on. Segmentation can be implemented using or without using paging. Unlike paging,
segment are having varying sizes and thus eliminates internal fragmentation. External fragmentation still exists
but to lesser extent.
Deadlocks-:
Deadlocks are a set of blocked processes each
holding a resource and waiting to acquire a resource held by
another process.
How to avoid Deadlocks-:
Deadlocks can be avoided by
avoiding at least one of the four conditions, because all this four
conditions are required simultaneously to cause deadlock.
1. Mutual Exclusion-:
Resources shared such as read-only files do
not lead to deadlocks but resources, such as printers and tape drives, requires exclusive access by a single
process.
2. Hold and Wait-:
In this condition processes must be prevented from holding one or more resources while
simultaneously waiting for one or more others.
3. No Preemption-:
Preemption of process resource allocations can avoid the condition of deadlocks, where
ever possible.
4. Circular Wait-:
Circular wait can be avoided if we number all resources, and require that processes request
resources only in strictly increasing (or decreasing) order.
Handling Deadlock-:
The above points focus on preventing deadlocks. But what to do once a deadlock has
occurred. Following three strategies can be used to remove deadlock after its occurrence.
1. Preemption-:
We can take a resource from one process and give it to other. This will resolve the deadlock
situation, but sometimes it does causes problems.
2. Rollback-:
In situations where deadlock is a real possibility, the system can periodically make a record of
the state of each process and when deadlock occurs, roll everything back to the last checkpoint, and restart, but
allocating resources differently so that deadlock does not occur.
3. Kill one or more processes-: This is the simplest way, but it works.
13. To check if data that is being entered does [C] Mainframe scheduling
not have blanks, we have [D] Automated scheduling
[A] A mathematically calculated check digit [E] None of these
[B] Control check to verify if the data is in Ans:-C
accordance to predetermined criteria. 21. MICR devices can read:
[C] Completeness check [A] Characters [B] Numbers
[D] All of these [C] Both of these [D] All of these
[E] None of these [E] None of these
Ans:-C Ans:-C
14. A detective control is used to check if 22. Auxiliary storage consists of
correct numbers are keyed in [A] Magnetic tapes [B] CDs
[A] Sequence check [B] Manual check [C] Both of these [D] All of these
[C] Check digits [D] All of these [E] None of these
[E] None of these Ans:-A
Ans:-C 23. Who can provides access rights to users?
15. On August 23, 2005, an accounting clerk [A] Data custodian [B] Data owner
prepared an invoice dated August 31,2005, [C] The data base administrator [D] Management
Which control can check this? [E] None of these
[A] Size check [B] Hash total Ans:-C
[C] Range check [D] All of the above 24. Security policy of an organization need not
[E] None of these have
Ans:-C [A] The overall security philosophy of the
16. Processing control procedures have organization
[A] Authorization and authentication of users [B] The authorization procedure for accessing data
[B] Access control for online data [C] Security awareness program
[C] Reporting of before and after images [D] Highlights and identity of the sensitive
[D] All of these security features
[E] None of these [E] None of these
Ans:-D Ans:-D
17. Which cannot assure data accuracy in an 25. In case of a virus getting into computer,
application? which of the following will help?
[A] Control total [A] Encryption [B] NORTON
[B] Limit and reasonableness test [C] Police complaint [D] All of these
[C] Echo checking [E] None of these
[D] All of these Ans:-B
[E] None of these 26. Which of the following do you think is NOT
Ans:-C necessary for computerization system in a
18. A computer works faster with bank?
[A] GUI [B] Mouse [A] Effective customer service
[C] Keyboard [D] All of these [B] Effective back office integration
[E] None of these [C] Focus on manual records
Ans:-A [D] All of these
19. SMTP protocol is used for [E] None of these
[A] Sending email messages between servers Ans:-C
[B] Sits between client server 27. BCNF is needed because:
[C] Transmit news to all clients [A] Otherwise tuples may be duplicated
[D] All of the above [B] When a data is deleted tuples may be lost
[E] None of these [C] Updating is otherwise is difficult
Ans:-A [D] When there is dependent attributes in two
20. Which form of job scheduling uses triggers? possible composite keys one of the attribute is
[A] Manual scheduling unnecessarily duplicated in the tuples.
[B] Distributed scheduling [E] None of these
43. Which of there can have more than one [A] Hardware and software [B] Input and Output
value? [C] Keyboard and Printer [D] All the above
[A] A composite attribute [E] None of these
[B] A multi valued attribute Ans:-A
[C] A Derived attribute 50. Address Resolution Protocol (ARP) is used
[D] All the above for:
[E] None of these [A] Relating IP Address to Ethernet addresses
Ans:-A [B] Preventing two computers from using the same
44. Which of the following do you think is NOT IP address.
true for SNMP? [C] Enables a workstation to know its IP address
[A] It is connection less protocol by broad casting its local address.
[B] It guarantees data transmission [D] All the above
[C] It can accommodate devices from different [E] None of these
vendors Ans:-A
[D] All the above 51. How many click are actually in the mouse?
[E] None of these [A] 1
Ans:-C [B] 2
45. What are the facilities offered by tale- [C] 3
banking? [D] Depends from mouse to mouse
[A] Balance enquiries [E] None of these
[B] Enquiries about the specific transaction Ans:-B
[C] Transfer of funds 52. Which of there can have more than one
[D] All the above value?
[E] None of these [A] A composite attribute
Ans:-C [B] A multi valued attribute
46. Approval for software projects has to be [C] A Derived attribute
done by [D] All the above
[A] The project head [E] None of these
[B] The user department head Ans:-A
[C] The senior management 53. How many layers in OSI Model?
[D] All the above [A] 8 [B] 4
[E] None of these [C] 7 [D] 5
Ans:-C [E] None of these
47. The base line for a software in term if Ans:-C
software configuration management 54. Which layer is reasonable for the user
[A] Point of latest release of the software interface?
[B] Point of latest change of the software [A] Physical Layer
[C] Point of change approved in the software and [B] Application Layer
added to the project data base [C] Data Link Layer
[D] All the above [D] All the above
[E] None of 1these [E] None of these
Ans:-C Ans:-B
48. The purpose of using computer in an 55. Approval for software projects has to be
organization is _____________? done by
[A] To produce image, texts, reports etc. [A] The project head
[B] To be able get on the internet [B] The user department head
[C] To process data in to information [C] The senior management
[D] All the above [D] All the above
[E] None of these [E] None of these
Ans:-C Ans:-C
49. Which of the following mandatory parts of 56. The base line for a software in term if
complete PC system? software configuration management
[A] Point of latest release of the software [A] A compiler using static memory, allocation
[B] Point of latest change of the software can be written for L.
[C] Point of change approved in the software and [B] A compiler cannot be written L: an interpreter
added to the project data base must be used
[D] All the above [C] A compiler using dynamic memory allocation
[E] None of 1these can be written
Ans:-C [D] All of the above
57. The purpose of using computer in an [E] None of these
organization is _____________? Ans:-C
[A] To produce image, texts, reports etc. 64. Which of the following systems
[B] To be able get on the internet implementation approaches should be used if
[C] To process data in to information you want to run the old system and the new
[D] All the above system at the same time for a specified period?
[E] None of these [A] Direct [B] Pilot
Ans:-C [C]Phased [D]Parallel
58. Which of the following mandatory parts of [E] None of these
complete PC system? Ans:-D
[A] Hardware and software [B] Input and Output 65. In open (), the mode, that opens a binary file
[C] Keyboard and Printer [D] All the above for readings is
[E] None of these [A] r [B] r+
Ans:-A [C] rb [D] r+b
59. The elements of computer processing system [E] None of these
are Ans:-C
[A] Hardware, software, information &people 66. Dirty bit for a page in a page table
[B] Hardware, programs, and people [A] Helps avoid unnecessary writers on a paging
[C] Hardware, Data, users, and procedures device
[D] All the above [B] Helps maintain LRU information
[E] None of these [C]Allows only read on as page
Ans:-C [D] All the above
60. What are the safest ways to edit registry in [E] None of these
win 95? Ans:-A
[A] Edit [B] REGEDIT 67. Which of the following is not a logical
[C] DEVICE MANAGER [D] Control Panel database structure?
Applets [A] Tree [B] Relational
[E] None of these [C] Network [D] Chain
Ans:-D [E] None of these
61. Input of Lex is ----- Ans:-D
[A] Set a regular expression [B] Statement 68. Which is not included in the UNIX file
[C] Numeric data [D] ASCII code system?
[E] None of these [A] Bin [B] Usr
Ans:-A [C] DevQ [D] All the above
62. Stack is structure. [E] None of these
[A] Last in first out (LIFO) Ans:-D.
[B] First in First out (FIFO) 69. The idea of automation with a stack as
[C] First in Last out (FILO) auxiliary storage----
[D] First come First served (FCFS) [A] Finite automata
[E] None of these [B] Pushdown automata
Ans:-A [C] Deterministic automata
63. A language L allows declaration of arrays [D] All the above
whose sizes are not known during compilation. [E] None of these
It is required to use efficient use of memory, Ans:-B
which one of the following is true?
70. Which of the following derivations does a 77. Which of the following circuit type is based
top-down parser while parsing an input string? up on time or clock pulse?
The input is assumed to be scanned in left to right [A] Combinational circuit
order. [B] Sequential circuit
[A] Left most derivation [C] Full adder
[B] Left most derivation traced out in reverse [D] All the above
[C] Right most derivation [E] None of these
[D] Right most derivation traced out in reverse Ans:-B
[E] None of these 78. A solution to the problem were the source
Ans:-A and destination hosts are on the same type of
71. Layer one of the OSI model is: network, but there is a
[A] Physical layer [B] Link layer different network in between------
[C] Transport layer [D] Network layer [A] Data link [B] Packet
[E] None of these [C] Tunneling [D] Hopping
Ans:-A [E] None of these
72. IE uses Ans:-C
[A] Active X controls for interaction between 79. Which is true?
browser and third party application and the [A] Functional testing is called black box testing
operating system [B] Structure testing is called glass box testing
[B] Active X control for browser and operating [C] Glass box testing is called white box testing
system [D] All the above
[C] Both 1 and 2 [E] None of these
[D] Active X controls for only operating system Ans:-D
[E] None of these 80. Storage class defines
(Ans):-A [A] The data type [B] The scope
73. Parsing is also known as ---------- [C] The scope and performance
[A] Lexical analysis [B] Syntax analysis [D] The scope, performance and data type
[C] Semantic analysis [D] Code generation [E] None of these
[E] None of these (Ans):-C
Ans:-B 81. 128.167.152.2 is a class________ address
74. The derivation will be called .derivation [A] A [B] B
if the non-terminal symbol replaced at every [C] C [D] D
step is [E] None of these
the left most non-terminal symbol in the string. (Ans):-B
[A] Left shifting [B] Left recursion 82. DMA is
[C] Left most [D] Left pushdown [A] High speed I/O devices
[E] None of these [B] It transfers blocks of data directly to and from
Ans:-C its own buffer storage to memory
75. Who provide the leased line? [C] In DMA transfer for I/O, CPU has no
[A] WWW [B]TCP/IP intervention
[C] ISDN [D] ISP [D] All the above
[E] None of these [E] None of these
Ans:-D Ans:-D
76. Master slave flip-flop is also referred to as 83. Randomized quick sort is an extension of
the. quick sort where the pivot is chosen randomly.
[A] Level triggered flip-flop What is the worst case complexity of sorting n
[B] Pulse triggered flip-flop numbers using randomized quick sort?
[C] Edge triggered flip-flop [A] 0 (n) [B] 0 (n log n)
[D] All the above [C] 0 (n2) [D] 0 (log n)
[E] None of these [E] None of these
Ans:-B Ans:-B
84. CIDR (Classless inter Domain Routing)
[A] It is used in class C Networks 90.What happens if you digitally sign and inject
[B] It is used in class B Networks footer on an e-mail message in the order?
[C] It is used in class A Network [A] Nothing
[D] All the above [B] The message wont be sent.
[E] None of these [C] The footer will invalidate the signature.
Ans:-A [D] The footer will be illegible.
[E] None of these
85. What type of attack do some firewalls try to Ans:-C
limit by enforcing rules on how long a GET or 91. This is a class of programs that searches
POST request can be? your hard drive and floppy disks for any known
[A] Smurf or potential virus:
[B] Denial of service [A] Intrusion Detection
[C] Buffer overflow [B] Security identifier
[D] LAND [C] Antigen
[E] None of these [D] Probe
Ans:-C [E] Antivirus software
86. This is a documents that states in writing Ans:-E
how a company plans to protect the companys 93. Which of them is not an input control type?
physical [A] Unintentional entry of wrong data
and IT assets : [B] Preparation of false input forms
[A] Data Encryption Standard [C] Intentional entry of fraudulent data
[B] Security Policy [D] Use of unauthorized Input forms
[C] Public Key Certificate [E] Password secrecy
[D] Access Control List Ans:-E
[E] Copyright 94. Which cannot assure data accuracy in an
Ans:-B application?
87. Which are examples of IPS (Intrusion [A] Control total
Protection system) ? [B] Limit and reasonableness test
[A] Solar Open Design Wall [C] Echo checking
[B] Grsecurity [D] All of these
[C] LOMAC [E] None of these
[D] All of the above Ans:-C
[E] None of these 95. A computer works faster with
Ans:-D [A] GUI
88. Which of the following are methods of [B] Mouse
Network Security? [C] Keyboard
[A] VPN [D] All of these
[B] Encryption [E] None of these
[C] Honey pots Ans:-C
[D] Firewall 96. Which form of job scheduling uses triggers?
[E] All of the above [A] Manual scheduling
Ans:-E [B] Distributed scheduling
89. This is a set of related programs, usually [C] Mainframe scheduling
located at a network gateway server, that [D] Automated scheduling
protects the resources of a private network [E] None of these
from other network: Ans:-C
[A] Firewall 97. MICR devices can read:
[B] Root kit [A] Letters
[C] Sandbox [B] Numbers
[D] Password Cracker [C] Both of these
[E] None of these [D] All of these
Ans:-A [E] None of these
111. Which of the following person should be 117. The purpose of using computer in an
made responsible for reporting maintenance organization is _____________?
problems in a LAN? [A] To produce image, texts, reports etc.
[A] Network administrator [B] To be able get on the internet
[B] Users [C] To process data in to information
[C] Security officer [D] All the above
[D] All the above [E] None of these
[E] None of these Ans:-C
Ans :-B 118. Which of the following mandatory parts of
112. Software change management decides: complete PC system?
[A] How to manage alternations, irrespective of [A] Hardware and software
the stage of the life cycle of a product [B] Input and Output
[B] Development stages working [C] Keyboard and Printer
[C] Maintenance stages working [D] All the above
[D] All the above [E] None of these
[E] None of these Ans:-A
Ans:-A 119. The elements of computer processing
113. Address Resolution Protocol (ARP) is used system are
for: [A] Hardware, software, information &people
[A] Relating IP Address to Ethernet addresses [B] Hardware, programs, and people
[B] Preventing two computers from using the same [C] Hardware, Data, users, and procedures
IP address [D] All the above
[C] Enables a workstation to know its IP address [E] None of these
by broad casting its local address Ans:-C
[D] All the above 120. To stop unauthorized access to the
[E] None of these computer systems we should:
Ans:-A [A] Have a trust worthy system administrator
114. Which of there can have more than one [B] Have a sound encryption policy
value? [C] Have as good password policy
[A] A composite attribute [D] All of the above
[B] A multi valued attribute [E] None of these
[C] A Derived attribute Ans:-C
[D] All the above 121. An attack on network will not bother to do:
[E] None of these [A] Network Investigation
Ans:-A [B] Network Management
115. Which of the following do you think is [C] Access Gaining
NOT true for SNMP? [D] Escaping
[A] It is connection less protocol [E] None of these
[B] It guarantees data transmission Ans:-B
[C] It can accommodate devices from different 122. Which of the following details do you think
vendors should be checked on security breaches?
[D] All the above [A] Authorized access to system resources
[E] None of these [B] Un-authorized access to system
Ans:-C [C] Un-authorized attempts to change security
116. Approval for software projects has to be definitions
done by: [D] All of the above
[A] The project head [E] None of these
[B] The user department head Ans:-D
[C] The senior management 123. The internet is an example of a:
[D] All the above [A] Packet switched network
[E] None of these [B] Cell switched network
Ans:-C [C] Circuit switched network
Ans-B Ans: A
277. A __________ program finds spelling 286. Relational calculus is a
errors you might have made when typing a [A]Procedural language.
document. [B]Non- Procedural language.
[A]spelling checker [B]grammar checker [C]Data definition language.
[C]Remove [D]Delete [D]High level language.
Ans-A Ans: B
278. Any line can be individually __________ 287. The view of total database content is
between the left and right margins of the page. [A]Conceptual view. [B]Internal view.
[A]aligned [B]centered [C]External view. [D]Physical View.
[C]Horizental [D]Verticall Ans: A
Ans-B 288. Cartesian product in relational algebra is
279. Accidental or incorrect deletions can [A]a Unary operator. [B]a Binary operator.
usually be repaired with the __________ [C]a Ternary operator. [D]not defined.
command Ans-B
[A]undo [B]redo 289. AS clause is used in SQL for
[C]Copy [D]Print preview [A]Selection operation. [B]Rename operation.
Ans-A [C]Join operation. [D]Projection operation.
280. Forms that are used to organize business Ans-B AS clause is used in SQL for rename
data into rows and columns are called: operation.
[A]Registers [B]Spreadsheets 290. ODBC stands for
[C]Business forms [D]TrAnsaction sheets [A]Object Database Connectivity.
Ans-B [B]Oral Database Connectivity.
281. A computerized version of a manual [C]Oracle Database Connectivity.
spreadsheet is a(n): [D]Open Database Connectivity.
[A]Analysis sheet [B] Electronic spreadsheet Ans-D
[C]Planning sheet [D]Journal 291. Architecture of the database can be viewed
Ans-B as
282. The greatest labor-saving aspect of the [A]two levels. [B]four levels.
electronic spreadsheet is: [C]three levels. [D]one level.
[A]automatic recalculation. Ans-C
[B]building formulas. [C]building functions. 292. In a relational model, relations are termed
[D]building charts. as
Ans-A [A]Tuples. [B]Attributes
283. The process of changing one or more [C]Tables. [D]Rows.
spreadsheet values and observing the results is: Ans-c
[A]what-if analysis. [B]formula analysis. 293. In the architecture of a database system
[C]business analysis. [D] break-even analysis. external level is the
Ans-A [A]physical level. [B]logical level.
284. The letter and number of the intersecting [C]conceptual level [D]view level.
column and row is the: Ans: D
[A]cell coordinates. [B]cell location. 294. An entity set that does not have sufficient
[C]cell position. [D]cell address. attributes to form a primary key is a
Ans-D [A]strong entity set. [B]weak entity set.
285. The cell in which you can type data is the: [C]simple entity set. [D]primary entity set.
[A]active cell. [B]new cell. Ans: B
[C]set cell. [D]ready cell. 295. In a Hierarchical model records are
Ans-A organized as
285. In the relational modes, cardinality is [A]Graph. [B]List.
termed as: [C]Links. [D]Tree.
[A]Number of tuples. [B]Number of attributes. Ans: D
[C]Number of tables. [D]Number of constraints.