Transcript Document

Introduction
SOEN228
Revision 1.1
September 10, 2003
September 10, 2003
Serguei A. Mokhov,
[email protected]
1
Contents
•
•
•
•
Me, Myself, and I
Lecture 1 Exercises review
Assignment 1 Theory review
Von Neumann Model
September 10, 2003
Serguei A. Mokhov,
[email protected]
2
Me, Myself, and I
• Name: Serguei Mokhov; it is okay to call
me just Serguei; prefixes such as “Sir”,
“Professor” and alike are NOT part of my
name :-)
• The best way to reach me is by email:
[email protected]
September 10, 2003
Serguei A. Mokhov,
[email protected]
3
Exercise (1)
• You are given a class list that shows the
university ID, name, email addresses of each
student enrolled in SOEN228.
• Write a human program that you can execute
that systematically extract a sublist of
students whose first name is Pierre.
• These students should be listed in ascending
order of their ID.
• Give an incorrect solution that the human
program should not generate.
September 10, 2003
Serguei A. Mokhov,
[email protected]
4
Exercise (2)
• Show a sequence of state changes in
executing your human program by
showing all changes to the extracted
sublist and the control pointer, up to and
including processing of the first two
entries of the given list.
• Assume both entries contain Pierre as
the first name.
September 10, 2003
Serguei A. Mokhov,
[email protected]
5
Exercise (3)
• Describe an example use of principle of
locality in everyday life of yours that
helps you to achieve better
‘performance’.
• Repeat the same in your experience in
using the internet.
September 10, 2003
Serguei A. Mokhov,
[email protected]
6
Exercises
• Suppose the area of a chip does not change
in a decade but the number of transistors in a
chip can double every 2 years.
• Suppose also that the current technology
allows you to put 10 million transistors in a
chip.
• How many transistors can be put in a chip 10
years later?
• Explain the implication of this technology
curve on the capacity of a memory chip and
the10,capability
of aSerguei
processor
chip.
September
2003
A. Mokhov,
7
[email protected]
Three Basic Principles in System
Design
• Locality
• Concurrency
• Atomicity
September 10, 2003
Serguei A. Mokhov,
[email protected]
8
Locality
• Locality of information (data or program) to a
processor reduces the latency (waiting time) and
hence improves performance (speed, response
time, time to solution).
• Examples that you will learn in this course include:
– Registers inside a processor that a programmer can use to store
(buffer) program variables temporally.
– Cache memory that automatically buffers information stored in
main memory (RAM).
– Main memory that buffers information stored in disk
• Locality issues matter a lot in parallel computing
(advanced topic if we have time).
September 10, 2003
Serguei A. Mokhov,
[email protected]
9
Concurrency
• Operations can be performed in parallel when the
outcome is as if they are performed in sequence
according to the order they appear in a program.
Hence concurrency improves system speed.
• Examples:
– Concurrent transfers between different pairs of registers
implement concurrent data-paths, leading to a faster
instruction cycle (the duration for fetching and
executing a program instruction).
– Computation and input/output can be carried out
concurrently whenever the processor is not needed in
the latter.
September 10, 2003
Serguei A. Mokhov,
[email protected]
10
Atomicity
• Information accesses should be serializable, i.e., the
results are as if they have occurred in some serial
ordering. Hence when a writer and a reader may overlap
in their accesses, then the system must ensure that the end
result is as if they have occurred in some temporal order.
In some cases, the ordering is intended, and in some
others, the it is not.
• (Related: Synchronization)
• Examples:
– The computer (CPU) should not write into the printer buffer until
the previous line stored in the buffer has already been printed.
– System bus design ensures the atomicity of a bus transaction
between a master and a slave connected to the bus.
September 10, 2003
Serguei A. Mokhov,
[email protected]
11
Von Neumann Model
• A program formed of instructions and data
is stored in memory;
• CPU fetches and executes instructions from
the memory (sequentially).
• Being dropped in parallel computing
• Logical View of A Von Neumann Computer
Model (see next slide)
September 10, 2003
Serguei A. Mokhov,
[email protected]
12
Logical View of A Von Neumann
Computer Model
Memory
Unit
Input
Unit
Arithmetic
and Logic Unit
Output
Unit
Control
Unit
September 10, 2003
Serguei A. Mokhov,
[email protected]
13
Von Neumann Model Explained
(1)
• Arithmetic and Logic Unit (ALU):
– Performs arithmetical and logical operations
• Control Unit (CU):
– Issues control signals to other units to do what
and when
• ALU + CU = CPU, Central Processing Unit
– A.k.a Processor
September 10, 2003
Serguei A. Mokhov,
[email protected]
14
Von Neumann Model Explained
(2)
• Memory Unit (MU)
– Stores your program and its data; consists of distinct
locations (like mailboxes) with distinct addresses, say
from 0 to 230
• Input Unit (IU)
– Enables the CPU to receive input data from the external
word (e.g. keyboard, mouse, CD-ROM)
• Output Unit (OU)
– Accepts output from processor or memory and passes it
on to the external world; (e.g. monitor, printer)
September 10, 2003
Serguei A. Mokhov,
[email protected]
15
Logical View of A Von Neumann
Computer Model (2)
Memory
Unit
Input
Unit
Output
Unit
CPU
Keyboard
September 10, 2003
Mouse
Monitor
Serguei A. Mokhov,
[email protected]
Printer
16