CMP212 Lecture Notes FAMS
CMP212 Lecture Notes FAMS
Lecturers:
Dr. Sakinat O. Folorunso (Lead)
(Room 2, Department of Computer Sciences, Faculty of Science Building)
E-mail: [email protected]
1.1 Introduction
The term Computer is derived from ‘compute’ which means ‘to calculate’. We are all familiar
with calculations in our day-to-day life. We apply mathematical operations like addition, subtraction,
multiplication, etc. and many other formulae for calculations. Simple calculations take less time. But
complex calculations take much longer time. Another factor is accuracy in calculations. So man
explored with the idea to develop a machine, which can perform this type of arithmetic calculation
faster, and with full accuracy. This gave birth to a machine called ‘computer’.
2. Accuracy
The accuracy of computers is consistently high enough which avoids any errors. If it all there are
errors, they are due to errors in instructions given by the programmer.
3. Reliable
The output generated by the computer is very reliable, but it is reliable only when the data, which is
passing as input to the computer and the program, which gives instructions are correct and reliable.
4. Storage Capacity
The computer has a provision to store large volumes of data in the small storage devices, which have
capacity to store huge amounts of data and help the retrieval of data an easy task.
5. Versatile
Computers are very versatile machines. Computers are capable of performing almost any
task ,provided the task can be reduced to a series of logical steps.
6. Automation
Once the instructions fed into computer it works automatically without any human intervention until
the completion of execution of program or meets logical instructions to terminate the job.
c) Entertainment
Computers help to watch movies online, play games online; act as a virtual entertainer in
playing games, listening to music, etc. MIDI instruments greatly help people in the
entertainment industry in recording music with artificial instruments. Videos can be fed from
computers to full screen televisions. Photo editors are available with fabulous features.
d) Industry
Computers are used to perform several tasks in industries like managing inventory, designing
purpose, creating virtual sample products, interior designing, video conferencing, etc. Online
marketing has seen a great revolution in its ability to sell various products to inaccessible
corners like interior or rural areas. Stock markets have seen phenomenal participation from
different levels of people through the use of computers.
f) Education
Computers are used in education sector through online classes, online examinations, referring e-
books, online tutoring, etc. They help in increased use of audio-visual aids in the education
field.
g) Government
In government sectors, computers are used in data processing, maintaining a database of
citizens and supporting a paperless environment. The country’s defence organizations have
greatly benefitted from computers in their use for missile development, satellites, rocket
launches, etc.
h) Banking
In the banking sector, computers are used to store details of customers and conduct transactions,
such as withdrawal and deposit of money through ATMs. Banks have reduced manual errors
and expenses to a great extent through extensive use of computers.
i) Business
Nowadays, computers are totally integrated into business. The main objective of business is
transaction processing, which involves transactions with suppliers, employees or customers.
Computers can make these transactions easy and accurate. People can analyze investments,
sales, expenses, markets and other aspects of business using computers.
j) Training
Many organizations use computer-based training to train their employees, to save money and
improve performance. Video conferencing through computers allows saving of time and
travelling costs by being able to connect people in various locations.
k) Arts
Computers are extensively used in dance, photography, arts and culture. The fluid movement of
dance can be shown live via animation. Photos can be digitized using computers.
Advantages
a) Vacuum tubes were the only electronic component available during those days.
b) Vacuum tube technology made possible to make electronic digital computers.
c) These computers could calculate data in millisecond.
Disadvantages
a) The computers were very large in size.
b) They consumed a large amount of energy.
c) They heated very soon due to thousands of vacuum tubes.
d) They were not very reliable.
e) Air conditioning was required.
f) Constant maintenance was required.
g) Non-portable.
h) Costly commercial production.
i) Limited commercial use.
j) Very slow speed.
k) Limited programming capabilities.
l) Used machine language only.
m) Used magnetic drums which provide very less data storage.
n) Used punch cards for input.
o) Not versatile and very faulty.
Advantages
a) Smaller in size as compared to the first generation computers.
b) The 2nd generation Computers were more reliable
c) Used less energy and were not heated.
d) Wider commercial use
e) Better portability as compared to the first generation computers.
f) Better speed and could calculate data in microseconds
g) Used faster peripherals like tape drives, magnetic disks, printer etc.
h) Used Assembly language instead of Machine language.
i) Accuracy improved.
Disadvantages
a) Cooling system was required
b) Constant maintenance was required
c) Commercial production was difficult
d) Only used for specific purposes
e) Costly and not versatile
f) Punch cards were used for input.
Disadvantages
a) Air conditioning was required.
b) Highly sophisticated technology required for the manufacturing of IC chips.
Advantages
a) More powerful and reliable than previous generations.
b) Small in size
c) Fast processing power with less power consumption
d) Fan for heat discharging and thus to keep cold.
e) No air conditioning required.
f) Totally general purpose
g) Commercial production
h) Less need of repair.
i) Cheapest among all generations
j) All types of High level languages can be used in this type of computers
Disadvantages
The latest technology is required for manufacturing of Microprocessors.
2. Special Purpose Computers: These digital computer are designed, made and used for any specific
job. These are usually used for those purposes which are critical and need great accuracy and response
like Satellite launching, weather forecasting etc.
Analog Computers: These are almost extinct today. These are different from a digital computer
because an analog computer can perform several mathematical operations simultaneously. It uses
continuous variables for mathematical operations and utilizes mechanical or electrical energy.
Examples are telephone lines, speedometer, resistance of capacitor, frequency of signal and voltage etc
Digital Computers: They use digital circuits and are designed to operate on two states, namely bits 0
and 1. They are analogous to states ON and OFF. Data on these computers is represented as a series of
0s and 1s. Digital computers are suitable for complex computation and have higher processing speeds.
They are programmable. Digital computers are either general purpose computers or special purpose
ones. General purpose computers, as their name suggests, are designed for specific types of data
processing while general purpose computers are meant for general use.
Examples include: IBM PC, Apple Macintosh, modern smartphones
Hybrid Computers: These computers are a combination of both digital and analog computers. In this
type of computers, the digital segments perform process control by conversion of analog signals to
digital ones. Examples include electrocardiogram, ultrasound, echo-cardiogram, CT scan machines, etc
1.4.3 According to the size of computer
According to the sizes of the computers, the computers are classified as follows.
a) Supercomputers:
The highly calculation-intensive tasks can be effectively performed by means of
supercomputers. Quantum physics, mechanics, space exploration, earth quake studies, nuclear
weapons testing, weather forecasting, molecular theory are best studied by means of
supercomputers. Their ability of parallel processing and their well-designed memory hierarchy
give the supercomputers, large transaction processing powers.
Ex. PARAM developed in India.
b) Servers:
They are computers designed to provide services to client machines in a computer network.
They have larger storage capacities and powerful processors. Running on them are programs
that serve client requests and allocate resources like memory and time to client machines.
Usually they are very large in size, as they have large processors and many hard drives. They
are designed to be fail-safe and resistant to crash.
c) Mainframe Computers:
Large organizations use mainframes for highly critical applications such as bulk data processing
and ERP. Most of the mainframe computers have capacities to host multiple operating systems
and operate as a number of virtual machines. They can substitute for several small servers.
d) Wearable Computers:
A record-setting step in the evolution of computers was the creation of wearable computers.
These computers can be worn on the body and are often used in the study of behavior modeling
and human health. Military and health professionals have incorporated wearable computers into
their daily routine, as a part of such studies. When the users’ hands and sensory organs are
engaged in other activities, wearable computers are of great help in tracking human actions.
Wearable computers do not have to be turned on and off and remain in operation without user
intervention
e) Minicomputers:
In terms of size and processing capacity, minicomputers lie in between mainframes and
microcomputers. Minicomputers are also called mid-range systems or workstations. The term
began to be popularly used in the 1960s to refer to relatively smaller third generation
computers. They took up the space that would be needed for a refrigerator or two and used
transistor and core memory technologies. The 12-bit PDP-8 minicomputer of the Digital
Equipment Corporation was the first successful minicomputer. These computers are not
designed for a single user. Individual departments of a large company or organizations use
Mini-computers for specific purposes. For example, a production department can use Mini-
computers for monitoring certain production process.
f) Microcomputers:
A computer with a microprocessor and its central processing unit is known as a microcomputer.
They do not occupy space as much as mainframes do. When supplemented with a keyboard and
a mouse, microcomputers can be called personal computers. A monitor, a keyboard and other
similar input-output devices, computer memory in the form of RAM and a power supply unit
come packaged in a microcomputer. These computers can fit on desks or tables and prove to be
the best choice for single-user tasks.
Desktop computers, laptops, personal digital assistant (PDA), tablets & smartphones are all
types of microcomputers. The micro-computers are widely used & the fastest growing
computers. These computers are the cheapest among the other three types of computers.
ii) Laptops: Similar in operation to desktops, laptop computers are miniaturized and
optimized for mobile use. Laptops run on a single battery or an external adapter that
charges the computer batteries. They are enabled with an inbuilt keyboard, touch pad
acting as a mouse and a liquid crystal display. Their portability and capacity to operate
on battery power have proven to be of great help to mobile users.
iii) Notebooks: They fall in the category of laptops, but are inexpensive and relatively
smaller in size. They had a smaller feature set and lesser capacities in comparison to
regular laptops, at the time they came into the market. But with passing time, notebooks
too began featuring almost everything that notebooks had. By the end of 2008,
notebooks had begun to overtake notebooks in terms of market share and sales.
iv) Personal Digital Assistants (PDAs):It is a handheld computer and popularly known as a
palmtop. It has a touch screen and a memory card for storage of data. PDAs can also be
used as portable audio players, web browsers and smart phones. Most of them can
access the Internet by means of Bluetooth or Wi-Fi communication.
v) Tablet Computers: Tablets are mobile computers that are very handy to use. They use
the touch screen technology. Tablets come with an onscreen keyboard or use a stylus or a
digital pen. Apple’s iPad redefined the class of tablet computers.
a) Input:
This is the process of entering data and programs in to the computer system. Therefore, the
input unit takes data from us to the computer in an organized manner for processing through an
input device such as keyboard, mouse, MICR, OCR, Etc.,
b) Main Memory:
It is also known as internal memory. It is very fast in operation. It is used to store data and
instructions. Data has to be fed into the system before the actual processing starts. It contains a
part of the operating system Software, one or more execution programs being executed, the data
being processed and required by the programs for execution , and processed data awaiting
output.
c) Output:
This is the process of producing results from the data for getting useful information. Similarly
the output produced by the computer after processing must also be kept somewhere inside the
computer before being given to you in human readable form through the screen or printer.
Again the output is also stored inside the computer for further processing.
f) Secondary storage:
It is also known as auxiliary memory. It is closely linked with the main memory. Since main
memory can’t be flooded with unwanted data at particular moment, same is stored in auxiliary
memory from which desired data is fed to main memory as and when required by it. Thus
secondary storage is used to hold mass of information i.e., system software, application
programs, cinemas, games and data files. Obviously the capacity of secondary storage is very
high compared to main memory. Auxiliary memory usually in the form of Magnetic disk,
Magnetic tape, CD’s, Memory cards, Pen drives Etc.,
CHAPTER TWO: INPUT AND OUTPUT DEVICES
2.1 Introduction
Generally, we give data and program to the computer for processing. So what we give to the
Computer is known as input. That can be an image from a Digital Camera, or some letters types via
keyboard in a word document. The device through which we give the input is called input device.
Output is the result of the data we can see through some output device like a picture displayed by the
monitor, a word documented printed by a printer etc. The device through which we get output is called
output device.
a) Key board:
The keyboard is very much like a standard typewriter keyboard with a few additional keys. The
basic QWERTY layout of characters is maintained to make it easy for the trained typist to use
the system. The additional keys are included to perform certain special functions such as
loading a program, edition a text, etc. These are known as function keys that vary in number
from system to system. See Figure 2.1
g) Digitizing Tablet
This is an input device that enables you to enter drawings and sketches into a computer. A
digitizing tablet consists of an electronic tablet and a cursor or pen. A cursor (also called a puck)
is similar to a mouse, except that it has a window with cross hairs for pinpoint placement, and it
can have as many as 16 buttons. A pen (also called a stylus) looks like a simple ballpoint pen
but uses an electronic head instead of ink. The tablet contains electronic field that enables it to
detect movement of the cursor or pen and translate the movements into digital signals that it
sends to the computer. Digitizing tables are also called digitizers, graphics tables, touch tables
or simply tables.
h) Scanner
Scanner is an input device that can read text or illustrations printed on paper and translate the
information into a form that the computer can use. A scanner works by digitizing an image -
dividing it into a grid of boxes and representing each box with either a zero or a one, depending
on whether the box is filled in. The resulting matrix of bits, called a bit map, can then be stored
in a file, displayed on a screen and manipulated by programs. Optical scanners do not
distinguish text from illustrations, they represent all images as bit maps. Therefore, you cannot
directly edit text that has been scanned. To edit text read by an optical scanner, you need an
optical character recognition (OCR) system to translate the image into ASCII characters. Most
optical scanners sold today come with OCR packages. See Figure 2.11.
i) Mouse
The computer mouse is designed after the animal mouse. The mouse is a device that controls
the movement of the cursor or pointer on a display screen. It is a small object you can roll
along a hard and flat surface. As you move the mouse, the pointer on the display screen moves
in the same direction. Mouse contains at least one button and sometimes as many as three,
which have different functions depending on what program is running. See Figure 2.12.
j) Light Pen
Light pen is an input device that utilizes a light-sensitive detector to select objects on a display
screen.
l) Digital Camera
Digital Cameras are used to capture images. Those images are then transferred to a computer
when the Camera is connected to the computer. Mostly the Digital Camera images are in JPEG
format. See Figure 2.13.
a) Monitors
The first is the typical monitor that looks like the television screen and uses a large vacuum tube
called a cathode ray tube (CRT). Its operation is very similar to that of a television picture tube,
with an electronic gun shooting a beam of electrons to illuminate the pixels (picture elements)
on the screen. The number of pixel per screen determines the resolution. The resolution of a
monitor indicates how densely the pixels are packed. The second type, known as the flat-panel
display, is used with laptops or notebook computers. While the earlier monitors could only
display one color, that is, black, grayscale, etc. modern monitors have good support for color
and graphics show though this may require more memory.
b) Projector
A projector or image projector is an optical device that projects an image (or moving images)
onto a surface, commonly a projection screen. The images created from most projectors happen
by shining a light through a small transparent lens, but some newer types of projectors can
project the image directly, by using lasers. A virtual retinal display, or retinal projector, is a
projector that displays an image directly on the retina instead of an external screen. A video
projector is the most common type. Video projectors are digital replacements for earlier types of
projectors such as slide projectors and overhead projectors.
c) Speakers
Speaker is an important part of a computer system. Some systems have a built-in speaker,
though they are small in size. Speaker is an essential part of a computer because they can notify
about various system notifications through various sounds.
d) Printer
Printer is a device that prints text or illustrations on paper and in many cases on transparencies
and other media. There are many different types of printers. In terms of the technology utilized,
printer fall into the following categories.
1) Ink-jet Printer
Ink-jet printers work by spraying ionized ink on a sheet of paper. Magnetized plates in the ink’s
path direct the ink onto the paper in the desired shapes. Inkjet printers are capable of producing
high quality print approaching to that produced by laser printers. A typical ink-jet printer
provides a resolution of 300 dots per inch, although some newer models offer higher
resolutions.
In general, the price of ink-jet printers is lower than that of laser printers. However, they are
also considerably slower. Another drawback of ink-jet printers is that they require a special type
of ink that is apt to smudge on inexpensive copier paper.
Because ink-jet printers require smaller mechanical parts than laser printers, they are specially
popular as portable printers. In addition, colour ink-jet printers provide an inexpensive way to
print full-colour documents. See Figure 2.14.
2) Laser Printer
Laser Printer utilizes a laser beam to produce an image on a drum. The light of the laser alters
the electrical charge on the drum wherever it hits. The drum is then rolled through a reservoir of
toner, which is picked up by the charged portions of the drum. Finally, the toner is transferred to
the paper through a combination of heat and pressure. This is also the way copy machines work.
Because an entire page is transmitted to a drum before the toner is applied, laser printers are
sometimes called page printers. There are two other types of page printers that fall under the
category of laser printers even though they do not use lasers at all. One uses an array of LEDs to
expose the drum, and the other uses LCDs. Once the drum is charged, however, they both
operate like a real laser printer.
One of the chief characteristics of laser printers is their resolution – how many dots per inch
(dpi) they lay down. The available resolutions range from 300 dpi at the low end to 1,200 dpi at
the high end. By comparison, offset printing usually prints at 1,200 or 2,400 dpi. Some laser
printers achieve higher resolutions with special techniques known generally as resolution
enhancement.
In addition to text, laser printers are very adept at printing graphics. However, you need
significant amounts of memory in the printer to print high-resolution graphics. To print a full-
page graphic at 300 dpi, for example, you need at least 1 MB (megabyte) of printer RAM. For a
600-dpi graphic, you need at least 4 MB RAM.
The speed of laser printers ranges from about 4 to 20 pages of text per minute (ppm). A typical
rate of 6 ppm is equivalent to about 40 characters per second (cps). See Figure 2.15.
3) Line Printer
Line printers are high-speed printers capable of printing an entire line at one time. A fast line
printer can print as many as 3,000 lines per minute. The disadvantages of line printers are that
they can print only one font, they cannot print graphics, the print quality is low, and they are
very noisy.
4) Thermal printer
Thermal printers are printers that produce images by pushing electrically heated pins against
special heat-sensitive paper. Thermal printers are inexpensive and are used in most calculators
and many fax machines. They produce low-quality print, and the paper tends to curl and fade
after a few weeks or months.
2.3 The Computer Monitor
A computer monitor has a display screen that is divided up into tiny dots, called pixels (also
known as picture elements). A pixel may be defined as the smallest size object or colour spot that can
be displayed and addressed on a monitor. Any image that is displayed on the monitor is made up of
thousands of such small pixels. The closely-spaced pixels divide the image area into a compact and
uniform two-dimensional grid of pixel lines and columns. The finer the pixels the more the number of
pixels displayable on a monitor system.
Each pixel has a unique address, which the computer uses to locate the pixel and control its
appearance. Computer monitors and computers account for up to 5% of home electricity use. In
particular, the computer monitors represent around 25% of the energy of the computer.
a) Plasma Display
Plasma display consists of a matrix of pixels. Each pixel contains a mechanism which is
actuated by voltage. The current emits light and is supplied to the pixel by using a switching device
transistor, resistor, etc. The basic technique in plasma is a display consisting of a matrix of cells in a
glass envelope, and each cell is filled with gas, like neon. Plasma displays can have an AC dielectric
layer placed in between the conductance and the gas, which is bi-stable or DC, or a combined AC/DC
hybrid. Large-size plasma has high resolution. Phosphorescent material emits light when excited by
either an AC or DC electric field. The material is zinc sulphite doped with manganese.
Electroluminescent display has a yellow color. An AC/DC excited thin film electron is mostly used in
computer graphics applications. The basic structure is shown in Figure 2.17.
Figure 2.17 The basic structure of gas discharge plasma display (AC/DC activated)
b) Liquid Crystal Display (LCD)
Liquid crystal display is an example of passive technology. It either transmits or reflects incident
which is modified with polarization. The basic principle of polarized light is that transmitted light is
passed through the first polarizer and polarized in the xyplane, since the polarized axis of the second
polarizer aligns with first one, and vice versa. The ceramic which exists in the mesophase is stable at a
temperature between solid and liquid, hence the name liquid crystal. Picture clarity is shown in Figure
2.18.
3.1 Introduction
The computer memory is a temporary storage area. It holds the data and instructions that the
Central Processing Unit (CPU) needs. Before a program can be run, the program is loaded from some
storage medium into the memory. This allows the CPU direct access to the program. Memory is a need
for any computer.
So the capacity is defined in terms of byte or words. Thus 64 kilobyte (KB) memory is capable
of storing 64 x 1024 = 32,768 bytes. (1 kilobyte is equal to 1024 bytes). A memory size ranges from
few kilobytes in small systems to several thousands of Giga bytes in large mainframe and super
computers.
Suppose a memory card size is 2 GB means that it can store
2GB = 2 x 1024 MB
= 2 x 1024 x 1024 KB
= 2 x 1024 x 1024 x 1024 Bytes
= 2147483648 bytes
3.3 Types of Computer Memory
There are two kinds of computer memory: primary and secondary.
(1) Primary Memory
Primary Memory is also known as internal memory or main memory. As soon as the computer
is switched off, the contents of the primary memory is lost. You can store and retrieve data much faster
with primary memory compared to secondary memory. Primary memory is more expensive than
secondary memory. When the computer is doing any job, the data that have to be processed are stored
in the primary memory. This data may come from an input device like keyboard or from a secondary
storage device like a floppy disk, memory card or pen drive etc.
The primary memory itself is implemented by two types of memory technologies. The first is
called Random Access Memory (RAM) and the other is read only memory (ROM). A more
appropriate name for RAM is RWM (Read Write Memory), the CPU can write and read information
from any primary memory location implemented using RAM. The other part of primary memory is
implemented using ROM which stands for Read Only Memory.
a) Random Access Memory (RAM) : The primary storage is referred to as Random Access
Memory (RAM) because it is possible to randomly select and use any location of the memory directly
to store and retrieve data. It takes same time to any address of the memory as the first address. It is also
called read/write memory. The storage of data and instructions inside the primary storage is temporary.
It disappears from RAM as soon as the power to the computer is switched off. The memories, which
loose their content on failure of power supply, are known as volatile memories. So now we can say that
RAM is volatile memory.
b) Read Only Memory (ROM) : There is another memory in computer, which is called Read
Only Memory (ROM). Again it is the ICs inside the PC that form the ROM. The storage of program
and data in the ROM is permanent. The ROM stores some standard processing programs supplied by
the manufacturers to operate the personal computer. The ROM can only be read by the CPU but it
cannot be changed. The basic input/output program is stored in the ROM that examines and initializes
various equipment attached to the PC when the switch is turned ON. The memories, which do not lose
their content on failure of power supply, are known as non-volatile memories. ROM is non-volatile
memory.
c) PROM : There is another type of primary memory in computer, which is called Programmable
Read Only Memory (PROM). You know that it is not possible to modify or erase programs stored in
ROM, but it is possible for you to store your program in PROM chip. Once the programs are written it
cannot be changed and remain intact even if power is switched off. Therefore, programs or instructions
written in PROM or ROM cannot be erased or changed.
d) EPROM : This stands for Erasable Programmable Read Only Memory, which overcome the
problem of PROM and ROM. EPROM chip can be programmed time and again by erasing the
information stored earlier in it. Information stored in EPROM can be erased by exposing it to
ultraviolet light. This memory can be reprogrammed using a special programming facility. When the
EPROM is in use, information can only be read.
e) EAPROM : This stands for Electrically Alterable Programmable Read Only Memory. This
concept is same as that of EPROM. The only difference is that the memory can be altered using
electrical signals. The whole of the memory need not be erased.
f) Cache Memory : The speed of CPU is extremely high compared to the access time of main
memory. Therefore, the performance of CPU decreases due to the slow speed of main memory. The
decreases the mismatch in operating speed, a small memory chip is attached between CPU and Main
memory whose access time is very close to the processing speed of CPU. It is called CACHE memory.
CACHE memories are accessed much faster than conventional RAM. It is used to store programs or
data currently being executed or temporary data frequently used by the CPU. It is also very expensive
to have bigger size of cache memory. Its size is therefore, normally kept small.
g) Registers : The CPU processes data and instruction with high speed. There is also movement of
data between various units of the computer. It is necessary to transfer the processed data with high
speed. So the computer uses a number of special memory units called registers. They are not part of the
main memory but they store data or information temporarily and pass it on as directed by the control
unit.
(2) Secondary Storage (Auxiliary Memory)
You are now clear that the operating speed of primary memory or main memory should be as
fast as possible to cope up with the CPU speed. These high-speed storage devices are very expensive
and hence the cost per bit of storage is also very high. Again, the storage capacity of the main memory
is also very limited.
Often it is necessary to store hundreds of millions of bytes of data for the CPU to process.
Therefore, additional memory is required in all the computer systems. This memory is called auxiliary
memory or secondary storage.
In this type of memory the cost per bit of storage is low. However, the operating speed is slower
than that of the primary memory. Huge volume of data are stored here on permanent basis and
transferred to the primary storage as and when required. Most widely used secondary storage devices
are magnetic tapes, magnetic disks and floppy disks, Compact disks and Pen drives etc.,
a) Optical Disk
With every application and software there is greater demand for memory capacity. It is the necessity to
store large volume of data that has led to the development of optical disk storage medium. Optical disks
can be divided into the following categories.
(i) Compact Disk/Read Only Memory (CD-ROM): CD-ROM disks are made of reflective metals.
CD-ROM is written during the process of manufacturing by high power laser beam. Here the storage
density is very high, storage cost is very low and access time is relatively fast. Each disk is
approximately 4 1/2 inches in diameter and can hold over 600 MB of data. As the CD-ROM can be
read only we cannot write or make changes into the data contained in it.
b) Flash drive:
Flash drives have many names — jump drives, thumb drives, pen drives, and USB keychain
drives. Regardless of what you call them, they all refer to the same thing, which is a small data storage
device that uses flash memory and has a built-in USB connection. Flash drives are typically no more
than two to three inches in length and less than an inch in width. Their size and shape may resemble a
thumb or a small pen (which is where the names “thumb drive” and “pen drive” come from).
Flash drives are also very thin, often having a depth of less than a centimeter. Because of their
small form factor, they are highly portable and can easily fit in a pocket or on a keychain (hence the
name “keychain drive”). Nowadays flash drives can store several gigabytes of information. Since they
are small in size but have large storage capacities, flash drives have replaced most previous portable
data storage mediums such as floppy disks and removable hard disks like Zip disks. Because they have
a built-in USB connection, flash drives also don’t require a special disk drive to be used. Instead, they
can be used on any computer with a USB port, which nearly all modern computers have. Below is the
diagram of a pen drive.
4.1 Introduction
An operating system is the most essential system software, that manages the operation of a
computer. Without an operating system, it is not possible to use the computer. We know that the
computer is a hardware and is useless until it is provided an essential software, which makes it ready to
use.
A computer with no software in place can do absolutely nothing. It cannot accept characters
from the keyboard, display data on a screen, execute, or even load an application program. The
operating system is a collection of programs (or software routines) that control the operation of all
hardware and other resources in the computer system.
All other software runs under the operating system’s control, accessing the hardware through
the operating system and following rules imposed by the operating system. It serves as the
hardware/software interface
User programs interact with operating system using set of extended instructions. These
instructions are called ``system calls’’. These system calls are used to create, delete and use various
software objects that are manages by the Operating systems.
4.2 Booting
An operating system is that software which makes the ready to use by a process, called booting.
When we switch on the computer, the instructions stored in ROM are automatically executed. These
instructions help the computer to load the operating system from external storage device (disk) to
internal storage (RAM). This process of loading of operating system from disk to RAM is called
booting. The term “booting” comes from the word – “bootstrap” as bootstrap help us to get our boots
on, similarly booting helps the computer to get ready. The process of booting is illustrated in Figure 4.1
.
Figure 4.1: Process of booting
(b) Multi-tasking OS
(c) Multi-user OS
(d) Real Time OS
Batch OS: The batch operating system does not have a direct link with the computer. A
different system divides and allocates similar tasks into batches for easy processing and faster
response. It is appropriate for lengthy and time-consuming tasks. To avoid slowing down a device,
each user prepares their tasks offline and submits them to an operator. The advantages and
disadvantages of using a batch operating system.
Advantages Disadvantages
Many users can share batch systems. Some notable disadvantages are: Batch
There is little idle time for batch operating operating systems are challenging to debug.
systems.
Advantages Disadvantages
It becomes possible to manage large
Any failure of the system creates a backlog.
workloads.
It's easy to estimate how long a task will It may be costly to install and maintain good
take to be completed. batch operating systems.
Examples of single programme operation system are: Microsoft Disk Operating System (DOS),
LINUX, IBMPC-1DOS etc.
(ii) Multi-tasking or Time-Sharing: Multi-tasking operation system allows more than one program to
run at the same time. Programme are run in turns with the processor. The present programme that is
running is minimized so that another programme can be viewed.
Advantages Disadvantages
There's a quick response during task The user's data security might be a
performance. problem.
System failure can lead to widespread
It minimizes the idle time of the processor.
failures.
All tasks get an equal chance of being Problems in data communication may
accomplished. arise.
It reduces the chance of software The integrity of user programs is not
duplication. assured.
Examples of multi-tasking operating system are: Windows Operating System Vista, Solaris While the
Versions of Windows Operating System are: Windows 95, Windows 98, Windows ME, Windows XP
professional edition, Windows XP Home Edition, Windows NT.
(iii) Multi-User Operating System: This is a set of programme (Software) that gives access to
more than one computer user to share information with only one main computer (referred to as a
network server) at the same time. Multi-User network is used in cyber cafés, banks, schools’
computer laboratory and industries.
Distributed OS: This system is based on autonomous but interconnected computers
communicating with each other via communication lines or a shared network. Each autonomous
system has its own processor that may differ in size and function. A distributed operating system
serves multiple applications and multiple users in real time. The data processing function is then
distributed across the processors. Distributed operating systems are used for tasks such as
telecommunication networks, airline reservation controls The advantages and disadvantages of
distributed operating systems are:
Advantages Disadvantages
If the primary network fails, the entire
They allow remote working.
system shuts down.
They allow a faster exchange of data
They're expensive to install.
among users.
Failure in one site may not cause much They require a high level of expertise to
disruption to the system. maintain.
They reduce delays in data processing.
They minimize the load on the host
computer.
They enhance scalability since more
systems can be added to the network.
Network OS: Network operating systems are installed on a server providing users with the
capability to manage data, user groups and applications. This operating system enables users to
access and share files and devices such as printers, security software and other applications, mostly in
a local area network. Examples of network operating systems include Microsoft Windows, Linux and
macOS X. The advantages and disadvantages of network operating systems are
Advantages Disadvantages
Centralized servers provide high They require regular updates and
stability. maintenance.
Security issues are easier to handle Servers are expensive to buy and
through the servers. maintain.
Advantages Disadvantages
It's easy to upgrade and integrate new Users' reliance on a central server might
technologies. be detrimental to workflows.
Remote access to the servers is
possible.
(iv) Real-time OS: Real-time operating systems provide support to real-time systems that require
observance of strict time requirements. The response time between input, processing and response is
tiny, which is beneficial for processes that are highly sensitive and need high precision. These processes
include operating missile systems, medical systems or air traffic control systems, where delays may
lead to loss of life and property. Real-time operating systems may either be hard real-time systems or
soft real-time systems. Hard real-time systems are installed in applications with strict time constraints.
The system guarantees the completion of sensitive tasks on time. Hard real-time does not have virtual
memory. Soft real-time systems do not have equally rigid time requirements. A critical task gets
priority over other tasks. Real-time operating systems are used for tasks such as scientific experiments,
Medical Imaging, Robotics and Air traffic control operations. The advantages and disadvantages of
real-time operating systems include:
Advantages Disadvantages
They use device and systems maximally,
They have a low capacity to run tasks simultaneously.
hence more output.
They allow fast shifting from one task to
They use heavy system resources.
another.
The focus is on current tasks, and less focus They run on complex algorithms that are not easy to
is put on the queue. understand.
They're unsuitable for thread priority because of the
They can be used in embedded systems.
system's inability to switch tasks.
Real-time systems are meticulously
programmed, hence free of errors.
They allow easy allocation of memory.
4.5 Popular Operating Systems
a) Windows: Windows is the most popular desktop operating system, used by over 1 billion users
worldwide. It has a wide range of features and applications, including the Office suite, gaming,
and productivity tools.
b) MacOS: macOS is the desktop operating system used by Apple Mac computers. It is known for
its clean, user-friendly interface and is popular among creative professionals.
c) Linux: Linux is an open-source operating system that is available for free and can be
customized to meet specific needs. It is used by developers, businesses, and individuals who
prefer an open-source, customizable operating system.
d) iOS: iOS is the mobile operating system used by Apple iPhones and iPads. It is known for its
user-friendly interface, tight integration with Apple’s hardware and software, and robust
security features.
e) Android: Android is the most popular mobile operating system, used by over 2 billion users
worldwide. It is known for its open-source nature, customization options, and compatibility
with a wide range of devices.
iv) Multiprocessing:
It refers to the use of two or more CPUs to perform a coordinated task simultaneously.
v) Multi-tasking:
It refers to the ability of an operating system to execute two or more tasks concurrently.
vi) Multithreading:
It refers to the concurrent processing of several threads (sub-process) inside the same
programme..
5.1 Introduction
Computer virus is one of the greatest threats to computers and computer applications. Once the
virus is made it will generally be distributed through shareware, pirated software, e-mail or other
various ways of transporting data, once the virus infects someone's computer it will either start
infecting other data, destroying data, overwriting data, corrupting software, stealing hard disk space or
CPU time, accessing private information, corrupting data, displaying political or humorous messages
on the user's screen, spamming their contacts, or logging their keystrokes. The reason that these
programs are called viruses is because it is spreads like a human virus, once you have become infected
either by downloading something off of the Internet or sharing software any disks or write able media
that you placed into the computer will then be infected. When that disk is put into another computer
their computer is then infected, and then if that person puts files on the Internet and hundreds of people
download that file they are all infected and then the process continues infecting thousands if not
millions of people. However, not all viruses carry a destructive payload or attempt to hide themselves
—the defining characteristic of viruses is that they are self-replicating computer programs which install
themselves without the user's consent.
6.5 Interpreter
An interpreter is another type of program translator used for translating higher level language
into machine language. It takes one statement of higher level languages, translate it into machine
language and immediately execute it. Translation and execution are carried out for each statement. It
differs from compiler, which translate the entire source program into machine code and does involve in
its execution.
The advantage of interpreter compared to compiler is its fast response to changes in source
program. It eliminates the need for a separate compilation after changes to each program. Interpreters
are easy to write and do not require large memory in computer. The disadvantage of interpreter is that it
is time consuming method because each time a statement in a program is executed then it is first
translated. Thus compiled machine language program runs much faster than an interpreted program.
(a) Modem: A modem is a communication device that is used to provide the connectivity with
the Internet. Modem works in two ways i.e., modulation and demodulation. It converts the
digital data into the analog and analog to digital. Figure 7.1 shows the position of modem
when two computers are interacting with each other.
Figure 7.1: Usage of Modem
(b) RJ45 Connector: RJ45 is a type of connector commonly used for Ethernet networking. It
looks similar to a telephone jack, but is slightly wider. Since Ethernet cable have a RJ45
connector on each end, Ethernet cables are sometimes also called RJ45 cables. The ‘RJ’ in
RJ45 stands for ‘registered jack’ since it is a standardized network interface. The ‘45’ simply
refers to the number of the interface standard.
(c) Ethernet card: An Ethernet card is one kind of network adapter. These adapters support the
Ethernet standard for high-speed network connections via cables. Ethernet cards are
sometimes known as network interface cards (NICs). Ethernet is the most commonly used
local network technology deployed with transmission speeds heading upwards into the
gigabits range.
It is the most widely installed local area network (LAN) technology. Ethernet is a link layer
protocol in the TCP/IP stack, describing how networked devices can format data for
transmission to other network devices on the same network segment, and how to put that
data out on the network connection.
(d) Routers: Routers are networking devices used to extend or segment networks by forwarding
packets from one logical network to another. A router is a device that forwards data packets
along networks. A router is connected to at least two networks, commonly two LANs or WANs
or a LAN and its ISP’s network. Routers are located at gateways, the places where two or more
networks connect. Routers are most often used in large Internet works that use the TCP/IP
protocol suite and for connecting TCP/IP hosts and local area networks (LANs) to the Internet
using dedicated leased lines.
(e) Hub: A hub is the most basic networking device that connects multiple computers or other
network devices together. Unlike a network switch or router, a network hub has no routing
tables or intelligence on where to send information and broadcasts all network data across
each connection. Most hubs can detect basic network errors such as collisions, but having all
information broadcast to multiple ports can be a security risk and cause bottlenecks. Hubs
connect computer together in a star topology network. Due to their design, they increase the
chances for collision. Hubs operate in the physical layer of the ISO model and have no
intelligence. In the past network hubs were popular because they were cheaper than a switch
and router. Today, switches do not cost much more than a hub, and are much better solution
for any network.
(f) Switches: Switches are a special type of hub that offer an additional layer of intelligence to
basic physical layer repeater hubs. A switch does essentially what a hub does, but more
efficiently. By paying attention to the traffic that comes across it, it can “learn” where
particular addresses are. A switch must be able to read the MAC address of each frame it
receives. This information allows switches to repeat incoming data frames only to the
addressed computer.
Switches learn the location of the devices that they are connected to almost instantaneously.
The net result is that most network traffic only goes where it needs to rather than to every
port. On busy networks, this can make the network much faster.
(g) Gateways: A network gateway is an internetworking system capable of joining together
two networks that use different base protocols. A network gateway can be implemented
completely in software, completely in hardware, or as a combination of both. So gateway is
a device used to connect networks using different protocols. Gateways operate at the
network layer of the OSI model. In order to communicate with a host of other networks, an
IP host must be configured with a route to the destination network.
(h) Bridges: A bridge is a device that separates two or more network segments within one
logical network (e.g. a single IP-subnet).A bridge is usually placed between two separate
groups of computers that talk with each other, but not that much with the computers in the
other group. The job of the bridge is to examine the destination of the data packets one at a
time and decide whether or not to pass the packets to the other side of the Ethernet segment.
The result is a faster, quieter network with fewer collisions. A bridge is used to join two
network segments together; it allows computers on either segment to access resources on
the other. They can also be used to divide large networks into smaller segments.
(b) Multipoint: A multipoint (also called multidrop) connection is one in which more than
two specific devices share a single link (see Fig. 7.6b). In a multipoint environment, the
capacity of the channel is shared, either spatially or temporally. If several devices can use
the link simultaneously, it is a spatially shared connection. If users must take turns, it is a
timeshared connection.