The computer is the combination of hardware and software. Hardware are the physical
components of a computer like motherboard, memory devices, monitor, keyboard etc.
while software is the set of programs or instructions. Both hardware and software
together make the computer system function. Let us first have a look at the functional
components of a computer.
Every task given to a computer follows an Input- Process- Output Cycle (IPO cycle). It
needs certain input, processes that input and produces the desired output. The input
unit takes the input, the central processing unit does the processing of data and the
output unit produces the output. The memory unit holds the data and instructions
during the processing.
Fig below shows the basic structure of the computer.
Fig: Functional Components of a computer
Input Unit
The input unit consists of input devices that are attached to the computer. These devices
take input and convert it into binary language that the computer understands. Some of
the common input devices are keyboard, mouse, joystick, scanner etc. Central Processing Unit (CPU)
Once the information is entered into the computer by the input device, the processor
processes it. The CPU is called the brain of the computer because it is the control centre
of the computer. As the CPU is located on a small chip, it is also called the
microprocessor. It first fetches instructions from memory and then interprets them so as
to know what is to be done. If required, data is fetched from memory or input device.
Thereafter CPU executes or performs the required computation and then either stores
the output or displays on the output device. The CPU has three main components
which are responsible for different functions – Arithmetic Logic Unit (ALU) , Control
Unit (CU) and Memory registers. Arithmetic and Logic Unit (ALU)
The ALU, as its name suggests performs mathematical calculations and takes logical
decisions. Arithmetic calculations include addition, subtraction, multiplication and
division. Logical decisions involve comparison of two data items to see which one is
larger or smaller or equal. Control Unit
The Control unit coordinates and controls the data flow in and out of CPU and also
controls all the operations of ALU, memory registers and also input/output units. It is
also responsible for carrying out all the instructions stored in the program. It decodes
the fetched instruction, interprets (understands) it and sends control signals to
input/output devices until the required operation is done properly by ALU and
memory.
Memory Units:-Ø A bit is the smallest storage unit of memory.
Ø A nibble is a collection of 4 bits.
Ø Eight bits combined together to form a single byte, which in turn represents a single character. Other units of memory are as follows
8bits
=
1Byte
1024 bytes
=
1 Kilo Byte (KB)
1024 KB
=
1 Mega Byte (MB)
1024 MB
=
1 Giga Byte (GB)
1024 GB
=
1 Terra Byte (TB)
1024 TB
=
1 Peta Byte (PB)
1024 PB
=
1 Exa Byte (EB)
1024 EB
=
1 Zetta Byte (ZB)
1024 ZB
=
1 Yotta Byte (YB)
The computer memories can be divided into following categories:
Primary Memory
Secondary memory
Cache Memory
Primary Memory
Ø Primary memory or main memory is a Metal Oxide Semiconductor (MOS) memory used for storing program and data during the execution of the program.
Ø It is directly accessible to CPU.
Ø Broadly primary memory can be of two types – RAM (Random Access Memory) and ROM (Read only memory).
Random Access Memory (RAM)
Ø In case of RAM, the memory can be accessed from any desired location randomly.
Ø The instructions and data that we input into the computer are stored in
the RAM of the Computer.
Ø It is a read/write memory, so data can be both read from and written to the RAM.
Ø It is a volatile memory and loses its contents when the power is switched off or interrupted.
Ø Nowadays RAMs are available in gigabytes.
Ø The normal memory access time of a RAM is 20-80 ns.
Ø RAM can be broadly classified into two categories:
I. Dynamic RAM (DRAM)
II. Static RAM (SRAM).
SRAM
DRAM
It is faster in operation
It is slower in operation
It don’t require refresh cycles
It require refresh cycles
It is a memory cell contains 6 transistors
Its memory cell contains 1 transistor and 1 capacitor
Its cost per memory is very high
Its cost per memory is less.
It is not commonly being used as it is expensive
It is commonly used everywhere as it is less expensive
Used in cache memory of processors
It is used in computers, smart phones, tablets as normal RAM
ROM (Read Only Memory):-
Ø The special device where computer start-up instructions are stored is called ROM
Ø It is non-volatile in nature, i.e., its contents are not lost after power is switched off.
Ø Data stored in it are can be read and cannot be altered by any one.
Ø ROM chips are not only used in computers but also in electronic devices like Washing machines, Microwave oven etc.
Ø Once a ROM chip is being programmed it can’t be changed. If it is to be corrected then we have to replace it with a new one.
Programmable Read Only Memory (PROM):
This type of ROM can be programmed even after its manufacture using a PROM programmer circuit. But once a PROM is programmed, it becomes just like ROM i.e. it cannot be changed.
Erasable Programmable Read Only Memory (EPROM): In this type of ROM, the contents can be erased and the memory can be reprogrammed. To erase the data, an EPROM is exposed to ultraviolet light and then it can be reprogrammed using a PROM programmer circuit. When the EPROM is in use, then it behaves like a ROM, that means the information can only be read.
Electrically Erasable Programmable Read Only Memory (EEPROM): The contents of this type of ROM can be erased and then reprogrammed using electric signals. This makes it an excellent back up for RAM whose contents are lost when the power is switched off. When the power is returned, the contents of EEPROM are copied back into the RAM and the computer continues working without any data loss. Nowadays RAMs and EEPROMs are integrated in a single chip.
Cache Memory
Ø Cache memory is a special high speed memory made up of high speed static RAMs.
Ø It is used to hold frequently accessed data and instructions.
Ø It is placed between the CPU and the main memory. Whenever some data is required, the CPU first looks into cache.
Ø If data is found, we call it a cache hit and the information is transferred to the CPU.
Ø In case of a miss, the main memory is accessed.
Ø So access of frequently used data becomes very fast with cache memory.
Ø There are two types of cache memory:
i. L1 cache
ii. L2 cache
L1 Cache
L2 Cache
Its memory capacity is low.
Its memory capacity is high.
It is present inside CPU.
It is soldered on mother board.
It is implemented using SRAM.
It is implemented using DRAM.
It is assessed first for any data.
It is accessed if data is not found in L1 Cache.
It can be accessed faster.
Its access time is slower.
Types of SoftwareSoftware can be broadly are categorized as:
System Software
Application Software
Utility Software
System SoftwareSystem Software is the software that is directly related to coordinating computer operations and performs tasks associated with controlling and utilizing computer hardware.Ø These programs assist in running application programs and are designed tocontrol the operation of a computer system.
Ø System software directs the computer what to do, when to do and how to do.
Ø System software can be further categorized into
Operating System Language TranslatorsOperating SystemØ An Operating system is the most important system software.
Ø It is a set of programs that control and supervise the hardware of a computer and also provide services to application software, programmers and users.
Ø It manages all hardware and software,input, output and processing activities within the computer system, the flow of information to and from the processor, sets priorities for handling different tasks, and
so on.Ø Without operating system a computer cannot do anything useful.
Ø When a computer is switched on, the operating system is the first program that is loaded ontoits memory.
Ø A user cannot communicate directly with the computer hardware, so the operating system acts as an interface between the user and the computer hardware.
Ø Some of the popular operating systems used in personal computers are DOS, Windows,Unix, Linux, Solaris, etc.
Functions of an Operating SystemAn operating system has variety of functions to perform. Some of the prominent functions of an operating system can be broadly outlined as: Processor Management: This deals with management of the Central ProcessingUnit (CPU).
Ø The operating system takes care of the allotment of CPU time to
different processes.Ø This is called scheduling.
Ø Two types of scheduling techniques are employed by an operating system :
Priority Scheduling:Ø Each task is given CPU time according to the priority assigned to that task.
Ø The program with higher priority will be given CPU time before a program with lower priority.
Ø The CPU executes the task till it is completed or there is some interrupt request i.e. till the time operatingsystem has to stop (interrupt) the current task due to an unavoidable job request.
Ø The major drawback of Priority scheduling is that even a small job
has to wait for a long time when a long duration job with higher priority is being executed. Round Robin Scheduling: This type of scheduling technique is also known
as Time Sharing Scheduling.Ø In this, each program or task is given a fixed amount of time to execute.
Ø The CPU continues with the execution till either the allotted time is over or there is some interrupt request or the task is completed before the allotted time.
Ø If the task is not completed at the end of the allotted time, it is put at the end of the queue.
Ø So each task gets its allotted share of CPU time. This scheduling technique improves the response time and provides an interactive environment.
Device Management: The Operating System communicates with hardware and the attached devices and maintains a balance between them and the CPU.
Ø This is all the more important because the CPU processing speed is much higher than that of I/O devices.
Ø In order to optimize the CPU time, the operating system employs two techniques - Buffering and Spooling.
Buffering: In this technique the temporary storage of input and output datais done in Input Buffer and Output Buffer.
Ø Once the signal for input or output is sent to or from the CPU respectively, the operating system through the device controller moves the data from the input device to the input buffer and for the output device to the output buffer.
Ø When the signal is sent to/from the operating system to the respective device controllers, the program doesn’t wait rather it returns to its processing.
Ø In case of input, if the buffer is full, the operating system sends a signal to the program which processes the data stored in the buffer.
Ø When the buffer becomes empty, the program informs the operating system which reloads the buffer and the input operation continues. Similarly for output when the program being executed has to display some output, it fills the buffer and then informs the operating system.
Ø Thereafter the operating system empties the buffer by sending data to the output device and in the meantime the program fills another buffer.
Ø This technique is called overlapped processing. This is because while the operating system reloads one buffer, the executing program doesn’t stop as it is able to retrieve/fill data from/in another buffer.
Spooling (Simultaneous Peripheral Operation on Line): This is a device
management technique used for processing of different tasks on the sameinput/output device.Ø Say for example there are various users on a network sharing the same printer.
Ø At one point of time more than one user might give print command.
Ø The speed of the printer is very slow as compared to the CPU processing.
Ø So the operating system temporarily stores the data of every user on the hard disk of the computer to which the printer is attached.
Ø The individual users need not wait for the printing process to be complete.
Ø Instead the operating system sends the data from to hard disk to the printer one by one.
Memory management: In a computer, both the CPU and the I/O devices interact with the memory.
Ø When a program needs to be executed it is loaded onto the main memory till the execution is complete.
Ø Thereafter that memory space is freed and is available for other programs.
Ø The common memory management techniques used by the operating system are Partitioning and Virtual Memory.
Partitioning: The total memory is divided into various partitions of same
size or different sizes.Ø This helps to accommodate number of programs in the memory.
Ø The partition can be fixed i.e. remains same for all the programs in the memory or variable i.e. memory is allocated when a program is loaded on to the memory.
Ø The later approach causes less wastage of memory but in due course of time, it may become fragmented.
Virtual Memory:
Ø This is a technique used by the operating system by virtue of which the user can load the programs which are larger than the main memory of the computer.
Ø In this technique the program is executed even if the complete program is not loaded on to the main memory.
Ø The operating system divides the main memory into equal sizes called pages.
Ø A part of the program resides in the main memory and is called the active set.
Ø The rest is in the secondary storage device in the form of tracks/sectors or blocks.
Ø With the help of Page Map Tables (PMT), the operating system keeps track which page of main memory is storing which block of secondary memory.
Ø A virtual address (which is not the real physical address) is mapped either to the main memory or the secondary memory.
Ø Hence virtual memory allows more programs and even larger programs to be executed in the main memory leading to efficient memory utilization.
File Management:Ø The operating System manages the files, folders and directory
systems on a computer.Ø Any data on a computer is stored in the form of files and
the operating system keeps information about all of them using File Allocation Table (FAT).Ø The FAT stores general information about files like filename, type
(text or binary), size, starting address and access mode (sequential/indexed sequential/direct/relative).Ø The file manager of the operating system helps to create, edit, copy, allocate memory to the files and also updates the FAT.
Ø The operating system also takes care that files are opened with proper access rights to read or edit them.