Chapter 1
COMPUTER
SYSTEM
OVERVIEW
Introduction to Computer System
A computer is an electronic device that can be programmed to accept data
(input), process it and generate result (output). A computer along with additional
hardware and software together is called a computer system.
Computers are being used extensively nowadays in everyday life/every field In the
form of laptop, desktop, smartphone, gadgets etc,
Hardware :
Computer hardware is the collection of physical elements/parts that
constitutes a computer system,such as the monitor, mouse, keyboard,
computer data storage, hard drive disk (HDD), system unit (graphic
cards, sound cards, memory, motherboard and chips), etc. all of which
are physical objects & can be touched
Software :
These are the recorded instructions and programs that govern
the working of a computer.
Components of Computer System
Input Devices:
The devices through which control signals are sent to a computer are
termed as input devices. These devices convert the input data into a
digital form that is acceptable by the computer system. Some examples of
input devices include keyboard, mouse, scanner, touch screen etc,.
Output Devices:
The device that receives data from a computer system for display,
physical production, etc., is called output device. It converts digital
information into human understandable form. For example, monitor,
projector, headphone, speaker, printer, etc.
Central Processing Unit:
It is the electronic circuitry of a computer that carries out the
actual processing and usually referred as the brain of the
computer. It is commonly called processor also.
The CPU is given instructions and data through programs. The
CPU then fetches the program and data from the memory and
performs arithmetic and logic operations as per the given
instructions and stores the result back to memory.
While processing, the CPU stores the data as well as instructions
in its local memory called registers. Registers are part of the CPU
chip and they are limited in size and number. Different registers
are used for storing data, instructions or intermediate results.
ALU-Arithmetic Logic Unit
An arithmetic logic unit (ALU) is a key component of a computer's
central processor unit. The ALU performs all arithmetic and logic
operations that must be performed on instruction words.
Performs all Arithmetic and some logical operations.
Control Unit:
A control unit controls the operations of all parts of the computer. The Control
Unit is the part of the computer’s central processing unit (CPU), which directs the
operation of the processor.
It is the responsibility of the control unit to tell the computer’s memory,
arithmetic/logic unit, and input and output devices how to respond to the
instructions that have been sent to the processor.
It fetches internal instructions of the programs from the main memory to the
processor instruction register, and based on this register contents, the control unit
generates a control signal that supervises the execution of these instructions.
A control unit works by receiving input information which it converts into control
signals, which are then sent to the central processor.
Functions of Control Unit:
It coordinates the sequence of data movements into, out of, and between a
processor’s many sub-units.
It interprets instructions.
It controls data flow inside the processor.
It receives external instructions or commands to which it converts to
sequence of control signals.
It controls many execution units(i.e. ALU, data buffers and registers)
contained within a CPU.
It also handles multiple tasks, such as fetching, decoding, execution
handling and storing results.
Registers:
A Register is an important component of digital devices that stores data and
instructions for quick processing.
It serves as a temporary storage area where information can be accessed and
manipulated quickly in order to carry out complex tasks.
Registers are the most basic type of memory in computers and they play a
critical role in helping machines process data efficiently.
Purpose of Registers: Registers are used by computers for various purposes,
including storing program instructions before they're executed or holding
intermediate results from calculations so that their values can be retrieved later
on if needed. They also help speed up processes by allowing processors to access
frequently used values without having to retrieve them from main memory every
time they need them.
The Memory(Main/Primary):
A computer system needs memory to store the data and instructions for
processing. Whenever we talk about the ‘memory’ of a computer system, we
usually talk about the main or primary memory. The secondary memory
(also called storage device) is used to store data, instructions and results
permanently for future use.
The main memory acts as the central storage unit in a computer system. It
is a relatively large and fast memory which is used to store programs and
data during the run time operations.
The primary technology used for the main memory is based on
semiconductor integrated circuits. The integrated circuits for the main
memory are classified into two major units.
1. RAM (Random Access Memory) integrated circuit chips
2. ROM (Read Only Memory) integrated circuit chips
RAM-Random Access Memory:
RAM is volatile, i.e., as long as the power is supplied to the computer, it retains
the data in it. But as soon as the power supply is turned off, all the contents of
RAM are wiped out. It is used to store data temporarily while the computer is
working. Whenever the computer is started or a software application is launched,
the required program and data are loaded into RAM for processing. RAM is
usually referred to as main memory and it is faster than the secondary memory
or storage devices.
RAM-Random Access Memory:
The RAM integrated circuit chips are further classified into two possible operating
modes, static and dynamic.
Static:
The primary compositions of a static RAM are flip-flops that store the binary
information. The nature of the stored information is volatile, i.e. it remains valid as
long as power is applied to the system. The static RAM is easy to use and takes less
time performing read and write operations as compared to dynamic RAM.
Dynamic:
The dynamic RAM exhibits the binary information in the form of electric charges
that are applied to capacitors. The capacitors are integrated inside the chip by MOS
transistors. The dynamic RAM consumes less power and provides large storage
capacity in a single memory chip.
ROM-Read Only Memory:
ROM is non-volatile, which means its contents are not lost even when the power is
turned off. It is used as a small but faster permanent storage for the contents
which are rarely changed. For example, the startup program (boot loader) that
loads the operating system into primary memory, is stored in ROM.
The advantages of ROM are as follows:
Non-volatile in nature
Cannot be accidentally changed
Cheaper than RAMs
Easy to test
More reliable than RAMs
Static and do not require refreshing
Contents are always known and can be verified
Types of ROM:
1. PROM (Programmable Read-Only Memory)
2. EPROM (Erasable Programmable Read Only Memory)
3. EEPROM (Electrically Erasable Programmable Read Only Memory)
4. MROM (Mask Read Only Memory)
5. FLASH EEPROM
PROM (Programmable read-only memory): It can be programmed by the
user. Once programmed, the data and instructions in it cannot be changed.
EPROM (Erasable Programmable read-only memory): It can be
reprogrammed. To erase data from it, expose it to ultraviolet light. To
reprogram it, erase all the previous data.
EEPROM (Electrically erasable programmable read-only memory): The data
can be erased by applying an electric field, with no need for ultraviolet light.
We can erase only portions of the chip.
MROM(Mask ROM): Mask ROM is a kind of read-only memory, that is masked
off at the time of production. Like other types of ROM, mask ROM cannot
enable the user to change the data stored in it. If it can, the process would
be difficult or slow.
Flash EEPROM is designed for high speed and high density, at the expense of
large erase blocks (typically 512 bytes or larger) and limited number of write
cycles (often 10,000).
Cache Memory:
To speed up the operations of the CPU, a very high speed memory is placed between
the CPU and the primary memory known as cache. It stores the copies of the data
from frequently accessed primary memory locations, thus, reducing the average time
required to access data from primary memory. When the CPU needs some data, it
first examines the cache. In case the requirement is met, it is read from the cache,
otherwise the primary memory is accessed.
Secondary Memory:
Primary memory has limited storage capacity and is either volatile (RAM) or read-
only (ROM). Thus, a computer system needs auxiliary or secondary memory to
permanently store the data or instructions for future use.
The secondary memory is non-volatile and has larger storage capacity than
primary memory. It is slower and cheaper than the main memory. But, it cannot
be accessed directly by the CPU.
Contents of secondary storage need to be first brought into the main memory
for the CPU to access. Examples of secondary memory devices include Hard Disk
Drive (HDD), CD/ DVD, Memory Card, etc.,
Software:
"Software is a set of programs (sequence of instructions)
that allows the users to perform a well-defined function or
some specified task."
Software is responsible for directing all computer-related devices and instructing
them regarding what and how the task is to be performed. However, the software is
made up of binary language (composed of ones and zeros), and for a programmer
writing the binary code would be a slow and tedious task. Therefore, software
programmers write the software program in various human-readable languages
such as Java, Python, C#, etc. and later use the source code.
Types of
Software
System Application
Software Software
System Software:
System software is a computer program that helps the user to run computer
hardware or software and manages the interaction between them.
Essentially, it is software that constantly runs in the computer background,
maintaining the computer hardware and computer's basic functionalities, including
the operating system, utility software, and interface.
In simple terms, you can say that the system acts as a middle man that checks and
facilitates the operations flowing between the user and the computer hardware.
A system software knows how to operate and use different hardware components of a computer. It provides services
directly to the end user, or to some other software. Examples of system software include operating systems, system
utilities, device drivers, etc
Operating System:
As the name implies, the operating system is a system software that operates
the computer.
An operating system is the most basic system software, without which other
software cannot work.
The operating system manages other application programs and provides
access and security to the users of the system. Some of the popular operating
systems are Windows, Linux, Macintosh, Ubuntu, Fedora, Android, iOS, etc.
System Utilities:
Software used for maintenance and configuration of the computer system is
called system utility.
Some system utilities are shipped with the operating system for example disk
defragmentation tool, formatting utility, system restore utility, etc.
Another set of utilities are those which are not shipped with the operating
system but are required to improve the performance of the system, for
example, anti-virus software, disk cleaner tool, disk compression software, etc,.
Device Drivers:
The purpose of a device driver is to ensure proper functioning of a particular device. When it
comes to the overall working of a computer system, the operating system does the work. But
everyday new devices and components are being added to a computer system.
It is not possible for the operating system alone to operate all of the existing and new devices,
where each device has diverse characteristics.
The responsibility for overall control, operation and management of a particular device at the
hardware level is delegated to its device driver.
The device driver acts as an interface between the device and the operating system. It provides
required services by hiding the details.
Just like a language translator, a device driver acts as a mediator between the operating system
and the attached device.
Language Translators:
As the computer can understand only machine language, a translator is needed to
convert program written in assembly or high level language to machine language.
The program code written in assembly or high-level language is called Source
code.
The source code is converted by a translator into the machine understandable
form called Object (machine) code.
As we have different types of computer languages, different translators are
needed to convert the source code to machine code.
The three types of translators used in computing systems are:
Assembler
Compiler
Interpreter.
Assembler:
The translator used to convert the code written in assembly language to
machine language is called assembler.
Each assembler can understand a specific microprocessor instruction set
only and hence, the machine code is not portable.
Compiler:
We also need translators to convert codes written in high level language
(source code) to machine understandable form (machine code) for execution
by the computer.
Compiler converts the source code into machine code. If the code follows all
syntactic rules of the language, then it is executed by the computer. Once
translated, the compiler is not needed.
Interpreter:
An interpreter translates one line at a time instead of the whole program at one
go.
Interpreter takes one line, converts it into executable code if the line is
syntactically correct, and then it repeats these steps for all lines in the source
code.
Hence, interpreter is always needed whenever a source code is to be executed.
Application Software:
The system software provides the core functionality of the computer system.
However, different users need the computer system for different purposes
depending upon their requirements.
Hence, a new category of software is needed to cater to different requirements
of the end users. This specific software that works on top of the system
software is termed as application software.
There are again two broad categories of application software — general purpose
and customised application software.
Application Software helps in providing a graphical user interface to the user to
operate the computer for different functionality.
The user may use the computer for browsing the internet, accessing to email
service, attending meetings, and playing games.
Different high-level languages are used to build application software.
The application Software is broadly divided into two main parts:
1. General Purpose Software
2. Custom Made Software
General Purpose Software:
The application software developed for generic applications, to cater to a
bigger audience in general are called general purpose software.
Such ready-made application software can be used by end users as per their
requirements.
For example, spreadsheet tool Calc of LibreOffice can be used by any
computer user to do calculation or to create account sheet. Adobe Photoshop,
GIMP, Mozilla web browser, iTunes, etc., fall in the category of general purpose
software.
Some of the other examples are:
MS Word
Google Docs
Google Drive
Gmail
Netflix
Custom Made Software :
These are custom-made application software, that are developed to meet
the requirements of a specific organisation or an individual.
They are better suited to the needs of an individual or an organisation,
considering that they are designed as per special requirements.
Some examples of user-defined software include websites, school
management software, accounting software, etc.
Operating System:
An operating system (OS) can be considered to be a resource manager
which manages all the resources of a computer, i.e., its hardware
including CPU, RAM, Disk, Network and other input-output devices.
It also controls various application software and device drivers,
manages system security and handles access by different users.
It is the most important system software. Examples of popular OS are
Windows, Linux, Android, Macintosh and so on.
The primary objectives of an operating system are two-fold.
The first is to provide services for building and running application
programs.
When an application program needs to be run, it is the operating system
which loads that program into memory and allocates it to the CPU for
execution.
When multiple application programs need to be run, the operating
system decides the order of the execution.
The second objective of an operating system is to provide an interface to
the user through which the user can interact with the computer.
A user interface is a software component which is a part of the operating
system and whose job is to take commands or inputs from a user for the
operating system to process.
Memory
Management
Functions of
Process Operating File Management
Management System
Device
Management
Process Management:
While a computer system is operational, different tasks are running
simultaneously.
A program is intended to carry out various tasks. A task in execution is known
as process.
We can activate a system monitor program that provides information about
the processes being executed on a computer. In some systems it can be
activated using Ctrl+Alt+Delete.
It is the responsibility of operating system to manage these processes and get
multiple tasks completed in minimum time.
As CPU is the main resource of computer system, its allocation among
processes is the most important service of the operating system.
Hence process management concerns the management of multiple processes,
allocation of required resources, and exchange of information among
processes.
Memory Management:
Primary or main memory of a computer system is usually limited. The main task
of memory management is to give (allocate) and take (free) memory from
running processes.
Since there are multiple processes running at a time, there arises a need to
dynamically (on-the-go) allocate and free memory to the processes.
Operating system should do it without affecting other processes that are already
residing in the memory and once the process is finished, it is again the
responsibility of the operating system to take the memory space back for re-
utilization.
Hence, memory management concerns with management of main memory so
that maximum memory is occupied or utilized by large number of processes
while keeping track of each and every location within the memory as free or
occupied.
File Management:
Data and programs are stored as files in the secondary storage of a computer
system.
File management involves the creation, updation, deletion and protection of
these files in the secondary memory.
Protection is a crucial function of an operating system, as multiple users can
access and use a computer system.
There must be a mechanism in place that will stop users from accessing files
that belong to some other user and have not been shared with them.
File management system manages secondary memory, while memory
management system handles the main memory of a computer system.
Device Management:
A computer system has many I/O devices and hardware connected to it.
Operating system manages these heterogeneous devices that are
interdependent.
The operating system interacts with the device driver and the related
software for a particular device.
The operating system must also provide the options for configuring a
particular device, so that it may be used by an end user or some other
device.
Just like files, devices also need security measures and their access to
different devices must be restricted by the operating system to the
authorised users, software and other hardware only.
OS User Interface:
A user interface is a software component which is a part of the operating
system and whose job is to take commands or inputs from a user for the
operating system to process.
There are different types of user interfaces each of which provides a
different functionality.
Command-based Interface
Graphical User Interface
Touch-based Interface
Voice-based Interface
Gesture-based Interface
Command-based Interface:
Command-based interface requires a user to enter the commands to
perform different tasks like creating, opening, editing or deleting a file,
etc.
The user has to remember the names of all such programs or specific
commands which the operating system supports.
The primary input device used by the user for command based
interface is the keyboard.
Command based interface is often less interactive and usually allows a
user to run a single program at a time.
Examples of operating systems with command-based interface include
MS-DOS and Unix
Graphical User Interface:
Graphical User Interface (GUI) lets users run programs or give
instructions to the computer in the form of icons, menus and other
visual options.
Icons usually represent files and programs stored on the computer and
windows represent running programs that the user has launched
through the operating system.
The input devices used to interact with the GUI commonly include the
mouse and the keyboard.
Examples of operating systems with GUI interfaces include Microsoft
Windows, Ubuntu, Fedora and Macintosh, among others.
Touch-based Interface:
Today smartphones, tablets and PCs allow users to interact with the
system simply using the touch input.
Using the touchscreen, a user provides inputs to the operating system,
which are interpreted by the OS as commands like opening an app,
closing an app, dialing a number, scrolling across apps, etc.
Examples of popular operating systems with touch based interfaces are
Android and iOS.
Windows 8.1 and 10 also support touch-based interfaces on touchscreen
devices.
Voice-based Interface:
Modern computers have been designed to address the needs of all types of
users including people with special needs and people who want to interact
with computers or smartphones while doing some other task.
For users who cannot use the input devices like the mouse, keyboard, and
touchscreens, modern operating systems provide other means of human-
computer interaction.
Users today can use voice-based commands to make a computer work in the
desired way.
Some operating systems which provide voice-based control to users include
iOS (Siri), Android (Google Now or “OK Google”), Microsoft Windows 10
(Cortana) and so on.
Gesture-based Interface:
Some smartphones based on Android and iOS as well as laptops let users
interact with the devices using gestures like waving, tilting, eye motion
and shaking.
This technology is evolving faster and it has promising potential for
application in gaming, medicine and other areas