Principles of Computer Architecture Dr. Mike Frank
Download
Report
Transcript Principles of Computer Architecture Dr. Mike Frank
Review of Basic Physics
Background
Basic physical quantities & units
•
•
•
•
•
Unit prefixes
Basic quantities
Units of measurement
Planck units
Physical constants
Unit Prefixes
• See http://www.bipm.fr/enus/3_SI/siprefixes.html for the official international standard
unit prefixes.
• When measuring physical things, these prefixes
always stand for powers of 103 (1,000).
• But, when measuring digital things (bits & bytes) they
often stand for powers of 210 (1,024).
– See also alternate kibi, mebi, etc. system at
http://physics.nist.gov/cuu/Units/binary.html
• Don’t get confused!
Three “fundamental” quantities
Quantity
position,
length,
distance,
radius
time
mass
Typical
symbols
x, L, , d, r
Some Units Planck Units
m, Å, in, ft, LP = (G/c3)1/2
yd, mi, au, = 1.61035 m
ly, pc
t, T
yr, hr, sec
m, M
g, lb, amu
TP = (G/c5)1/2
= 5.41044 s
MP = (c/G)1/2
= 22 g
Some derived quantities
Quantity
area
volume
frequency
velocity
momentum
angular
momentum
acceleration
force
energy, work,
heat, torque
power
pressure,
energy density
Typical
Symbols
A
V
f
v
p
L
a
F
U, E, W,
G, H,
P
p, E
Some
Units
acre
liter
Hz
c
N
J, eV
W
Pa,
atm,
psi
Some
Formulas
v=dxdt
p=mv
L=pd
a=dvdt
F=ma
W=Fd
E=mc2
P=dEdt
p=F/A
E=E/V
Dimensions
L2
L3
1/T
L/T
ML/T
ML2/T
L/T2
ML/T2
ML2/T2
ML2/T3
M/LT2
Electrical Quantities
Quantity
charge
current
voltage
electric field
strength
current
density
resistance
capacitance
inductance
Typical
Symbols
Q, q
I, i
V,v
E
Some
Units
C, qe
A
V
V/m
J
R
C
L
F
H
Some
Formulas
i=dqdt
V=U/Q
E=V/d
Dimensions
Q
Q/T
E/Q
F/Q
J=I/A
Q/TL2
R=V/I
C=dq/dv
L=E/(di/dt)
ET/Q2
Q2/E
• We’ll skip magnetism & related quantities this semester.
Information, Entropy,
Temperature
• These are important physical quantities also
• But, are different from other physical quantities
– Based on statistical correlations
• But, we’ll wait to explain them till we have a
whole lecture on this topic later.
• Interestingly, there have been attempts to
describe all physical quantities & entities in
terms of information (e.g., Frieden, Fredkin).
Unit definitions & conversions
• See http://www.cise.ufl.edu/~mpf/physlim/units.txt
for definitions of the above-mentioned units,
and more. (Source: Emacs calc software.)
• Many mathematics applications have built-in
support for physical units, unit prefixes, unit
conversions, and physical constants.
–
–
–
–
Emacs calc package (by Dave Gillespie)
Mathematica
Matlab - ?
Maple - ?
Fundamental physical constants
• Speed of light c = 299,792,458 m/s
• Planck’s constant h = 6.6260755×1034 J s
– Reduced Planck’s constant = h / 2
• h : circle :: : radian
• Newton’s gravitational constant G =
6.67259×1011 N m2 / kg
• Others: permittivity of free space, Boltzmann’s
constant, Stefan-Boltzmann constant to be
introduced later as we go along.
Physics you should already know
• Basic Newtonian mechanics
– Newton’s laws, motion, energy, etc.
• Basic electrostatics
– Ohm’s law, Kirchoff’s laws, etc.
• Also helpful, but not prerequisite (we’ll
introduce them as we go along):
– Basic statistical mechanics & thermodynamics
– Basic quantum mechanics
– Basic relativity theory
Generalized Classical Mechanics
Generalized Mechanics
• Classical mechanics can be expressed most
generally and concisely in the Lagrangian and
Hamiltonian formulations.
• Based on simple functions of the system state:
– Lagrangian: Kinetic minus potential energy.
– Hamiltonian: Kinetic plus potential energy.
• The dynamical laws can be derived from either
energy function.
• This framework generalizes to quantum
mechanics, quantum field theories, etc.
L L
.
qi vi
Euler-Lagrange Equation
L L
qi vi
Note the over-dot!
or just
Fi p i
Where:
• L(qi, vi) is the system’s Lagrangian function.
• qi :≡ Generalized position coordinate indexed i.
• vi :≡ Velocity of generalized coordinate i, vi : qi
• f : df / dt or f / t (as appropriate)
• t :≡ Time coordinate
– In a given frame of reference.
Euler-Lagrange example
• Let q = qi be the ordinary x, y, z coordinates of a
point particle with mass m.
• Let L = ½mvi2 − V(q). (Kinetic minus potential.)
• Then, ∂L/∂qi = − ∂V/∂qi = Fi
– The force component in direction i.
• Meanwhile, ∂L/∂vi = ∂(½mvi2)/∂vi = mvi = pi
– The momentum component in direction i.
• And, ( / ti )(L / vi ) p i (mvi ) mvi mai
– Mass times acceleration in direction i.
• So we get Fi = mai (Newton’s 2nd law)
Least-Action Principle
A.k.a.
Hamilton’s
principle
• The action of an energy means the integral of
that energy over time.
• The trajectory specified by the Euler-Lagrange
equation is one that locally extremizes the
t1
action of the Lagrangian:
– Among trajectories s(t)
between specified points
s(t0) and s(t1).
A L( s )dt
t0
• Infinitesimal deviations from this trajectory
leave the action unchanged to 1st order.
Hamilton’s Equations
• The Hamiltonian is defined as H :≡ vipi − L.
Implicit
summation
over i.
– Equals Ek + Ep if L = Ek − Ep and vipi = 2Ek = mvi2.
• We can then describe the dynamics of (qi, pi) states
using the 1st-order Hamilton’s equations:
q H / p
p H / q
• These are equivalent to but often easier to solve than
the 2nd-order Euler-Lagrange equation.
• Note that any Hamiltonian dynamics is bideterministic
– Meaning, deterministic in both the forwards and reverse
time directions.
Field Theories
• Space of indexes i is continuous, thus
uncountable. A topological space T, e.g., R3.
• Often use φ(x) notation in place of qi.
• In local field theories, the Lagrangian L(φ) is
the integral of a Lagrange density function ℒ(x)
over the entire space T.
• This ℒ(x) depends only locally on φ, e.g.,
ℒ(x) = ℒ(φ(x), (∂φ/∂xi)(x), (x))
• All successful physical theories can be
explicitly written down as local field theories!
– There is no instantaneous action at a distance.
Special Relativity and the
Speed-of-Light Limit
The Speed-of-Light Limit
• No form of information (including quantum
information) can propagate through space at a velocity
(relative to its local surroundings) that is greater than
the speed of light, c, ~3×108 m/s.
• Some consequences:
– No closed system can propagate faster than c.
• Although you can define open systems that do by definition
– No given piece of matter, energy, or momentum can
propagate faster than c.
– All of the fundamental forces (including gravity) propagate
at (at most) c.
– The probability mass that is associated with a quantum
particle flows in an entirely local fashion, no faster than c.
Early History of the Limit
• The principle of locality was anticipated by Newton
– He wished to get rid of the “action at a distance” aspects of his law of
gravitation.
• The finiteness of the speed of light was first observed by
Roemer in 1676.
– The first decent speed estimate was obtained by Fizeau in 1849.
• Weber & Kohlrausch derived a velocity of c from empirical
electromagnetic constants in 1856.
– Kirchoff pointed out the match with the speed of light in 1857.
• Maxwell showed that his EM theory implied the existence of
waves that always propagate at c in 1873.
– Hertz later confirmed experimentally that EM waves indeed existed
• Michaelson & Morley (1887) observed that the SoL was
independent of the observer’s state of motion!
– Maxwell’s equations apparently valid in all inertial reference frames!
– Fitzgerald (1889), Lorentz (1892,1899), Larmor (1898), Poincaré
(1898,1904), & Einstein (1905) explored the implications of this...
Relativity: Non-intuitive but True
• How can the speed of something be a
fundamental constant? Seemed broken...
– If I’m moving at velocity v towards you, and I shoot
a laser at you, what speed does the light go, relative
to me, and to you? Answer: both c! (Not v+c.)
• Newton’s laws were the same in all frames of
reference moving at a constant velocity.
– Principle of Relativity (PoR): All laws of physics
are invariant under changes in velocity
• Einstein’s insight: The PoR is consistent w.
Maxwell’s theory! Change def. of space+time.
Some Consequences of Relativity
• Measured lengths and time intervals in a system
vary depending on the system’s velocity
relative to observers.
– Lengths are shortened in direction of motion.
– Clocks run slower.
• Sounds paradoxical, but isn’t!
– Mass is amplified.
• Energy and mass are the same quantity
measured in different units: E=mc2.
• Nothing (incl. energy, matter, information, etc.)
can go faster than light! (SoL limit.)
Three Ways to Understand c limit
• Energy of motion contributes to mass of object.
– Mass approaches as velocityc.
– Infinite energy needed to reach c.
• Lengths, times in a faster-than-light moving
object would become imaginary numbers!
– What would that mean?
• Faster than light in one reference frame
Backwards in time in another reference frame
– Sending info. backwards in time violates causality,
leads to logical contradictions!
The c limit in quantum physics
• Sometimes you see statements about “nonlocal”
effects in quantum systems. Watch out!
– Even Einstein made this mistake.
• Described a quantum thought experiment that seemed to
require “spooky action at a distance.”
• Later it was shown that this experiment did not actually
violate the speed-of-light limit for information.
• These “nonlocal” effects are only illusions,
emergent phenomena predicted by an entirely
local underlying theory respecting SoL limit..
– Widely-separated systems can maintain quantum
correlations, but that isn’t true non-locality.
The
“Lorentz”
Transformation
Actually it was written down earlier; e.g., one form by Voigt in 1887
• Lorentz, Poincaré: All the laws of physics
remain unchanged relative to the reference
frame (x′,t′) of an object moving with constant
velocity v = Δx/Δt in another reference frame
(x,t) under the following conditions:
Where:
x ( x vt) /
t (t x / c) /
: v / c
: 1
2
Note: our γ here is the reciprocal of the quantity denoted γ by other authors.
Consequences of Lorentz Transform
• Length contraction (Fitzgerald, 1889, Lorentz 1892):
– An object having length in its rest frame appears, when
measured in a relatively moving frame, to have the (shorter)
length γ. (For lengths parallel to direction of motion.)
• Time dilation (Poincaré, 1898):
– If time interval τ is measured between two co-located events
in a given frame, a larger time t = τ/γ will be measured
between those events in a relatively moving frame.
• Mass expansion (Einstein’s fix for Newton’s F=ma):
– If an object has mass m0 in its rest frame, then it is seen to
have the larger mass m = m0/γ in a relatively moving frame.
Lorentz Transform Visualization
x′=0
Original x,t
(“rest”) frame
Line colors:
Isochrones
(space-like)
t′=0
Isospatials
(time-like)
t
New x′,t′
(“moving”) frame
Light-like
In this example:
v = Δx/Δt = 3/5
γ = Δt′/Δt = 4/5
vT = v/γ = Δx/Δt′ = 3/4
x
The “tourist’s velocity.”
An Alternative View: Mixed Frames
t′
t′
t
Standard
Frame #1
x
Mixed
Frame #1
x
In this example:
v = Δx/Δt = 3/5
vT = Δx/Δt′ = 3/4
γ = Δt′ /Δt = 4/5
(Light
paths
shown in
green
here.)
x
Note that
(Δt)2 = (Δx)2 + (Δt′)2 t
by the Pythagorean
Theorem!
Mixed
Frame #2
x′
t′
Standard
Frame #2
Note the obvious complete symmetry
in the relation between the two mixed frames.
x′
Relativistic Kinetic Energy
• Total relativistic energy E of any object is E = mc2.
• For an object at rest with mass m0, Erest = m0c2.
• For a moving object, m = m0/γ
– Where m0 is the object’s mass in its rest frame.
• Energy of the moving object is thus Emoving = m0c2/γ.
• Kinetic energy Ekin :≡ Emoving − Erest
= m0c2/γ − m0c2 = m0c2(1 − γ)
• Substituting γ = (1−β2)1/2 and Taylor-expanding gives:
2
4
6
3
5
1
Ekin Erest ( 2 8 16 )
Pre-relativistic
kinetic energy ½ m0v2
Higher-order
relativistic corrections
Spacetime Intervals
• Note that the lengths and times between two events are not
invariant under Lorentz transformations.
• However, the following quantity is an invariant:
The spacetime interval s, where:
s2 = (ct)2 − xi2
• The value of s is also the proper time τ:
– The elapsed time in rest frame of object traveling on a straight line
between the two events. (Same as what we were calling t′ earlier.)
• The sign of s2 has a particular significance:
s2 > 0 - Events are timelike separated (s is real)
May be causally connected.
s2 = 0 - Events are lightlike separated (s is 0)
Only 0-rest-mass signals may connect them.
s2 < 0 - Events are spacelike separated (s is imaginary)
Not causally connected at all.
Relativistic Momentum
• The relativistic momentum p = mv
– Same as classical momentum, except that m = m0/γ.
• Relativistic energy-momentum-rest-mass relation:
E2 = (pc)2 + (m0c2)2
If we use units where c = 1, this simplifies to just:
E2 = p2 + m02
• Note that if we solve for m02, we get:
m02 = E2 − p2
• This is another relativistic invariant!
– Later we will show how it relates to the spacetime interval
s2 = t2 − x2, and to a computational interpretation of physics.