Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
8 views66 pages

Lecture 02 - Understanding Computer Systems

This lecture covers the fundamentals of computer systems, including system architecture, the startup sequence, and the roles of hardware and software. Key components such as the CPU, memory, and storage devices are discussed, along with the processes involved in starting up an operating system. The lecture also highlights the importance of clock speed and disk speed in affecting system performance during startup.

Uploaded by

Zach Chow
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)
8 views66 pages

Lecture 02 - Understanding Computer Systems

This lecture covers the fundamentals of computer systems, including system architecture, the startup sequence, and the roles of hardware and software. Key components such as the CPU, memory, and storage devices are discussed, along with the processes involved in starting up an operating system. The lecture also highlights the importance of clock speed and disk speed in affecting system performance during startup.

Uploaded by

Zach Chow
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
You are on page 1/ 66

SEHS2359 Fundamentals of

Computing
Lecture 02
Understanding Computer Systems
In this lecture, you will learn about:
• Computer Fundamentals: System Architecture
• What happens when you turn on your computer?
• The startup sequence
• What components and systems are involved?
• How are these components used in the startup sequence?
• Starting up the Operating System
• What makes up a computer system?
• Computer Hardware
• Computer Software
• Discussion
• Different Computer Systems
Computer Fundamentals
• Computer systems are all around us. For
example, home heating systems, cars, games
consoles, phones, watches, fitness trackers,
and drones.
• What is a computer?
“A computer system is identifiable as
a programmable device that takes in data,
processes it into useful information, and
then outputs the information so it can be used.” Storage
or Unit
“A computer is an electronic machine that
accepts data/information, processes it according
to specific instructions called program, and Input
stores it in a particular fashion.” Processing Output
Unit Unit Unit
Computer Fundamentals
• What are the basic components of a computer?
• Processor, called CPU (Central Processing Unit)
• Memory and Storage Devices
• I/O Devices
Storage
• The internal components of a computer system Unit
consist of the hardware required to store and
process data, and communicate with external
devices.
• The input/output (I/O) controller communicates Input
with external devices, such as the input (e.g. Processing Output
keyboard, mouse), output (e.g. screen, printer), and Unit Unit Unit
external storage devices (e.g. USB stick). External
devices that are portable are also called peripheral
devices or peripherals.
V1: How Computers Work: What Makes a
Computer, a Computer?

https://youtu.be/mCq8-xTH7jA
Computer System Overview
• Central Processing Unit Memory

Computing and Central Processing Unit (CPU)

Decision Making Registers


ability
Control
ALU Clock
Unit

• Microprocessor
• Microprocessor is an integrated device that contains all the functions of a
central processing unit of a computer
The Intel Microprocessors, Architecture, Programming and Interfacing” by Barry B. Brey
Computer System Overview
In summary, a microprocessor is a CPU, a
microcomputer is a complete computer
• What is a Microcomputer? system built around a microprocessor, and a
microcontroller is a specialized type of
microcomputer designed to control specific
input devices or systems.
Microprocessor output
memory

Microprocessor along with i/o


devices and memory

• And what about Microcontroller


• Microcomputer on a single chip

The Intel Microprocessors, Architecture, Programming and Interfacing” by Barry B. Brey


Evolution of Microprocessor
• The first microprocessor was used by the department of defense USA,
named as Tomcat.

F-14 Tomcat Fighter

2300 transistors > 6 billion transistors


• The
Speed first
upto world’s
740 KHz commercially available microprocessor was3.2 GHz
Speed upto
introduced by Intel.
8
V2: Evolution of Intel | History of Intel ( 1971-
Now )

https://youtu.be/TqOCC65HkCQ
Computer System Architecture
• Systems architecture refers to the Von Neumann Architecture
structure of the internal components of
a computer system.
• The von Neumann architecture consists
of
• a Processor
• a Memory unit that can communicate
directly with the processor
• connections for input and output devices
• Secondary storage for saving/backing up
data
• Involves: a processor; a memory unit,
which stores both instructions and data;
connections for input and output
devices; and secondary storage for data.
Computer System Architecture
• The internal components of a computer Von Neumann Architecture
system consist of the hardware required
to process data and to allow the Internal Architecture
processor to communicate with other
devices such as secondary storage,
display screens, and printers.
• The main internal components of a
computer system are:
• Processor (CPU)
• Main memory
• Input/output (I/O) controllers
• These components are connected
together by high-speed
communication buses.
Question
• What computer systems do you use and why do you use them?
Question
• Give two examples of each of the following:
• Inputs
• Outputs
• Storage
V2b: How Computers Work: CPU, Memory,
Input & Output

https://youtu.be/DKGZlaPlVLY
CPU (Central Processing Unit)
• CPU is a large chip inside the computer,
which controls everything
• It is a brain of computer
• The processor is the part of the
computer that processes data
by executing programs. It also manages
the rest of the hardware.
• CPU reads the instructions and data
from the computer’s random access
memory or RAM, performs an
instruction, and then writes the data
back to RAM.
How does a program run?
• Computer is a binary system, i.e. only 0 and 1.
• A computer only understands machine language (a.k.a. machine code
or object code) – a collection of binary digits or bits that the
computer reads and interprets.

• An example of machine language (binary) for the text "Hello World" :


V3: How Computers Work: Binary & Data

https://youtu.be/USCBCmwMCDA
How does a program run?
• Computer programs are written
in high-level programming
languages (e.g. C#, Python, Java,
etc.), which the computer
cannot directly understand.
• Any program written in a high-
level programming language
must be translated into machine
language to be executed.
How does a program run?
• Low-level programming languages
(Assembly, C/C++, etc.), designed
for a specific type of processor, are
often used in embedded systems,
operating systems, device drivers,
and other applications that require
direct control over the hardware.
• Most compilers convert source
code directly to machine code, but
in some cases, assembly code can
be used to fine-tune a program.
How does a program run?
• When you run a program:
• The instruction bytes are copied from
storage to RAM.
• The CPU starts running at the first
instruction.
• CPU then runs a fetch/execute cycle:
• fetches one instruction in sequence,
• interprets the instruction and
executes (runs) that instruction, i.e.,
performs the required action,
• fetches the next instruction, and so
on…
Processor Fundamentals: Machine cycle
• For every instruction, a processor
repeats a set of four basic operations,
which comprise a machine cycle
• Fetch program instructions stored in the
main memory
• Decode what the instruction means and
direct the necessary data to be moved
from the memory
• Perform the actual operation (execute)
on the data
• Store the result of the operation back to
memory
Main Memory
• Main memory is memory that can be accessed directly by the processor. The
main memory consists of memory locations that store instructions or data. There
are two types of main memory:
• volatile memory, which loses its contents when the power is removed
• non-volatile memory, which keeps its contents even without power

• The term main memory is often used to mean random access memory (RAM),
which is the working memory that is used by the processor. RAM is
a volatile (temporary) memory that has addressable locations. Each location can
be accessed randomly, so any instruction or data can be placed in any location
(overwriting whatever it previously contained).

• This is different to the role of read-only memory (ROM), a type of non-


volatile (permanent memory), and also different from secondary storage, which
the processor can't work with directly.
RAM (Random Access Memory)
• Type of memory that temporarily stores
the data while your computer is running.
• RAM is both readable and writable.
• You can add, change, and delete data stored
in RAM.
• It is volatile.
• When the computer is switched off, all the
data stored in RAM is lost.
• It is fast memory.
• The size of this storage depends on your
computer
• measured in gigabytes. For example: 8, 16, or
32 gigabytes.
ROM (Read-Only Memory)
• Type of memory, which usually contains data installed
by the computer manufacturer.
• ROM is read-only.
• You cannot add, change or delete the data stored in ROM
• There is process called flashing used to overwrite ROM,
but it requires expertise and involve risks of
unrecoverable losses.
• ROM is a non-volatile memory
• which means it doesn’t need power to store the data
• The ROM also stores the basic input output system, or
BIOS.
• The BIOS contains all of the basic code for controlling your
computer hardware.
• This includes things like your keyboard, mouse, monitor,
and hard drive.
• Like, RAM, It is also fast memory.
Hard drive
• Main storage device in your computer.
• Also referred as hard disk.
• It stores the files and folders on your computer.
• Hard drives store data on spinning disks
• i.e. reads/writes data on to them using an arm with
a magnetic head.
• The data on the hard drive can be modified.
• It is non-volatile memory.
• Unlike RAM and ROM, it is slow.
• An operating system is also stored on the hard
drive.
• There are Solid-state drives (SSDs) which are
faster than hard drives and will start up a
machine quicker but are currently expensive.
BUS System
BUS System
• The different components of a computer system are connected
together using this system.
• A bus transfers data and signals between components inside a
computer.
• For example, in order to execute instructions and process data,
the processor needs to communicate with the main memory and
with the input and output devices.
• In this computer system, there are three main types of buses:
• The address, data, and control buses together are known as the system bus.
The system bus is used to connect the processor (CPU) and main memory
(RAM).
BUS System
• The processor can access the instructions and data in the main
memory as required to execute the program.
• It does this by using dedicated connections called buses:
• an address bus is used to identify the addressed location
• a data bus is used to transfer the contents to/from that location

• This means that the same address and data buses are used in the
process of transferring instructions and data between main memory
and the processor.
• A third bus, the control bus, is used to synchronise and control
operations.
Bus System
Bus Purpose
Address Carries address locations of stored
data from the processor to memory
and input/output devices

Data Sends the data to and from the


processor, memory, and input and
output devices

Control Carries signals that coordinate the


operation of the components
BIOS (Basic Input Output System)
• BIOS contains all the basic code for controlling your computer
hardware (such as keyboards, mice, monitors and hard drives).
• It is stored in the ROM.
• Once the startup sequence is complete, the BIOS does very little as
your computer’s operating system takes control.
• When you start up your computer, you may see a black screen displaying
“Press F2 for Setup”. This is the BIOS. By pressing F2, you enter a setup screen
where you can change where the BIOS loads the operating system from.
• The operating system is normally stored on the hard drive, but you can load
an operating system from a USB drive instead.
What happens when you turn on your computer?
The startup sequence
What components and systems are involved?

• When you press on the power button, there are variety of tasks that
run inside your computer.

• Let’s have a look at each of the components and systems that work
together to start up your computer.
How are these components used in the startup
sequence?
• The CPU starts and fetches instructions into RAM from the BIOS.
• The BIOS starts the monitor and keyboard, does some basic checks to
make sure the computer is working properly.
• For example, it will look for the RAM.
• The BIOS then starts the boot sequence.
• It will look for the operating system.
• If you don’t change any of the settings, the BIOS will fetch the
operating system from the hard drive and load it into the RAM.
• The BIOS then transfers control to the operating system.
How are these components used in the startup
sequence?
Starting up the Operating System (OS)
• Operating systems control the computer’s resources: software, and
hardware.
• Examples of common operating systems are Windows 10, macOS, Linux,
Android, and iOS.

• Thus, in the next slide we discuss the factors that affect the speed and
performance of the OS particularly during the startup.
CPU speed
Clock
• Inside the CPU there is a “clock” that ticks back and forth from high voltage
to low voltage in a very precise time.
• At its very basic level, a CPU is dealing with binary instructions and data.
• Most CPUs work on 64 bits at a time. Hence, It is important that all 64 bits are
processed at exactly the same time.
• This is why the CPU has a clock, it keeps everything in sync.
• Every time the clock “ticks” or pulses, an instruction can be carried out.
• Clock speed is measured in hertz.
• A unit of frequency, representing how many times the clock pulses per second.
• Computer speed is described in gigahertz (GHz).
• A typical clock speed on a PC runs from 1GHz to about 3.8GHz.
• The faster the clock speed, the faster the startup.
• The CPU does not carry out multiple instructions at the same time.
CPU Speed
Cores
• Modern CPUs can have multiple cores, which can run multiple
instructions at the same time.
• This can increase the speed of your system.
• However, more cores does not always mean more speed. It depends on the
task being completed.
• Some tasks have instructions that can run in parallel. Other tasks require the
previous instruction to be completed before the next instruction starts.
• Example in the next slide
Calculating the factors of a number is an example of a task
that can be run in parallel.

• A factor is a number that divides into


another number exactly and without
leaving a remainder.
• For example, 4 and 3 are factors of 12.
• The instructions for the factors of 24
can be sent to different cores to get
quicker answers because each task is
not dependent on another task being
completed:

• Instruction A 24 / 2
• Instruction B 24 / 3
However, the Fibonacci sequence has to be run in sequential
order
• In the Fibonacci series, each number
is the sum of the two preceding ones.
• So you need the two previous answers
to calculate the next result. You can’t run
them in parallel.
• In the example, you cannot work out F3
until you have F2. So you can’t send
Instruction B to one core at the same
time as Instruction A.

• The more cores you have, the faster


your CPU will perform certain actions.
This includes the startup sequence.
Disk speed
• The disk speed refers to the speed of your hard drive.
• Earlier we discussed, that hard drives stored your operating system and loads it into RAM on
startup.
• The speed that your hard drive can do, this affects the start up.
• Total disk speed is measured in megabytes per second.
• There are 1,000,000 bytes in a megabyte.
• The speed of your hard drive will affect your operating system.
• Furthermore, Hard drives store data on spinning disks
• i.e. reads/writes data on to them using an arm with a magnetic head.
• Solid-state drives or SSDs are faster than hard drives and will start up a machine
quicker.
• This is because they have no moving parts. There is no delay in waiting for records to spin and
for the needles to move.
RAM
• The operating system runs in RAM.
• The speed of the RAM itself is how fast it transfers data.
• It is measured in megahertz.
• How fast the RAM works greatly depends on its cache and its size, not just its
own speed.
RAM
Cache
• A cache is a piece of memory that
stores data locally to speed up
data retrieval.
• Web browsers use cache to store
data from a web page that doesn’t
change often.
• For example, your computer doesn’t
retrieve the logo and background from
Twitter each time you visit the website.
• The browser stores these locally and
displays them when you load the
Twitter page.
RAM
Cache
• A disk cache is a dedicated block of memory in RAM that bridges
storage and CPU.
• The RAM has its own cache, commonly called L1 and L2.
• These are physically located on the CPU and are even faster than normal
RAM.
• When the operating system reads a file from the hard drive, the cache
takes a larger block of data than is required. If the operating system
needs more data, it will check the cache in the RAM first to see if it’s
already available.
• This saves reading from the slow hard drive again.
RAM
Size
• If there is insufficient space in the RAM, your operating system will
store temporary data in the Hard Drive.
• This is much slower than storing data in the RAM.
• The size of your RAM can affect speed.
• So, the more RAM you have the faster your operating system can be.
Other factors
• Some other factors that may affect your computer’s performance
during startup:
• What you have plugged in.
• Network connections.
• Software that opens on startup.
What makes up a computer system?
• Today’s computers are far more evolved than the simple command
line interfaces that were used in 60’s and 70’s.
• Performing wide variety of computational tasks to becoming entertainment
centers for playing games, streaming music and movies.

• Are able to share files by connecting to other computers in a network, this


can be in the same building or around the world.

• These are all extra features that didn’t exist when the first CPU was built.

• Most involve new hardware, and in many cases, these extra pieces of
hardware now have their own chips inside the computer.
Computer Hardware
• The physical parts of your computer are called hardware.
• for example, the CPU, RAM, ROM, keyboard, and monitor.
Computer Hardware
• Some other hardware components found inside modern computers,
which are explained below.

• GPU
• Sound card
• Network interfaces
• Optical drives

• Lets discuss these in detail


GPU (Graphics Processing Unit)
• GPU is specially designed chip for
processing images and videos.
• These are specialized tasks that require a
lot of computation and consumes a lot of
memory and CPU time.
• Thus, it frees up the CPU to do other tasks
• GPU processes these tasks at faster rate as
compared to CPU, because it is dedicated.
• When buying a computer, you might see
the phrase “dedicated graphics card”.
• This is a GPU that has its own dedicated RAM.
The GPU can thus carry out processing and hold
lots of temporary data without using up the
CPU or RAM.
Sound card
• Allows the computer to play sound
through headphones or speakers, and
record sound through a microphone.
• To play sounds, a sound card uses a
digital to analogue converter, which
converts digital data to an analogue
(physical) signal.
• For recording, it also has an analogue
to digital converter, which does the
conversion the other way around.
• Most modern computers have a built-
in sound card.
Network interfaces
• A network interface card (NIC) is used to
connect a machine to a network, be it the
internet or a local network of computers.
• Ethernet is the original technology for
connecting local area networks (LANs)
through wires. This enables different
devices on the LAN to communicate with
each other.
• WiFi is a wireless technology for connecting
computers together. WiFi devices connect
to the internet via a WLAN and a wireless
access point. These access points have a
range of about 20 metres indoors.
Optical drives
• An optical drive is a storage device that
uses laser light or electromagnetic waves
to read or write data on optical discs.
• The optical drive is typically found inside
the computer, with an external access
point for the disc to be put in.
• Examples of optical discs are CDs, DVDs, and
Blu-ray discs. The CD was first created in the
1970s.
• Most computers sold today no longer include
a CD drive, and many don’t have any optical
drive at all.
• It seems that the era of the optical drive has
come and gone. Does your computer have an
optical drive?
Computer Hardware
• GPUs, sound cards, network interfaces, and optical drives are extra
hardware components that are now either standard in every
computer or are becoming obsolete.

• What do you think is the next piece of hardware that will become
part of a computer as standard?

• What do you think will become obsolete next? And why


Computer Software
• Software are instructions used to
control a computer.
• There are different types of
software that can run on a
computer:
• system software, utility software, and
application software.
System software
• System software provides the interface between hardware and the
application software.
• Operating systems like Windows, macOS, Android and iOS are examples of
system software.
• Operating systems are loaded into RAM when the device starts up, and have
access to the hard drive.
Utility software
• It is a part of the system software which performs specific tasks to
keep the computer running.
• Utility software is always running in the background.
• Examples of utility software are security and optimization programs.
• Security programs include anti-virus software that scans and removes viruses.
Most computers will include some sort of anti-virus software, but you can add
your own.
• Optimisation programs can include tools for system clean-up, disk
defragmentation, and file compression. These tools are typically installed as
part of the operating system. They have access to the hard drive to keep it
tidy.
Application software
• This is everything else! Anything that is not an operating system or a utility
is an application or app.
• Application software performs specific tasks, for which these are designed.
• For example: word processor, spreadsheet, web browser, graphics software, games
etc
• You can remove and add applications on your computer using the
operating system.
• Application software like a word processor regularly directs the operating
system to load and save files from and to the hard drive. It temporarily
stores the file in RAM, while you are working on it until you save it.
• The saved files are stored on your hard drives.
• This is why, if the computer crashes while you’re working on a file, you may lose any
changes you didn’t save
Application software
• Application software relies heavily on the operating system to do
certain tasks such as:
• needs the operating system to talk to the hardware on the computer and to
other software.
• When a web browser wants to load a web page, it is the operating system
that controls access to the internet and fetches the information from the web.
• Similarly, the operating system also provides the application software
information about what key is being pressed, and about the mouse: where it
is, what it clicked, and where it’s moving on screen.
Different Computer Systems
• Look back at the components you learnt in the startup sequence, and
consider, how you think these components might work differently in a
mobile phone or a tablet computer?
• Would these devices have all the same components?

• Think about the startup sequence of a laptop versus that of a mobile phone.
How often is a mobile phone turned on and off?

• How does this compare with a laptop?

• How do you think this affects the hardware requirements of a mobile phone?
Discussion
• Remember the extra computer hardware we talked about the step
Computer hardware.
• How do these apply to other devices?

• Does a mobile phone need a GPU?

• What kind of network interfaces does a tablet computer have?


Discussion
• Think beyond personal devices to industrial systems.
• A computer system that packs beans into tin cans is not going to have any
need for a GPU or even a sound card. Would it need a network card?
Discussion
• What are the important (and unimportant) components and features
of the following industrial systems?
• For example, do they need RAM? A hard drive? Fast startup? A GPU?

• E.g. of industrial systems:


• Train station ticket machine
• Automated assembly line for a car company
• CT scanner for scanning brains
V4: How Computers Work: Hardware and
Software (Summary of what we learned so far)

https://youtu.be/xnyFYiK2rSY
V5_Prereq: 03 Circuits v6
(Prereq. for the Bonus video)

https://youtu.be/ZoqMiFKspAA
V5: How does Computer Hardware Work?
(Bonus video)

https://youtu.be/d86ws7mQYIg

You might also like