1 csce 1030 computer science 1 computer organization and networking

75
1 CSCE 1030 Computer Science 1 Computer Organization and Networking

Upload: harry-lloyd

Post on 16-Jan-2016

247 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

1

CSCE 1030

Computer Science 1

Computer Organization and Networking

Page 2: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

2

Components of a Computer System

Hardware Software

Page 3: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

3

Hardware Components – Von Neumann Architecture

CPU

Unit

© Addison Wesley 2004

Secondary Storage

Page 4: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

4

Central Processing Unit (CPU)

A microprocessor which is an integrated circuit (IC) that performs all calculations, operations in computer

2 components Arithmetic Logic Unit Control Unit

Page 5: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

5

CPU – cont’d

ALU Arithmetic operations (+, -, *, /) Bitwise logic operations (AND, NOT, OR,

XOR) Shift operations

CU Controls the flow of data through CPU Coordinates the activities of other units

Page 6: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

6

Control Unit (CU)

Performs the Fetch/Execute cycle:

Instruction Fetch (IF)

Instruction Decode (ID)

Data Fecth (DF)

Instruction Execution (EX)

Result Return (RR)

Page 7: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

7

Fetch/Execute Cycle

Computer before executing an ADD instruction

© Addison Wesley 2004

Page 8: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

8

Fetch/Execute Cycle – cont’d

Instruction Fetch

© Addison Wesley 2004

Page 9: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

9

Fetch/Execute Cycle – cont’d

Instruction Decode

© Addison Wesley 2004

Page 10: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

10

Fetch/Execute Cycle – cont’d

Data Fetch

© Addison Wesley 2004

Page 11: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

11

Fetch/Execute Cycle – cont’d

Execute

© Addison Wesley 2004

Page 12: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

12

Fetch/Execute Cycle – cont’d

Result Return

© Addison Wesley 2004

Page 13: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

13

Machine Language Instructions

Can be decoded and executed by control unit

Parts of instructions

Operation code (op code)

Unique unsigned-integer code assigned to each machine language operation

Address fields

Memory addresses of the values on which operation will work

Invitation to Computer Science, Java Version, Second Edition

Page 14: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

14

Figure 5.14

Typical Machine Language Instruction Format

Invitation to Computer Science, Java Version, Second Edition

Page 15: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

15

Machine Language Instructions (continued)

Operations of machine language

Data transfer operations

Move values to and from memory and registers

Arithmetic/logic operations

Perform ALU operations that produce numeric values

Invitation to Computer Science, Java Version, Second Edition

Page 16: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

16

Machine Language Instructions (continued)

Operations of machine language (continued)

Compare operations

Compare two values and set an indicator on the basis of the results of the compare; set register bits

Branch operations

Jump to a new memory address to continue processing

Invitation to Computer Science, Java Version, Second Edition

Page 17: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

17

Control Unit Registers and Circuits

Parts of control unit

Links to other subsystems

Instruction decoder circuit

Two special registers Program counter (PC)

Stores the memory address of the next instruction to be executed

Instruction register (IR) Stores the code for the current instruction

Invitation to Computer Science, Java Version, Second Edition

Page 18: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

18

Figure 5.16

Organization of the Control Unit Registers and Circuits

Invitation to Computer Science, Java Version, Second Edition

Page 19: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

19

Storage

Primary Storage (Memory) ROM RAM

Secondary (Auxiliary) Storage Hard disk (HDD) Tape CD and DVDs Flash disk, etc..

Page 20: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

20

Memory – cont’d

Read Only Memory (ROM) Non-volatile: content is always there Only manufacturer can write on ROM, once

written the content cannot be changed Stores the initial program that runs when the

computer is powered (bootstrapping) Many complex functions, such as translators

for high-level languages, and OSes are stored in ROM

Page 21: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

21

Memory

Random Access Memory (RAM) Volatile – content is lost when computer is off Provides faster access than secondary storage Can be read and written Is like the working memory Memory made of addressable cells (8 bits) All memory cells accessed in equal time Memory address

Unsigned binary number N long Address space is then 2N cells

Page 22: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

22

Figure 5.3

Structure of Random Access Memory

Invitation to Computer Science, Java Version, Second Edition

Page 23: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

23

RAM

Parts of the memory subsystem

Fetch/store controller

Fetch: Retrieve a value from memory

Store: Store a value into memory

Memory address register (MAR)

Memory data register (MDR)

Memory cells with decoder(s) to select individual cells

Page 24: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

24

Memory and Cache (continued)

Fetch operation

The address of the desired memory cell is moved into the MAR

Fetch/store controller signals a fetch, accessing the memory cell

The value at the MAR’s location flows into the MDR

Page 25: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

25

Memory and Cache (continued)

Store operation

The address of the cell where the value should go is placed in the MAR

The new value is placed in the MDR

Fetch/store controller signals a store, copying the MDR’s value into the desired cell

Invitation to Computer Science, Java Version, Second Edition

Page 26: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

26

Memory and Cache (continued)

Memory register

Very fast memory location

Given a name, not an address

Serves some special purpose

Modern computers have dozens or hundreds of registers

Invitation to Computer Science, Java Version, Second Edition

Page 27: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

27

Figure 5.7Overall RAM Organization

Invitation to Computer Science, Java Version, Second Edition

Page 28: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

28

Cache Memory

Memory access is much slower than processing time

Faster memory is too expensive to use for all memory cells

Locality principle

Once a value is used, it is likely to be used again

Small size, fast memory just for values currently in use speeds computing time

Invitation to Computer Science, Java Version, Second Edition

Page 29: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

29

Secondary Storage

Memory external to the main body of the computer Stores large amounts of data and programs for future

use For execution, the data and programs are read into

primary  storage.   Non-volatile: Content does remains when the power

is turned off. Cheap and larger in capacity as compared to RAM Also called mass storage

Page 30: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

30

Secondary Storage – cont’d

Mass storage devices Direct access storage device

Hard drive, CD-ROM, DVD Uses its own addressing scheme to access

data

Sequential access storage device Tape drive Stores data sequentially Used for backup storage these days

Invitation to Computer Science, Java Version, Second Edition

Page 31: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

31

Secondary Storage – cont’d

Direct access storage devices Data stored on a spinning disk Disk divided into concentric rings (sectors) Read/write head moves from one ring to

another while disk spins Access time depends on

Time to move head to correct sector Time for sector to spin to data location

Invitation to Computer Science, Java Version, Second Edition

Page 32: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

32

Figure 5.8

Overall Organization of a Typical Disk

Invitation to Computer Science, Java Version, Second Edition

Page 33: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

33

Peripheral Devices (Input – Output Units) Connected to computer main body physically Used to input and/or output data I/O controller

Intermediary between central processor and I/O devices

Processor sends request and data, then goes on with its work

I/O controller interrupts processor when request is complete

Invitation to Computer Science, Java Version, Second Edition

Page 34: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

34

Figure 5.9

Organization of an I/O Controller

Invitation to Computer Science, Java Version, Second Edition

Page 35: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

35

Software

Programs that are stored in computer 2 types

Systems Programs OSes, such as Windows, Mac, Linux, Unix, etc.

Application Programs Specific programs, such as payroll program,

accounting program, etc.

Page 36: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

36

Computer Networks

A computer network is a group of interconnected computers to share resources and exchange data through a communications link

Requires two or more individual systems something to share, e.g. printer, file A transmission medium A protocol, i.e. rules of communication

Page 37: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

37

Why do we need networks?

Distribute computation task among different computers – parallel processing

Access to remote resources Personal communications (e-mail, live chat,

audio/video conferencing) Internet!! etc.

Page 38: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

38

Communication Links

Switched, dial-up telephone line

A circuit is temporarily established between the caller and callee

Analog medium

Requires modem at both ends to transmit information produced by a computer

Computer produces digital information

Page 39: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

39

Figure 7.1 Two Forms of Information Representation

Invitation to Computer Science, Java Version, Second Edition

Page 40: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

40

Figure 7.2

Modulation of a Carrier to Encode Binary Information

Invitation to Computer Science, Java Version, Second Edition

Page 41: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

41

Communication Links (continued)

Dial-up phone links

Transmission rate: 56,000 bps (56 Kbps)

Broadband

Transmission rate: exceeding 128,000 bps (128 Kbps)

Invitation to Computer Science, Java Version, Second Edition

Page 42: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

42

Communication Links (continued)

Options for broadband communications

Home use

Digital subscriber line (DSL)

Cable modem

Commercial and office environment

Ethernet

Fast Ethernet

Gigabit Ethernet

Invitation to Computer Science, Java Version, Second Edition

Page 43: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

43

Figure 7.3

Transmission Time of an Image at Different Transmission Speeds

Invitation to Computer Science, Java Version, Second Edition

Page 44: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

44

Communication Links (continued)

Wireless data communication

Uses radio, microwave, and infrared signals

Enables “mobile computing”

Types of wireless data communication

Wireless local access network

Wireless wide-area access network

Invitation to Computer Science, Java Version, Second Edition

Page 45: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

45

Local Area Networks

Local area network (LAN)

Connects hardware devices that are in close proximity

The owner of the devices is also the owner of the means of communications

Common wired LAN topologies Bus

Ring

Star

Invitation to Computer Science, Java Version, Second Edition

Page 46: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

46

Figure 7.4

Some Common LAN Topologies

Invitation to Computer Science, Java Version, Second Edition

Page 47: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

47

Figure 7.5: An Ethernet LAN ImplementedUsing Shared Cables

Invitation to Computer Science, Java Version, Second Edition

Page 48: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

48

Figure 7.6

An Ethernet LAN Implemented Using a Hub

Invitation to Computer Science, Java Version, Second Edition

Page 49: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

49

Wide Area Networks

Wide area networks (WANs)

Connect devices that are across town, across the country, or across the ocean

Users must purchase telecommunications services from an external provider

Dedicated point-to-point lines

Most use a store-and-forward, packet-switched technology to deliver messages

Invitation to Computer Science, Java Version, Second Edition

Page 50: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

50

Figure 7.7

Typical Structure of a Wide Area Network

Invitation to Computer Science, Java Version, Second Edition

Page 51: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

51

Overall Structure of the Internet

All real-world networks, including the Internet, are a mix of LANs and WANs

Example: a company or a college

One or more LANs connecting its local computers

Individual LANs interconnected into a wide-area “company network”

Invitation to Computer Science, Java Version, Second Edition

Page 52: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

52

Figure 7.8(a)

Structure of a Typical Company Network

Invitation to Computer Science, Java Version, Second Edition

Page 53: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

53

Overall Structure of the Internet (continued)

Internet Service Provider (ISP)

A wide-area network

Provides a pathway from a specific network to other networks, or from an individual to other networks

ISPs are hierarchical

Interconnect to each other in multiple layers to provide greater geographical coverage

Invitation to Computer Science, Java Version, Second Edition

Page 54: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

54

Figure 7.8(b)

Structure of a Network Using an ISP

Invitation to Computer Science, Java Version, Second Edition

Page 55: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

55

Figure 7.8(c)Hierarchy of Internet Service Providers

Invitation to Computer Science, Java Version, Second Edition

Page 56: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

56

Overall Structure of the Internet (continued)

Internet

A huge interconnected “network of networks”

Includes nodes, LANs, WANs, bridges, routers, and multiple levels of ISPs

Early 2003 170 million nodes (hosts)

Hundreds of thousands of separate networks located in over 225 countries

Invitation to Computer Science, Java Version, Second Edition

Page 57: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

57

Communication Protocols

A protocol

A mutually agreed upon set of rules, conventions, and agreements for the efficient and orderly exchange of information

TCP/IP

The Internet protocol hierarchy

Governs the operation of the Internet

Five layers

Invitation to Computer Science, Java Version, Second Edition

Page 58: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

58

Figure 7.10

The Five-Layer TCP/IP Internet Protocol Hierarchy

Invitation to Computer Science, Java Version, Second Edition

Page 59: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

59

Physical Layer

Protocols govern the exchange of binary digits across a physical communication channel

Goal: create a “bit pipe” between two computers

Invitation to Computer Science, Java Version, Second Edition

Page 60: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

60

Data Link Layer

Protocols carry out

Error handling

Framing

Creates an error-free “message pipe”

Composed of two services

Layer 2a: medium access control

Layer 2b: logical link control

Invitation to Computer Science, Java Version, Second Edition

Page 61: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

61

Data Link Layer (continued)

Medium access control protocols

Determine how to arbitrate ownership of a shared line when multiple nodes want to send at the same time

Logical link control protocols

Ensure that a message traveling across a channel from source to destination arrives correctly

Invitation to Computer Science, Java Version, Second Edition

Page 62: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

62

Network Layer

Delivers a message from the site where it was created to its ultimate destination

Critical responsibilities

Creating a universal addressing scheme for all network nodes

Delivering messages between any two nodes in the network

Invitation to Computer Science, Java Version, Second Edition

Page 63: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

63

Network Layer (continued)

Provides a true “network delivery service”

Messages are delivered between any two nodes in the network, regardless of where they are located

IP (Internet Protocol) layer

Network layer in the Internet

Invitation to Computer Science, Java Version, Second Edition

Page 64: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

64

Transport Layer

Provides a high-quality, error-free, order preserving end-to-end delivery service

TCP (Transport Control Protocol)

Primary transport protocol on the Internet

Requires the source and destination programs to initially establish a connection

Invitation to Computer Science, Java Version, Second Edition

Page 65: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

65

Figure 7.15

Logical View of a TCP Connection

Invitation to Computer Science, Java Version, Second Edition

Page 66: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

66

Application Layer

Implements the end-user services provided by a network

There are many application protocols, including:

HTTP

SMTP

POP3

IMAP

FTP

Invitation to Computer Science, Java Version, Second Edition

Page 67: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

67

Figure 7.16

Some Popular Application Protocols on the Internet

Invitation to Computer Science, Java Version, Second Edition

Page 68: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

68

Application Layer (continued)

Uniform Resource Locator (URL)

A symbolic string that identifies a Web page

Form

protocol://host address/page

The most common Web page format is hypertext information

Accessed using the HTTP protocol

Invitation to Computer Science, Java Version, Second Edition

Page 69: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

69

Network Services and Benefits

Services offered by computer networks

Electronic mail (email)

Bulletin boards

News groups

Chat rooms

Resource sharing Physical resources

Logical resources

Invitation to Computer Science, Java Version, Second Edition

Page 70: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

70

Network Services and Benefits (continued)

Services offered by computer networks

Client-server computing

Information sharing

Information utility

Electronic commerce (e-commerce)

Invitation to Computer Science, Java Version, Second Edition

Page 71: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

71

A Brief History of the Internet and the World Wide Web: The Internet

August 1962: first proposal for building a computer network

Made by J. C. R. Licklider of MIT

ARPANET

Built by the Advanced Research Projects Agency (ARPA) in the 1960s

Grew quickly during the early 1970s

Invitation to Computer Science, Java Version, Second Edition

Page 72: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

72

The Internet (continued)

NSFNet: A national network built by the National Science Foundation (NSF)

October 24, 1995: Formal acceptance of the term “Internet”

Internet service providers start offering Internet access once provided by the ARPANET and NSFNet

Invitation to Computer Science, Java Version, Second Edition

Page 73: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

73

Figure 7.20State of Networking in the Late 1980s

Invitation to Computer Science, Java Version, Second Edition

Page 74: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

74

The World Wide Web Development completed in May 1991

Designed and built by Tim Berners-Lee

Components

Hypertext A collection of documents interconnected by

pointers called links

URL (Uniform Resource Locator) The worldwide identification of a Web page

located on a specific host computer

Invitation to Computer Science, Java Version, Second Edition

Page 75: 1 CSCE 1030 Computer Science 1 Computer Organization and Networking

75

Figure 7.21

Hypertext Documents

Invitation to Computer Science, Java Version, Second Edition