0% found this document useful (0 votes)
14 views10 pages

Factors

Uploaded by

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

Factors

Uploaded by

mikeshoka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

https://www.geeksforgeeks.

org/what-are-the-functions-of-a-cpu/

DZITSONI VOCATIONAL TRAINING


CENTRE

ICT
NOTES
https://www.geeksforgeeks.org/what-are-the-functions-of-a-cpu/

COMPUTER HARDWARE
Main Parts of a computer
Computer components are divided into two major categories, which
are hardware and software. The difference between the two is that hardware components
can be seen and touched, but software components can only be seen; they cannot be
touched.

CPU
The central processing unit (CPU) is the primary component of any digital computer system,
consisting of the main memory, the control unit, and the arithmetic-logic unit.
It is the physical heart of the entire computer system.
The CPU in modern computers is housed on an integrated circuit chip known as a
microprocessor.
A microprocessor is a small electronic device that contains the arithmetic, logic, and control
circuitry required to perform the functions of a digital computer’s central processing unit. In
practice, this type of integrated circuit is capable of interpreting and executing program
instructions in addition to performing arithmetic operations.
The central processing unit’s control unit regulates and integrates the computer’s operations.
It selects and retrieves instructions from the main memory in the correct sequence and
interprets them so that the other functional elements of the system can perform their
respective operations at the appropriate time. All input data are transferred via main memory
to the arithmetic-logic unit for processing, which includes the four basic arithmetic functions
(addition, subtraction, multiplication, and division) as well as certain logic operations such as
data comparison and selection of the desired problem-solving procedure or a viable
alternative based on predetermined decision criteria.
Characteristics/Functions

 The CPU is regarded as the computer’s brain.


 The CPU is responsible for all data processing operations.
 It saves information such as data, intermediate results, and instructions (program).
 It directs the operation of all computer components.
Components of a CPU

 Memory or Storage Unit


 Control Unit
 Arithmetic Logic Unit
https://www.geeksforgeeks.org/what-are-the-functions-of-a-cpu/

Memory or Storage Unit


This unit has the capability of storing instructions, data, and intermediate results. When
necessary, this unit sends data to other computer units. It is also referred to as an internal
storage unit, main memory, primary storage, or Random-Access Memory (RAM). Its size has
an impact on its speed, power, and capability. In a computer, there are two types of
memories: primary memory and secondary memory.
The memory unit’s functions are as follows:

 It saves all of the data and instructions needed for processing.


 It saves intermediate processing results.
 It saves the final results of processing before they are sent to an output device.
 The main memory is where all inputs and outputs are routed.

The Control Unit


This unit manages the operations of all computer components but does not perform any
actual data processing. To function properly, all CPU components must be synchronized.
The control unit performs this function at a rate determined by the clock speed and is in
charge of directing the operations of the other units through the use of timing signals that run
throughout the CPU.
This unit’s functions are as follows:

 It is in charge of controlling the transfer of data and instructions among the various
components of a computer.
 It manages and coordinates all of the computer’s units.
 It reads instructions from memory, interprets them, and directs the computer’s
operation.
 It communicates with Input/Output devices to transfer data.
 It neither processes nor stores data.
Arithmetic Logic Unit
This unit is divided into two subsections, namely,
Sections of Arithmetic and Logic
Arithmetic Unit
The arithmetic unit’s function is to perform arithmetic operations such as addition,
subtraction, multiplication, and division. All complex operations are carried out by repeatedly
performing the aforementioned operations.
Logic Unit
The logic unit’s function is to perform logic operations on data such as comparing, selecting,
matching, and merging.
The arithmetic logic unit (ALU) is responsible for the computer’s arithmetic and logical
functions. The input data is held in the A and B registers, and the result of the operation is
received in the accumulator. The instruction register stores the instruction that the ALU will
execute.
When adding two numbers, for example, one is placed in the A register and the other in the
B register. The addition is performed by the ALU, and the result is stored in the accumulator.
The data to be compared is placed into the input registers if the operation is logical. The
comparison result, a 1 or 0, is stored in the accumulator. The accumulator content is then
https://www.geeksforgeeks.org/what-are-the-functions-of-a-cpu/

placed into the cache location reserved by the program for the result, whether it is a logical
or arithmetic operation.
The ALU also performs another type of operation. The result is a memory address, which is
used to calculate a new memory location to begin loading instructions. The outcome is
stored in the instruction pointer register.
Instruction register and pointer
The instruction pointer identifies the memory location in which the CPU will execute the next
instruction. When the current instruction is completed, the CPU loads the next instruction
into the instruction register from the memory location specified by the instruction pointer.
Cache
The CPU never has direct access to RAM. Modern CPUs have one or more cache layers.
The CPU’s calculation speed is much faster than the RAM’s ability to feed data to the CPU.
Cache memory is faster than system RAM and, because it is located on the processor chip,
it is closer to the CPU. The cache stores data and instructions to keep the CPU from having
to wait for data to be retrieved from RAM. When the CPU requires data—and program
instructions are considered data—the cache checks to see if the data is already in residence
and returns it to the CPU.
If the requested data is not in the cache, it is retrieved from RAM and used to move more
data from RAM into the cache using predictive algorithms. The cache controller analyses the
requested data and attempts to predict what additional data from RAM will be required. It
loads the expected data into the cache. By storing some data closer to the CPU in a faster-
than-RAM cache, the CPU can stay busy and avoid wasting cycles waiting for data.

The Four Primary Functions of the CPU


The CPU processes instructions it receives in the process of decoding data. In processing
this data, the CPU performs four basic steps:
1. Fetch: Each instruction is stored in memory and has its own address. The processor
takes this address number from the program counter, which is responsible for
tracking which instructions the CPU should execute next.
2. Decode: All programs to be executed are translated into assembly instructions.
Assembly code must be decoded into binary instructions, which are understandable
to your CPU. This step is called decoding.
3. Execute: While executing instructions, the CPU can do one of three things: Do
calculations with its ALU, move data from one memory location to another, or jump to
a different address.
4. Store: The CPU must give feedback after executing an instruction, and the output
data is written to the memory.
https://www.geeksforgeeks.org/what-are-the-functions-of-a-cpu/

Computer Memory
Memory is designed for fast access and typically stores only the data and instructions that
are necessary for the currently running programs on a computer.
When input devices send binary data to a CPU, it immediately stores that data in memory to
make it easier to process.
Let's say we ask a computer to add 2 + 4. Here's what it will do:
 Store 2 (0010) and 4 (0100) in memory
 Use a circuit in the CPU to calculate the result
 Store 6 (0110) in memory
Since the CPU is constantly using data from memory, they're connected via a memory bus,
a high-speed communication transfer system, typically made from wires, conductors, or
optical fibers.

Memory types
This type of memory, also called main memory or RAM (Random Access Memory), is only
used for temporary storage of data. When you restart a computer, it typically wipes the
memory entirely. Memory wouldn't be a good place to store data for later, like files and
programs.
Computers store long-term data in a different type of memory: external memory or
secondary storage, like a hard drive or USB drive.
RAM, ROM and Cache are the 3 main types of memory.
RAM stands for Random Access Memory and it only stores data temporarily, as soon as
your power is off, you will lose the data, but the advantage is that its speed is a lot faster
than external memory or ROM.
SRAM (static RAM) and DRAM (dynamic RAM) are the two main types of RAM.
When a SRAM unit is given a status (0/1), it will maintain this status until the power is off or
given a new status. But SRAM need 4-6 transistors to store a 1-bit data, so it costs a lot.

DRAM on the other hand, only needs 1 transistor to store the 1-bit, but you have to keep
refreshing in a certain period of time to keep the data, otherwise it will disappear. DRAM
keeps data for a short time, the speed is also slower, but it's cheap, and still faster than any
type of ROM. There are many types of DRAM too, but you can look it up yourself. (the most
used type is DDR RAM)

ROM stands for read-only memory, like its name, you can only read the data, once the data
is written in it won't change, and will be saved even if the power is off. It's usually a readable
chip integrated on a hardware and is written before putting the computer together to identify
and control hardware.
https://www.geeksforgeeks.org/what-are-the-functions-of-a-cpu/

EPROM, erasable programmable ROM, uses ultraviolet rays to erase data, one of the
common used ones.
EEPROM, electrically EPROM, doesn't need ultraviolet to erase, so the programming can be
done in the circuits, but with high price and slow writing.
Measurement of computer memory in terms of: bit, byte, KB, MB, GB, TB.

Input devices

Output devices
This are devices used to display information or data. They give output as either softcopy or
hardcopy. Softcopy output is that which can be seen, listened to, but not touched. Hardcopy output is
that which is given on a paper; it can be touched. Some examples of output devices include the
monitor, the printer and audio speakers.

Storage/Hard disk/SSD
What it is: All computers need somewhere to store their data. Modern computers either use
a Hard Disk Drive (HDD) or Solid State Drive (SSD).
What it does: HDDs are made of an actual disk onto which data is stored. The disk is read
by a mechanical arm. (HDDs are cheaper than SSDs, but are slowly becoming more and
more obsolete.)
SSDs (think SIM cards) have no moving parts and are faster than a hard drive, because no
time is spent waiting for a mechanical arm to find data on a physical location on the disk.

Peripheral devices
https://www.geeksforgeeks.org/what-are-the-functions-of-a-cpu/

Factors affecting the performance of a computer

The speed of the CPU


The speed of the CPU is also known as the clock speed of the CPU. The clock speed of the
CPU is the frequency of which the processor executes instructions or the frequency by which
data is processed by the CPU. It is measured in millions of cycles per second or megahertz
(MHz). If the Clock speed of the CPU is fast then definitely the performance of the computer
will be affected positively, in other words the computer will carry out processing functions at
a faster pace.

The size of the RAM (Random Access Memory)


The RAM is referred to as the active part of the computer. This is because the RAM has the
capability of storing data that the computer is currently using, because of the fact that it is
fast to retrieve data stored in the RAM. With the definition above, a large RAM size will mean
a faster computer performance and a smaller RAM size will result to slower computer
performance.

The speed of the hard disk


The hard disk speed is defined as the rate at which material and content can be read and
written on it. The hard disk speed of different hard disks is not consistent because they vary
by manufacturer, drive type and the use of the hard disk. It therefore means that the higher
the speed of the hard disk the faster the performance of the computer and vice versa.
Hard disk space
The bigger the space on the hard disk will result to faster performance of the computer. The
smaller the space on the hard disk will result in a slower performance of the computer. The
hard disk is filled with data this will use most of the memory leaving less memory for the
operations of the processor.

Multiple applications running on the computer


Multi-tasking tends to slow down the performance of the computer because memory is used
to support more than one application compared to when one application has all the memory
to itself. This means that the more applications that are running the slower the computer will
perform. Likewise, if less or one application is running the performance of the computer will
be faster.

Type of graphic card


When it comes to quality of pictures and animations graphic cards are the main factors. So if
a machine processes many graphics and it has a weak graphic card it will perform slower.
This means that the more powerful the graphic card is the faster the performance of the
computer.

Defragmenting files
Files that are broken or it takes long to read them will mean that the computer will have to
defragment them first. This will slow down the performance of the computer.
https://www.geeksforgeeks.org/what-are-the-functions-of-a-cpu/

OPERATING SYSTEM
Definition
An Operating System acts as a communication bridge (interface) between the user and
computer hardware. The purpose of an operating system is to provide a platform on which a
user can execute programs conveniently and efficiently.
An operating system is a piece of software that manages the allocation of Computer
Hardware. The coordination of the hardware must be appropriate to ensure the correct
working of the computer system and to prevent user programs from interfering with the
proper working of the system.
The main goal of the Operating System is to make the computer environment more
convenient to use and the Secondary goal is to use the resources most efficiently.
An operating system is a program that manages a computer’s hardware. It also provides a
basis for application programs and acts as an intermediary between the computer user and
computer hardware. The main task an operating system carries out is the allocation of
resources and services, such as the allocation of memory, devices, processors, and
information. The operating system also includes programs to manage these resources, such
as a traffic controller, a scheduler, a memory management module, I/O programs, and a file
system. The operating system simply provides an environment within which other programs
can do useful work.

Functions of an Operating System


Memory Management
The operating system manages the Primary Memory or Main Memory. Main memory is
made up of a large array of bytes or words where each byte or word is assigned a certain
address. Main memory is fast storage and it can be accessed directly by the CPU. For a
program to be executed, it should be first loaded in the main memory. An operating system
manages the allocation and deallocation of memory to various processes and ensures that
the other process does not consume the memory allocated to one process. An Operating
System performs the following activities for Memory Management:
It keeps track of primary memory, i.e., which bytes of memory are used by which user
program. The memory addresses that have already been allocated and the memory
addresses of the memory that has not yet been used.
In multiprogramming, the OS decides the order in which processes are granted memory
access, and for how long.
It Allocates the memory to a process when the process requests it and deallocates the
memory when the process has terminated or is performing an I/O operation.
Processor Management
In a multi-programming environment, the OS decides the order in which processes have
access to the processor, and how much processing time each process has. This function of
OS is called Process Scheduling. An Operating System performs the following activities for
Processor Management.
https://www.geeksforgeeks.org/what-are-the-functions-of-a-cpu/

An operating system manages the processor’s work by allocating various jobs to it and
ensuring that each process receives enough time from the processor to function properly.
Keeps track of the status of processes. The program which performs this task is known as a
traffic controller. Allocates the CPU that is a processor to a process. De-allocates processor
when a process is no longer required.

Device Management
An OS manages device communication via its respective drivers. It performs the following
activities for device management.
Keeps track of all devices connected to the system. Designates a program responsible for
every device known as the Input/Output controller.
Decide which process gets access to a certain device and for how long.
Allocates devices effectively and efficiently. Deallocates devices when they are no longer
required.
There are various input and output devices. An OS controls the working of these input-output
devices.
It receives the requests from these devices, performs a specific task, and communicates
back to the requesting process.
File Management
A file system is organized into directories for efficient or easy navigation and usage. These
directories may contain other directories and other files. An Operating System carries out the
following file management activities. It keeps track of where information is stored, user
access settings, the status of every file, and more. These facilities are collectively known as
the file system. An OS keeps track of information regarding the creation, deletion, transfer,
copy, and storage of files in an organized way. It also maintains the integrity of the data
stored in these files, including the file directory structure, by protecting against unauthorized
access.
Security
The operating system uses password protection to protect user data and similar other
techniques. it also prevents unauthorized access to programs and user data. The operating
system provides various techniques which assure the integrity and confidentiality of user
data. The following security measures are used to protect user data:

 Protection against unauthorized access through login.


 Protection against intrusion by keeping the firewall active.
 Protecting the system memory against malicious access.
 Displaying messages related to system vulnerabilities.
Job Accounting
The operating system Keeps track of time and resources used by various tasks and users,
this information can be used to track resource usage for a particular user or group of users.
In a multitasking OS where multiple programs run simultaneously, the OS determines which
applications should run in which order and how time should be allocated to each application.
Error-Detecting Aids
The operating system constantly monitors the system to detect errors and avoid
malfunctioning computer systems. From time to time, the operating system checks the
system for any external threat or malicious software activity. It also checks the hardware for
any type of damage. This process displays several alerts to the user so that the appropriate
action can be taken against any damage caused to the system.
Coordination Between Other Software and Users
https://www.geeksforgeeks.org/what-are-the-functions-of-a-cpu/

Operating systems also coordinate and assign interpreters, compilers, assemblers, and
other software to the various users of the computer systems. In simpler terms, think of the
operating system as the traffic cop of your computer. It directs and manages how different
software programs can share your computer’s resources without causing chaos. It ensures
that when you want to use a program, it runs smoothly without crashing or causing problems
for others. So, it’s like the friendly officer ensuring a smooth flow of traffic on a busy road,
making sure everyone gets where they need to go without any accidents or jams.

You might also like