0% found this document useful (0 votes)
9 views16 pages

Computer Basics: Hardware & Software Guide

The document provides an overview of computers, detailing their components, including hardware and software, as well as input and output devices. It explains concepts such as RAM and ROM, fragmentation, and CPU scheduling methods, including non-preemptive and preemptive scheduling. Additionally, it discusses various scheduling algorithms like First Come First Serve and their impact on average waiting time for processes.

Uploaded by

akash
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views16 pages

Computer Basics: Hardware & Software Guide

The document provides an overview of computers, detailing their components, including hardware and software, as well as input and output devices. It explains concepts such as RAM and ROM, fragmentation, and CPU scheduling methods, including non-preemptive and preemptive scheduling. Additionally, it discusses various scheduling algorithms like First Come First Serve and their impact on average waiting time for processes.

Uploaded by

akash
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Agri – Informatics Notes by Sachin Shrivastava

Computer
Computer is an electronic device which is capable of receiving information (data) in a
particular form and of performing a sequence of operations in accordance with a
predetermined but variable set of procedural instructions (program) to produce a result in
the form of information or signals.

A computer is a device that can be instructed to carry out sequences of arithmetic or


logical operations automatically via computer programming. Modern computers have the
ability to follow generalized sets of operations, called programs. These programs enable
computers to perform an extremely wide range of tasks.

Computers are used as control systems for a wide variety of industrial and consumer
devices. This includes simple special purpose devices like microwave ovens and remote
controls, factory devices such as industrial robots and computer-aided design, and also
general purpose devices like personal computers and mobile devices such as smart
phones.

Early computers were only conceived as calculating devices. Since ancient times, simple
manual devices like the abacus aided people in doing calculations. Early in the Industrial
Revolution, some mechanical devices were built to automate long tedious tasks, such as
guiding patterns for looms. More sophisticated electrical machines did specialized analog
calculations in the early 20th century. The first digital electronic calculating machines
were developed during World War II. The speed, power, and versatility of computers
have been increasing dramatically ever since then.

A computer is made up of multiple parts and components that facilitate user functionality.
A computer has two primary categories:

• Hardware: Physical structure that houses a computer's processor, memory,


storage, communication ports and peripheral devices
• Software: Includes operating system (OS) and software applications

A computer works with software programs that are sent to its underlying hardware
architecture for reading, interpretation and execution. Computers are classified according
to computing power, capacity, size, mobility and other factors, as personal computers
(PC), desktop computers, laptop computers, minicomputers, handheld computers and
devices, mainframes or supercomputers.
SOFTWARE
Software, in its most general sense, is a set of instructions or programs instructing a
computer to do specific tasks. Software is a generic term used to describe computer
programs. Scripts, applications, programs and a set of instructions are all terms often used
to describe software.

Software is often divided into two categories:

• System software serves as a base for application software. System software


includes device drivers, operating systems (OSs), compilers, disk formatters, text
editors and utilities helping the computer to operate more efficiently. It is also
responsible for managing hardware components and providing basic non-task-
specific functions. The system software is usually written in C programming
language.

• Application software is intended to perform certain tasks. Examples of


application software include office suites, gaming applications, database systems
and educational software. Application software can be a single program or a
collection of small programs. This type of software is what consumers most
typically think of as "software."

Hardware
Hardware (H/W), in the context of technology, refers to the physical elements that make
up a computer or electronic system and everything else involved that is physically
tangible. This includes the monitor, hard drive, memory and the CPU. Hardware works
hand-in-hand with firmware and software to make a computer function.

Parts of Computer
1. Central Processing Unit (CPU)
2. Motherboard
3. Hard Disc
4. Computer Memory
5. Monitor
6. Keyboard
7. Mouse

1. Central Processing Unit (CPU): Also known as the computer processor, the CPU is
an electronic circuit that executes computer programs. The primary responsibility of a
computer processor is to execute a sequential set of instructions that constitute a program.
CPU operation can be divided into four basic steps, namely, fetch, decode, execute, and
write-back. During the 'fetch' step, the processor retrieves program instructions from
memory. In the decode step, the instruction is broken down into parts. The instruction set
architecture of the CPU defines the way in which an instruction is decoded. In the
'execute' step, CPU performs the operation implied by the program instruction. During
the 'write-back' step, the CPU writes back the results of execution, to the computer's
memory.

2. Motherboard: A computer motherboard consists of sockets in which microprocessors


are installed, memory slots, a chipset that acts as an interface between the CPU bus and
the peripheral buses (a bus connects all the internal parts of a computer), non-volatile
memory chips housing the system's firmware and a clock generator, which helps in the
synchronization of various system components. Some motherboards also include logic
and connectors to support input devices like PS/2 connectors for a mouse and keyboard.

3. Hard Disc: A hard disc is described as a part of the computer disc drive, which stores
data and provides computer users with quick access to large amounts of data. A hard disc
is an electromagnetically charged surface or set of discs that record data in concentric
circles known as tracks. It is a non-volatile storage device that stores digitally encoded
data. A head, resembling a phonograph arm, is used to read and write data onto a hard
disk. The hard discs of desktops are generally capable of storing 120 GB to 2 TB of data.
Laptop hard disc drives are smaller and have lower data storage capacities.

4. Computer Memory: It refers to those components of a computer, which retain digital


data. It forms the core of a computer and makes up the basic computer model in
collaboration with the CPU. Magnetic drums and delay lines used as primary storage by
computers of the early days, have metamorphosed into a miniature silicon chip, which
can achieve efficient storage of large volumes of data. Random Access Memory,
popularly known as RAM, is a small-sized light and volatile form of computer memory.
It is capable of temporary storage of data. Registers located in a computer processor are
the fastest forms of computer storage. The most frequently used information is duplicated
in the processor cache of a computer, thereby improving its performance. Computers
require a non-volatile primary storage to read large programs. This non-volatile memory
is known as ROM or Read-only memory. It also contains the startup programs used for
bootstrapping a computer. Secondary storage media such as flash memory, magnetic
tape, punch cards, and zip drives and tertiary storage media like tape libraries are also a
part of computer memory.

5. Monitor: A visual display unit, as it is called, is an electrical equipment that displays


images generated by the video output of a computer. Monitors of the early years used
CRT technology for imaging, while modern computer monitors use LCD or even plasma
screens. The display provides computer users with an instant feedback in the form of text
and graphic images. Monitors are the most-used output devices of a computer.
6. Keyboard: A keyboard is regarded as an input device for a computer. With respect to
the arrangement of keys, a computer keyboard is similar to a typewriter. The keys or
buttons act as electronic switches or mechanical levers with characters printed on them,
with each keypress corresponding to a written symbol. A keyboard has its own processor
and circuitry, which consists of a key matrix, which helps bring about the keyboard
operation.
7. Mouse: A computer mouse is a pointing device that detects two-dimensional motion.
Apple's Macintosh was the first successful mouse-driven computer. A mouse translates
the motion of your hand into signals that a computer can recognize and respond to. There
are three basic types of mice, namely, mechanical, opto-mechanical, and optical.
Mechanical mice have a rubber or metal ball that can roll in all directions. Mechanical
sensors in the mouse detect the direction of motion of the ball. Opto-mechanical mice
differ from mechanical mice, in that they use optical sensors to detect motion. Optical
mice, popularly used today, have a laser to detect movement of the mouse. They do not
have mechanical moving parts and possess higher performance speeds.

INPUT & OUTPUT DEVICES


Input devices

When unprocessed data is sent to the computer with the help of input devices, the data is
processed and sent to output devices. The input devices may be hand-operated or
automated. The act of processing is mainly regulated by the CPU. Some examples of
input devices are:

1. Computer keyboard
2. Digital camera
3. Digital video
4. Graphics tablet
5. Image scanner
6. Joystick
7. Microphone
8. Mouse
9. Overlay keyboard
10. Real-time clock
11. Trackball
12. Touchscreen

Output devices
The means through which computer gives output are known as output devices. Some
examples of output devices are:

1. Computer monitor
2. Printer
3. PC speaker
4. Projector
5. Sound card
6. Video card
7. Computer Memory
8. Computer Primary memory comes in two principal varieties:
9. random-access memory or RAM
10. read-only memory or ROM

RAM & ROM


RAM can be read and written to anytime the CPU commands it, but ROM is preloaded
with data and software that never changes, therefore the CPU can only read from it. ROM
is typically used to store the computer's initial start-up instructions. In general, the
contents of RAM are erased when the power to the computer is turned off, but ROM
retains its data indefinitely. In a PC, the ROM contains a specialized program called the
BIOS that orchestrates loading the computer's operating system from the hard disk drive
into RAM whenever the computer is turned on or reset. In embedded computers, which
frequently do not have disk drives, all of the required software may be stored in ROM.
Software stored in ROM is often called firmware, because it is notionally more like
hardware than software. Flash memory blurs the distinction between ROM and RAM, as
it retains its data when turned off but is also rewritable. It is typically much slower than
conventional ROM and RAM however, so its use is restricted to applications where high
speed is unnecessary.
Auxiliary memory
Auxiliary memory, also known as auxiliary storage, secondary storage, secondary
memory or external memory, is a non-volatile memory (does not lose stored data when
the device is powered down) that is not directly accessible by the CPU, because it is not
accessed via the input/output channels (it is an external device).

Type of Auxiliary memory

The most common forms of auxiliary memory are flash memory, optical discs, magnetic
disks and magnetic tape. The latest addition to the auxiliary memory family is flash
memory. This form is much faster as compared to its predecessors, as this form of
auxiliary memory does not involve any moving parts. In some laptops, this type of
auxiliary memory is referred to as a solid state drive.

Flash memory: An electronic non-volatile computer storage device that can be


electrically erased and reprogrammed, and works without any moving parts. Examples of
this are flash drives, memory cards and solid state drives. A version of this is
implemented in many notebook and some desktop computers.

Optical disc: A storage medium from which data is read and written by lasers. Optical
disks can store much more data — up to 6 gigabytes more than most portable magnetic
media, such as floppies. There are three basic types of optical disks: CD/DVD/BD-ROM
(read-only), WORM (write-once read-many) & EO (erasable optical disks).

Magnetic Disk: A magnetic disk is a circular plate constructed of metal or plastic coated
with magnetized material. Both sides of the disk are used and several disks may be
stacked on one spindle with read/write heads available on each surface. Bits are stored on
the magnetized surface in spots along concentric circles called tracks. Tracks are
commonly divided into sections called sectors. Disks that are permanently attached and
cannot be removed by the occasional user are called hard disks. A disk drive with
removable disks is called a floppy disk drive.

Magnetic tapes: A magnetic tape transport consists of electric, mechanical and electronic
components to provide the parts and control mechanism for a magnetic tape unit. The
tape itself is a strip of plastic coated with a magnetic recording medium. Bits are recorded
as magnetic spots on tape along several tracks. Seven or nine bits are recorded to form a
character together with a parity bit. Read/Write heads are mounted in each track so that
data can be recorded and read as a sequence of characters.
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 and its solution is called de- Fragmentation or
compaction.
Fragmentation is of two types −

S.N. Fragmentation & Description

1 External fragmentation
Total memory space is enough to satisfy a request or to reside a process in it,
but it is not contiguous, so it cannot be used.

2 Internal fragmentation
Memory block assigned to process is bigger. Some portion of memory is left
unused, as it cannot be used by another process.

The following diagram shows how fragmentation can cause waste of memory and a
compaction technique can be used to create more free memory out of fragmented
memory −
External fragmentation can be reduced by compaction or shuffle memory contents to
place all free memory together in one large block. To make compaction feasible,
relocation should be dynamic.

CPU SCHEDULING

CPU scheduling is a process which allows one process to use the CPU while the
execution of another process is on hold(in waiting state) due to unavailability of any
resource like I/O etc, thereby making full use of CPU. The aim of CPU scheduling is to
make the system efficient, fast and fair.

Whenever the CPU becomes idle, the operating system must select one of the processes
in the ready queue to be executed. The selection process is carried out by the short-term
scheduler (or CPU scheduler). The scheduler selects from among the processes in
memory that are ready to execute, and allocates the CPU to one of them.

Non-Preemptive Scheduling
Under non-preemptive scheduling, once the CPU has been allocated to a process, the
process keeps the CPU until it releases the CPU either by terminating or by switching to
the waiting state.
This scheduling method is used by the Microsoft Windows 3.1 and by the Apple
Macintosh operating systems.
It is the only method that can be used on certain hardware platforms, because It does not
require the special hardware(for example: a timer) needed for preemptive scheduling.
Preemptive Scheduling
In this type of Scheduling, the tasks are usually assigned with priorities. At times it is
necessary to run a certain task that has a higher priority before another task although it is
running. Therefore, the running task is interrupted for some time and resumed later when
the priority task has finished its execution.
Scheduling Algorithms

To decide which process to execute first and which process to execute last to achieve
maximum CPU utilisation, computer scientists have defined some algorithms, they are:

First Come First Serve(FCFS) Scheduling

Shortest-Job-First(SJF) Scheduling

Priority Scheduling

Round Robin(RR) Scheduling

First Come First Serve Scheduling


In the "First come first serve" scheduling algorithm, as the name suggests, the process
which arrives first, gets executed first, or we can say that the process which requests the
CPU first, gets the CPU allocated first.

• First Come First Serve, is just like FIFO(First in First out) Queue data structure,
where the data element which is added to the queue first, is the one who leaves the
queue first.
• This is used in Batch Systems.
• It's easy to understand and implement programmatically, using a Queue data
structure, where a new process enters through the tail of the queue, and the scheduler
selects process from the head of the queue.
• A perfect real life example of FCFS scheduling is buying tickets at ticket counter.

Calculating Average Waiting Time


For every scheduling algorithm, Average waiting time is a crucial parameter to judge it's
performance.
AWT or Average waiting time is the average of the waiting times of the processes in the
queue, waiting for the scheduler to pick them for execution.
Lower the Average Waiting Time, better the scheduling algorithm.

Consider the processes P1, P2, P3, P4 given in the below table, arrives for execution in
the same order, with Arrival Time 0, and given Burst Time, let's find the average
waiting time using the FCFS scheduling algorithm.

The average waiting time will be 18.75 ms


For the above given proccesses, first P1 will be provided with the CPU resources,

• Hence, waiting time for P1 will be 0


• P1 requires 21 ms for completion, hence waiting time for P2 will be 21 ms
• Similarly, waiting time for process P3 will be execution time of P1 + execution time
for P2, which will be (21 + 3) ms = 24 ms.
• For process P4 it will be the sum of execution times of P1, P2 and P3.

The GANTT chart above perfectly represents the waiting time for each process.
Shortest Job First(SJF) Scheduling
Shortest Job First scheduling works on the process with the shortest burst
time or duration first.

• This is the best approach to minimize waiting time.


• This is used in Batch Systems.
• To successfully implement it, the burst time/duration time of the processes should be
known to the processor in advance, which is practically not feasible all the time.
• This scheduling algorithm is optimal if all the jobs/processes are available at the same
time. (either Arrival time is 0 for all, or Arrival time is same for all)

Shortest Job First


Consider the below processes available in the ready queue for execution, with arrival
time as 0 for all and given burst times.

As you can see in the GANTT chart above, the process P4 will be picked up first as it
has the shortest burst time, then P2, followed by P3 and at last P1.
We scheduled the same set of processes using the First come first serve algorithm in the
previous tutorial, and got average waiting time to be 18.75 ms, whereas with SJF, the
average waiting time comes out 4.5 ms.

Priority Scheduling

• Priority is assigned for each process.


• Process with highest priority is executed first and so on.
• Processes with same priority are executed in FCFS manner.
• Priority can be decided based on memory requirements, time requirements or any
other resource requirement.

Round Robin Scheduling

• A fixed time is allotted to each process, called quantum, for execution.


• Once a process is executed for given time period that process is preemptied and other
process executes for given time period.
• Context switching is used to save states of preemptied processes.

DBMS
A database management system (DBMS) is system software for creating and
managing databases. The DBMS provides users and programmers with a systematic way
to create, retrieve, update and manage data.

A DBMS makes it possible for end users to create, read, update and delete data in a
database. The DBMS essentially serves as an interface between the database and end
users or application programs, ensuring that data is consistently organized and remains
easily accessible.

The DBMS manages three important things: the data, the database engine that allows data
to be accessed, locked and modified -- and the database schema, which defines the
database’s logical structure. These three foundational elements help provide concurrency,
security, data integrity and uniform administration procedures. Typical database
administration tasks supported by the DBMS include change management, performance
monitoring/tuning and backup and recovery. Many database management systems are
also responsible for automated rollbacks, restarts and recovery as well as
the logging and auditing of activity.

The DBMS is perhaps most useful for providing a centralized view of data that can be
accessed by multiple users, from multiple locations, in a controlled manner. A DBMS can
limit what data the end user sees, as well as how that end user can view the data,
providing many views of a single database schema. End users and software programs are
free from having to understand where the data is physically located or on what type of
storage media it resides because the DBMS handles all requests.

The DBMS can offer both logical and physical data independence. That means it can
protect users and applications from needing to know where data is stored or having to be
concerned about changes to the physical structure of data (storage and hardware). As long
as programs use the application programming interface (API) for the database that is
provided by the DBMS, developers won't have to modify programs just because changes
have been made to the database.

With relational DBMSs (RDBMSs), this API is SQL, a standard programming language
for defining, protecting and accessing data in a RDBMS.
MS OFFICE

Microsoft Office is a family of client software, server software, and services developed
by Microsoft. It was first announced by Bill Gates on 1 August 1988, at COMDEX in Las
Vegas. Initially, a marketing term for an office suite (bundled set of productivity
applications), the first version of Office contained Microsoft Word, Microsoft Excel, and
Microsoft PowerPoint. Over the years, Office applications have grown substantially
closer with shared features such as a common spell checker, OLE data integration and
Visual Basic for Applications scripting language. Microsoft also positions Office as a
development platform for line-of-business software under the Office Business
Applications brand. On 10 July 2012, Softpedia reported that Office is used by over a
billion people worldwide.

Microsoft Word: A word processor included in Microsoft Office and some editions of
the now-discontinued Microsoft Works. The first version of Word, released in the autumn
of 1983, was for the MS-DOS operating system and introduced the Computer mouse to
more users. Word 1.0 could be purchased with a bundled mouse, though none was
required. Following the precedents of LisaWrite and MacWrite, Word for Macintosh
attempted to add closer WYSIWYG features into its package. Word for Mac was released
in 1985. Word for Mac was the first graphical version of Microsoft Word. Initially, it
implemented the proprietary .doc format as its primary format. Word 2007, however,
deprecated this format in favor of Office Open XML, which was later standardized by
Ecma International as an open format. Support for Portable Document Format (PDF) and
OpenDocument (ODF) was first introduced in Word for Windows with Service Pack 2
for Word 2007.

Microsoft Excel: A spreadsheet editor that originally competed with the dominant Lotus
1-2-3, and eventually outsold it. Microsoft released the first version of Excel for the Mac
OS in 1985, and the first Windows version (numbered 2.05 to line up with the Mac) in
November 1987.

Microsoft PowerPoint: A presentation program used to create slideshows composed of


text, graphics, and other objects, which can be displayed on-screen and shown by the
presenter or printed out on transparencies or slides.

Microsoft Access: A database management system for Windows that combines the
relational Microsoft Jet Database Engine with a graphical user interface and software
development tools. Microsoft Access stores data in its own format based on the Access
Jet Database Engine. It can also import or link directly to data stored in other applications
and databases.

You might also like