Chapter 1 concepts
Download
Report
Transcript Chapter 1 concepts
Web Design
Chapter 1
Network
Defn: Two or more computers connect to
exchange resources
Processing power
Storage
Access to a printer
Software resources
Messages
Network
Time sharing in early 1960s
Users communicate with host computer
ARPANET connected research center
computers in 1969
Eventually developed into Internet
Local Area Network hardware and
operating systems developed late 1970s
ISPs now affordable, widely available for
even home computers
Computing Systems
Computers have two kinds of
components:
Hardware – physical devices such as
CPU
memory
storage devices
Software – programs such as
Operating system
applications
utilities
Hardware: CPU
Central Processing Unit (CPU):
the “brain” of the machine
Circuitry that performs arithmetic and logical ML
statements
CPU measurement
Speed (roughly) in megahertz
(millions of clock-ticks per second)
Examples
Intel Pentium, AMD K6, Motorola PowerPC, Sun
SPARC,
Storage
Random Access Memory (RAM)
“Main” memory, which is fast, but volatile...
Analogous to a person’s short-term memory.
Many tiny “on-off” switches
“on” is represented by 1, “off” by 0.
Each switch is called a binary digit, or bit.
8 bits is called a byte.
210 bytes =1024 bytes is called a kilobyte (1K)
220 bytes is called a megabyte (1M).
Storage
Secondary Memory (Disk):
Stable storage using magnetic or optical
media.
Analogous to a person’s long-term memory.
Slower to access than RAM.
Examples:
floppy disk (measured in kilobytes)
hard disk (measured in gigabytes (230 bytes))
CD-ROM (measured in megabytes), ...
Input and Output
Input devices
Instructions and data must be encoded in
binary form and transmitted to the CPU
Examples:
keyboard
mouse, trackball, joystick
scanner
audio, video capture boards
Input and Output
Output devices
Convert data from binary to another form
Examples
monitors, printers
sound, video
robotics control
Communication between CPU and
peripheral devices is through ports
Ports communicate via the system bus
Hardware: the Bus
The Bus:
Connects CPU to other hardware devices.
Analogous to a person’s spinal cord.
Speed measured in megahertz
Like the CPU
Typically much slower than the CPU...
The bottleneck in most of today’s PCs.
Hardware: Cache
Access speed of RAM
Faster than accessing secondary memory
Still quite slow, relative to the rate at which the CPU
runs.
Solution:
Add a fast cache memory to the CPU
Store recently used instructions and data
Assumption:
These instructions/data were needed recently
They will be needed again in the near future.
Hardware: Summary
Putting the pieces together:
cache
CPU
Main
Memory
Secondary
Memory
Bus
Program storage
Long-term in secondary memory
Loaded into main memory to run
From which the CPU retrieves and executes their
statements.
Software: OS
Operating system (OS)
Loaded from secondary memory into main
memory when the computer is turned on,
Remains in memory until the computer is
turned off.
Cache
Bus
CPU
RAM
OS
Disk
Software: OS
OS acts as the “manager” of the system,
Making sure that each hardware device
interacts smoothly with the others.
Provides an interface
Enables user to interact with the computer,
Awaits user input if no application is running.
Examples: MacOS, Windows-95,
Windows-NT, UNIX, Linux, Solaris, ...
Software: Applications
Applications are non-OS programs
Perform some useful task
Including word processors, spreadsheets,
databases, web browsers, C++ compilers
Example C++ compilers/environments:
CodeWarrior (MacOS, Win95, WinNT,
Solaris)
GNU C++ (UNIX, Linux)
Turbo/Borland C++ (Win95, WinNT)
Visual C++ (Win95, WinNT)
Putting It All Together
Programs and applications that are not running
are stored on disk.
Cache
Bus
CPU
RAM
OS
Disk
App
Putting It All Together
When you launch a program
OS controls the CPU
Loads the program from disk to RAM.
Bus
Disk
RAM
OS
App
Cache
CPU
App
Putting it all together
The OS then relinquishes the CPU to the
program,
Application program begins to run.
App
Bus
Disk
RAM
OS
App
Cache
CPU
App
The Fetch-Execute Cycle
OS repeatedly fetches the next instruction (from
memory / cache),
Executes it
Stores any results back to memory.
App
Disk
RAM
OS
App
Cache
CPU
App
Bus
That’s all a computer does: fetch-executestore, millions of times each second!