0% found this document useful (0 votes)
13 views61 pages

Introduction

The document discusses the importance of understanding computer systems for computer science students, emphasizing that knowledge of computer organization and architecture is essential for effective programming and optimization. It outlines various layers of a computer system, including hardware, programming, operating systems, applications, and communications, and introduces the concept of abstraction in computing. Ultimately, the document argues that a solid grasp of these concepts enables computer scientists to write better software and solve complex problems efficiently.

Uploaded by

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

Introduction

The document discusses the importance of understanding computer systems for computer science students, emphasizing that knowledge of computer organization and architecture is essential for effective programming and optimization. It outlines various layers of a computer system, including hardware, programming, operating systems, applications, and communications, and introduces the concept of abstraction in computing. Ultimately, the document argues that a solid grasp of these concepts enables computer scientists to write better software and solve complex problems efficiently.

Uploaded by

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

Some students of computer and

information sciences look at computer


systems the same way many drivers
look at their cars:
the use of a car doesn't require the
knowledge
Students of how ask:
invariably to build one.

Why if I am a computer science


major must I learn about how
Introduction
computer systems work?
“Isn’t learning computer systems
organization and architecture for
computer engineers?”
Why do I care what the inside of a
computer system looks like?

We can certainly write high-level


language programs without
understanding how these programs
execute Introduction
We can use various application
packages without understanding how
they reallyhappens
But what work. when the program
we have written needs to be faster and
more efficient or the application we
are using doesn’t do precisely what we
want?
As computer scientists we need a basic
understanding of the computer system
Introduction
itself in order to be more productive.
Computer scientists are usually more
concerned with writing complex
program algorithms rather than
designing computer
Some algorithms hardware.
are so complicated
that they would take too long to run on
todays computer systems.

These kinds of algorithms are


considered computationally infeasible.
Introduction
To understand why an algorithm is
infeasible or to understand why the
implementation of a feasible algorithm
is running too slowly you must be able
to see the program from the
computers point of view.
Program optimization and system
tuning are perhaps the most important
motivations for learning how computer
systems work. Introduction
The level of knowledge about
computer organization that a high-
level programmer must have depends
on the task the high-level programmer
is attempting
• If you to
evercomplete:
need to model
largecomplexreal-world systems you
will need to know how floating-point
arithmetic should work as well as
how it really works Introduction
in practice.
• If you want to write compilers you
must understand the hardware
environment within which the
compiler
(the will function.
best compilers leverage
particular hardware features such as
pipeliningfor greater speed and
efficiency.)

Introduction
• If your work involves embedded
systemsare which are usually
resource-constrainedyou must
understand all of the time space and
• price
If youtrade-offs
wish to design peripheral
equipment or the software that
drives peripheral equipment you
should know every detail of how a
particular Introduction
computer system deals
As computer scientists it is imperative
that we understand how the hardware
interacts with software:
in order to write good software it is
very important to understand the
computer system as a whole.

We must become familiar with how


various circuits and components fit
together to Introduction
create a working
We become familiar with different
circuits and components of computer
systems through the study of
computer organization.
Computer organization encompasses
all physical aspects of computer
systems.

It helps to answer the question:

Introduction
The study of computer architecture
focuses on the structure and behavior
of the computer system refers to the
logical and abstract aspects of system
implementation as seen by the
programmer.
Studying computer architecture helps
us to answer the question:

Introduction
The distinction line between computer
architecture and computer
organization is somewhat blurred.

People in the fields of computer


science and computer engineering
hold differing opinions as to exactly
which concepts pertain to computer
organization and which pertain to
Introduction
computer architecture.
In fact neither computer
organizationnor computer
architecture can stand alone – they are
interrelated and interdependent.
Our comprehension of computer
organization and architecture
ultimately leads to a deeper
understanding of computer systems
and computation – the heart and soul
Introduction
The fundamental question of computer
science is:

Just as the machines developed during


the Industrial Revolution automated
manual labor computers automate the
processing of information.

Fundamentals
When electronic computers were first
developed in the 1940s their designers
built them to automate the solution of
mathematical problems.

Since then however computers have


applications as diverse as financial
accountingcinema
productionsmartphones etc.
Fundamentals
Everything the computer does you
could do in principle.

The major difference between


computer and human execution of a
job is that the computer can perform
calculations and make logical
decisions phenomenally faster than
human beings can.
Fundamentals
Many of today’s personal computers
can perform billions() of calculations
in one second – more than a human
can perform in a lifetime.

Supercomputers are already


performing thousands of trillions or
quadrillions () of instructions per
second.
Fundamentals
Example
China’s National University of Defense
Technology’s Tianhe-2 supercomputer
can perform over
quadrillioncalculations per second.
To put that in perspective the Tianhe-2
supercomputer can perform in one
second about millioncalculations for
every person on the Fundamentals
planet!
Example
China’s newest supercomputerThe
Sunway TaihuLight is comprised of
some chips, each with processor
cores.
In terms of memoryit has petabytes of
RAM used for the entire machine.

The new number one is capable of


performing some quadrillion
calculations per second (otherwise
However to harness the speed of the
computer people must instruct or
program the computer.
The nature of computers is best
understood by learning how to
program the machine.
Programming requires that you learn a
programming language.

Fundamentals
Before plunging into the details of
studying a programming language we
need to introduce the concept of
abstraction.
Then we can go ahead by describing
the hardware and software
components of a computer system and
conclude with a description of a
typical Layers of a that
application Computer
makes
something useful. System
A computer system is like an onion
made up of many layers starting with
low-level hardware and concluding
with higher-level software including
assemblers
Each layer and operating
plays a systems.

specific role in the


overall design of

Layers
the system. of a Computer
System
We should explore aspects of
computing one layer at a time.
Each layer in itself is not that
complicated.
In fact any computer system actually
does only very simple tasks – it just
does them so blindingly fast that many
simple tasks can be combined to
Layers
accomplish larger, of a Computer
more complicated
System
Lets discuss each of these layers
briefly by working our way from the
inside out which is sometimes referred
toInformation
 as a bottom-up approach.
layer
reflects the way we represent
information on a computer.
Information on a computer is managed
Layers
using binary digits –of a .Computer
and
System
So to understand computer processing
we must first understand the binary
number system and its relationship to
other number systems (such as the
decimal system).
Then we can turn our attention to how
we take the myriad types of
information we manage –
numberstextimagesaudiovideo etc. –
andLayers of them
represent a Computer
in a binarySystem
format.
 Hardware layer
Consists of the physical hardware of a
computer system.
Computer hardware includes devices
such as gates and circuits which
control the flow of electricity in
This core electronic
fundamental ways. circuitry gives rise
to specialized hardware components
such as CPU and memory.
Layers of a Computer System
 Programming layer
Deals with software the instructions
used to accomplish computations and
Programs can take many forms be
manage data.
performed at many levels and be
implemented in many languages.
Despite the enormous variety of
programming languages and issues
the goal remains the same – to solve
Layers of a Computer System
 Operating Systems layer
Every computer has an operating
system (OS) to help manage the
Operating
computer’ssystems (Windows 10 Linux
resources.
macOS Unix etc.) help us interact with
the computer system and manage the
way hardware devices programs and
Knowing what an operating system
data interact.
does is key to understanding the
Layers of a Computer System
 Applications layer
The previous four layers focus on
making a computer system work.
The applications layer by contrast
focuses on using the computer to solve
specific real-world problems.
We develop and run application
programs to take advantage of the
computers abilities in other areas of
Layers of a Computer System
Area-specific computer software tools
involves specific sub-disciplines of
computing such as
• Information systems
• Artificial intelligence
• Simulation
• Graphics
• Gaming
Layers of a Computer
etc. System
 Communications layer
Computers no longer exist in isolation
on someones desktop.
We mainly use computer technology to
communicate through various
networks by sharing information and
The Internet
resources. for example and
especially its World Wide Web (WWW)
part makes that communication
Layers of a Computer System
The levels (layers) of a computer
system that we just examined are
examples
An of abstraction.
abstraction is a mental model a way
to think about something that removes
or hides complex details.

When we are dealing with a computer


system on one layer we dont need to
be concerned about the details of the
other layers. Abstraction
We rely on abstractions every day of
our lives.
Example #1
When we are writing a program we
don’t have to concern ourselves with
how the#2
Example hardware carries out the
instructions.
Likewise when we are running an
application program we dont have to
Abstraction
be concerned with how that program
Example #3
We dont need to know how a car works
to drive one somewhere. That is we
dont really need to know how the
engine works in detail.
We need to know only some basics
about how to interact with the car:
how the pedals and knobs and steering
wheel work.
Abstraction
A complete definition of abstraction is
multifaceted and includes the
following parts:
• Suppression of detail to show the
essence of the matter
• An outline structure
• Division of responsibility through a
chain of command
• Subdivision of a system into smaller
Abstraction
The theme of this lecture is the
application of abstraction to computer
science.

It begins however by considering


levels of abstractionin areas other
than computer science.

Abstraction
Three common graphic
representations of levels of abstraction
are
• Level diagram
• Nesting diagram
• Hierarchy or Tree diagram.
These three kinds of diagrams also
apply to levels of abstraction in
computer systems.
Abstraction
Figure 1(a) shows a level diagram as a
set of boxes arranged vertically.

This figure represents a


system with levels of
abstraction.

The top boxrepresents the highest


level of abstraction and the bottom
Abstraction
box represents the lowest.
Figure 1(b) shows a nesting diagram.
Like the level diagram a
nesting diagram is a set of boxes.

It always consists of one


large outer box with the
rest of the boxes nested
inside
In theit.figure two boxes are nested
immediately inside the one large outer
box. Abstraction
In a nesting diagram none of the boxes
overlap. A box is always completely
enclosed within another box.

Figure 1(c) shows the third graphic


representation
of levels of
abstraction,
a hierarchy
or tree diagram. Abstraction
Tree diagrams such as Figure 1(c)
have the trunk at the top instead of
the bottom.
Each box is called a node with the
single node at the top called the root.
A node with no connections to a lower
level is a leaf.
This figure is a tree with one root node
and three leaves.
Abstraction
The computer scientist must
appreciate the distinction between
essentials
In computerandscience
details. the progression

for problem solving should be from the


most abstract to the most detailed.
One goal of this course is to teach you
how to think abstractly that is to
suppress irrelevant details when
Abstraction
formulating a solution to a problem.
In computing problems there is a
natural tendency to be overly
concerned with too much detail in the
beginning stages of the progression.

In solving problems in computer


science the essentials should come
before the details.

Abstraction
Levels of abstraction are also evident
in the outline organization of written
documents.
An example is the United States
Constitution, which consists of seven
articles each of which is subdivided
into sections.

Examples of Abstraction
Article I. Legislative Department
Section 1. Congress
Section 2. House of Representatives
Section 3. Senate
Section 4. Elections of Senators and Representatives Meetings of
Congress
Section 5. Powers and Duties of Each House of Congress
Section 6. Compensation, Privileges, and Disabilities of Senators and
Representatives
Section 7. Mode of Passing Laws
Section 8. Powers Granted to Congress
Section 9. Limitations on Powers Granted to the United States
Section 10. Powers Prohibited to the States
Article II. Executive Department
Section 1. The President
Section 2. Powers of the President
Section 3. Duties of the President
Section 4. Removal of Executive and Civil Officers

Article III. Judicial Department


Section 1. Judicial Powers Vested in Federal Courts
Section 2. Jurisdiction of United States Courts
Section 3. Treason

Examples of Abstraction
Article IV. The States and the Federal Government
Section 1. Official Acts of the States
Section 2. Citizens of the States
Section 3. New States
Section 4. Protection of States Guaranteed

Article V. Amendments

Article VI. General Provisions

Article VII. Ratification of the Constitution

The constitution as a whole is at the


highest level of abstraction.
A particular article such as Article III
(Judicial Department) deals with part
of theExamples
whole. of Abstraction
A section within that article Section 2
(Jurisdiction of United states Courts)
deals with a specific topic and is at the
lowest level of abstraction.

Figure 2 shows the outline


structure of the
Constitution in a nesting
diagram.
Examples of Abstraction
• The big outer box is the entire
Constitution.
• Nested inside it are several smaller
boxes which represent the articles.

• Inside the articles are the section


boxes.

Examples of Abstraction
This outline method of organizing a
document is also important in
computer
The science.
technique of organizing programs
and information in outline form is
called structured programming.

Software designers organize their


programs in outline form before filling
in the programming details.
Examples of Abstraction
Programming experience teaches us
that when a problem is large we
should break it down and use a divide
andprogramming
In conquer approach.
we divide a problem
into modules and then design each
module separately.

Each module performs a specific task,


and modules need only know how to
interface with other modules to make
Corporate organizations is another
area that uses the concept of levels of
abstraction.
For example,
Figure 3 is a
particular
organization chart
in the form of a
hierarchy diagram
for a hypothetical
The president of the company is at the
highest level and is responsible for the
(un)successful operation of the entire
organization.
The three vice-presidents report to the
president (each vice-president is
responsible for just one major part of
the operation.)
There are more levels, not shown in
the figure, under each of the managers
Examples of Abstraction
Levels in an organization chart
correspond to responsibility and
authority
The in theacts
president organization.
in the best (worst)
interest of the entire company. (he/she
delegates responsibility and authority
to those who report to him/her.)

They in turn use their authority to


manage their part of the organization
and may delegate responsibilities to
Figure 4 is a level diagram that shows
the line of authority in the

•organization.
Each vice-president
reports to the
president.
• Each director reports
to a vice-president.
• Each manager reports
to a director, and so
There is a direct relationship between
the way an organization functions as
reflected by its organization chart and
the way a computer system operates.
Like a large organization a computer
system is typically organized as a
hierarchy.
Any given part of a computer system
(both small and large) takes orders
from the part immediately above it in
Another example of levels of
abstraction that is closely analogous to
computer systems is the automobile.

Like a computer system the


automobile consists of separate parts:
• an engine
• a transmission
• an electrical system
• a cooling system
• a chassis.
Examples of Abstraction
Each part of an automobile is
subdivided. The electrical system has a
battery headlights voltage regulator

•etc.
Driversare at the highest level of
abstraction. They perform their
tasks by knowing how to operate the
car: for example how to start it how
to use the accelerator and how to
Examples
apply the brakes. of Abstraction
• At the next lower level of abstraction
are the backyardmechanics. They
understand more of the details
under the hood than the casual
drivers do: for example they know
how to change the oil and the spark
• At the next lower level of abstraction
plugs.
are the master mechanics. They can
completely remove the engine take it
apart fix it and put it back together.
What is more important is the fact
that
• Backyard mechanics do not need to
know how to drive an automobile in
order to
• Master change the
mechanics also oil andneed
do not the
spark
to plugs
know how to drive an automobile
or to change the oil in order to take
the engine apart.
Examples of Abstraction
In a similar fashionpeople relate to
computer systems at many different
levels of abstraction –
a complete understanding at every
leveldoisnotnot
• You necessary
need to use to
to be a mechanic a
computer.
drive a car
• Similarly you do not need to be an
experienced programmer to use a
word processor.
Examples of Abstraction
Thank You for Attention

You might also like