21
Lecture 1: What is a Computer? Lecture for CPSC 2105 Computer Organization by Edward Bosworth, Ph.D.

Lecture 1: What is a Computer? Lecture for CPSC 2105 Computer Organization by Edward Bosworth, Ph.D

Embed Size (px)

Citation preview

Page 1: Lecture 1: What is a Computer? Lecture for CPSC 2105 Computer Organization by Edward Bosworth, Ph.D

Lecture 1: What is a Computer?

Lecture for CPSC 2105Computer Organization

by Edward Bosworth, Ph.D.

Page 2: Lecture 1: What is a Computer? Lecture for CPSC 2105 Computer Organization by Edward Bosworth, Ph.D

An Older Computer

The figure at right is an older computer, called a PDP-11/20.

It was designed in the early 1970’s.

It shows the computer, with front-panelswitches, and a paper tape reader.

User interaction was via a teletype.

Basically, all one got was “bare iron” – the hardware and very little software.

Page 3: Lecture 1: What is a Computer? Lecture for CPSC 2105 Computer Organization by Edward Bosworth, Ph.D

An ASR-33 Teletype

Page 4: Lecture 1: What is a Computer? Lecture for CPSC 2105 Computer Organization by Edward Bosworth, Ph.D

A Modern Computer as a System

• A modern computer must be seen as a complete system: software & hardware.

• The hardware and software must be designed as a complete system.

• Software includes the operating system and compilers to convert higher level languages to the primitive assembly language.

Page 5: Lecture 1: What is a Computer? Lecture for CPSC 2105 Computer Organization by Edward Bosworth, Ph.D

User Experience of a Computer

There are a number of factors affecting the user experience of a modern computer.• 1. The choice of operating system.• 2. The GUI (graphical user interface).• 3. The physical size of the computer itself.What is not a factor includes the detailed design of the CPU and other hardware.

Page 6: Lecture 1: What is a Computer? Lecture for CPSC 2105 Computer Organization by Edward Bosworth, Ph.D

Sample ComputerMy Wife’s Netbook.

Page 7: Lecture 1: What is a Computer? Lecture for CPSC 2105 Computer Organization by Edward Bosworth, Ph.D

Some Properties of the Computer

• It is approximately 11 inches by 7.5 inches. When closed it is a bit less than one inch thick. This CPU model was introduced in the second quarter of 2010. It is made in China.

• The CPU is an Intel Core i3–330UM, which operates at 1.2 GHz. It is described by Intel as “an Ultra Low Voltage dual–core processorfor small and light laptops”.

Page 8: Lecture 1: What is a Computer? Lecture for CPSC 2105 Computer Organization by Edward Bosworth, Ph.D

More Properties of the Computer• It has a three–level cache. Each of the two cores has a

L1 (Level 1) cache (likely a 32–kilobyte split cache, with 16 KB for instructions and 16 KB for data), and a 512 KB L2 cache. The two cores share a common 3 MB L3 cache.

• The computer has 2 GB (2,048 MB) of DDR3 memory.• The computer has a 256 GB hard disk and two USB

ports that can be used for USB “flash” drives. • The display is a 1366 by 768 “LED LCD”.• The computer has a built–in GSM card for access to

the global Internet through the AT&T network.

Page 9: Lecture 1: What is a Computer? Lecture for CPSC 2105 Computer Organization by Edward Bosworth, Ph.D

The GUI

Page 10: Lecture 1: What is a Computer? Lecture for CPSC 2105 Computer Organization by Edward Bosworth, Ph.D

The Computer As An Appliance

Most users of a computer view it as an appliance – just a machine that does things.

Provides e-mailRuns Facebook and other social mediaRuns applications, such as MS-Word, etc.

The computer is seen as a complete system, without thought of its piece parts.This is one of our great achievements in CS

Page 11: Lecture 1: What is a Computer? Lecture for CPSC 2105 Computer Organization by Edward Bosworth, Ph.D

The Computer as anEngine for High-Level Languages

This is the view of many programmers. It also is quite valid.The computer allows a Java program to run, accept input and produce output.This is also a valid approach to understandingcomputers.

Page 12: Lecture 1: What is a Computer? Lecture for CPSC 2105 Computer Organization by Edward Bosworth, Ph.D

Computers from the “Bottom Up”

At the lowest level of concern to this course, the computer is characterized by its ISA, the Instruction Set Architecture.• The primitive instructions that operate

the CPU.• The general-purpose registers available for

use by the programmer.• The details of the I/O system.

Page 13: Lecture 1: What is a Computer? Lecture for CPSC 2105 Computer Organization by Edward Bosworth, Ph.D

Another View of the Computer

• The Operating System provides services thatuse and augment the low level ISA

Page 14: Lecture 1: What is a Computer? Lecture for CPSC 2105 Computer Organization by Edward Bosworth, Ph.D

IBM System/370 Assembler

• Here is some code, with System Calls in Red PUT PRINTER,PRHEAD GET FILEIN,RECORDIN LOOP MVC DATAPR,RECORDIN PUT PRINTER,PRINT GET FILEIN,RECORDIN B LOOP

Page 15: Lecture 1: What is a Computer? Lecture for CPSC 2105 Computer Organization by Edward Bosworth, Ph.D

Moore’s Law

• Gordon Moore, one of the founders of the Intel Corporation, made an observation about the density of transistors on a computer chip.

• He noted that the count would double about every 18 months or two years.

• This observation has held true for about four decades, so it is now called a law.

Page 16: Lecture 1: What is a Computer? Lecture for CPSC 2105 Computer Organization by Edward Bosworth, Ph.D

Graph of Transistor Count

Page 17: Lecture 1: What is a Computer? Lecture for CPSC 2105 Computer Organization by Edward Bosworth, Ph.D

Picture Showing Moore’s Law

Page 18: Lecture 1: What is a Computer? Lecture for CPSC 2105 Computer Organization by Edward Bosworth, Ph.D

The Power Wall

Page 19: Lecture 1: What is a Computer? Lecture for CPSC 2105 Computer Organization by Edward Bosworth, Ph.D

The Power Wall (Part 2)

Page 20: Lecture 1: What is a Computer? Lecture for CPSC 2105 Computer Organization by Edward Bosworth, Ph.D

The C/C++ Language

We shall write a few small programs and use a debugger to examine the internal structures.

The language will be the older C language, with a few C++ features. We shall use the C++ compiler, which is more convenient.

This will be “C++ without objects”.

Page 21: Lecture 1: What is a Computer? Lecture for CPSC 2105 Computer Organization by Edward Bosworth, Ph.D

Sample C/C++ Program