Скачать презентацию CSCE 1030 Computer Science 1 Computer Organization and Скачать презентацию CSCE 1030 Computer Science 1 Computer Organization and

efa99ad275835384f42b77ff378328fc.ppt

  • Количество слайдов: 75

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

Components of a Computer System n Hardware n Software 2 Components of a Computer System n Hardware n Software 2

Hardware Components – Von Neumann Architecture Secondary Storage CPU Unit © Addison Wesley 2004 Hardware Components – Von Neumann Architecture Secondary Storage CPU Unit © Addison Wesley 2004 3

Central Processing Unit (CPU) n A microprocessor which is an integrated circuit (IC) that Central Processing Unit (CPU) n A microprocessor which is an integrated circuit (IC) that performs all calculations, operations in computer n 2 components Arithmetic Logic Unit n Control Unit n 4

CPU – cont’d n ALU n Arithmetic operations (+, -, *, /) n Bitwise CPU – cont’d n ALU n Arithmetic operations (+, -, *, /) n Bitwise logic operations (AND, NOT, OR, XOR) n Shift operations n CU n Controls the flow of data through CPU n Coordinates the activities of other units 5

Control Unit (CU) n Performs the Fetch/Execute cycle: Instruction Fetch (IF) Instruction Decode (ID) Control Unit (CU) n Performs the Fetch/Execute cycle: Instruction Fetch (IF) Instruction Decode (ID) Data Fecth (DF) Instruction Execution (EX) Result Return (RR) 6

Fetch/Execute Cycle Computer before executing an ADD instruction © Addison Wesley 2004 7 Fetch/Execute Cycle Computer before executing an ADD instruction © Addison Wesley 2004 7

Fetch/Execute Cycle – cont’d Instruction Fetch © Addison Wesley 2004 8 Fetch/Execute Cycle – cont’d Instruction Fetch © Addison Wesley 2004 8

Fetch/Execute Cycle – cont’d Instruction Decode © Addison Wesley 2004 9 Fetch/Execute Cycle – cont’d Instruction Decode © Addison Wesley 2004 9

Fetch/Execute Cycle – cont’d Data Fetch © Addison Wesley 2004 10 Fetch/Execute Cycle – cont’d Data Fetch © Addison Wesley 2004 10

Fetch/Execute Cycle – cont’d Execute © Addison Wesley 2004 11 Fetch/Execute Cycle – cont’d Execute © Addison Wesley 2004 11

Fetch/Execute Cycle – cont’d Result Return © Addison Wesley 2004 12 Fetch/Execute Cycle – cont’d Result Return © Addison Wesley 2004 12

Machine Language Instructions n Can be decoded and executed by control unit n Parts Machine Language Instructions n Can be decoded and executed by control unit n Parts of instructions n Operation code (op code) n n Unique unsigned-integer code assigned to each machine language operation Address fields n Memory addresses of the values on which operation will work 13

Figure 5. 14 Typical Machine Language Instruction Format 14 Figure 5. 14 Typical Machine Language Instruction Format 14

Machine Language Instructions (continued) n Operations of machine language n Data transfer operations n Machine Language Instructions (continued) n Operations of machine language n Data transfer operations n n Move values to and from memory and registers Arithmetic/logic operations n Perform ALU operations that produce numeric values 15

Machine Language Instructions (continued) n Operations of machine language (continued) n Compare operations n Machine Language Instructions (continued) n Operations of machine language (continued) n Compare operations n n Compare two values and set an indicator on the basis of the results of the compare; set register bits Branch operations n Jump to a new memory address to continue processing 16

Control Unit Registers and Circuits n Parts of control unit n Links to other Control Unit Registers and Circuits n Parts of control unit n Links to other subsystems n Instruction decoder circuit n Two special registers n Program counter (PC) § Stores the memory address of the next instruction to be executed n Instruction register (IR) § Stores the code for the current instruction 17

Figure 5. 16 Organization of the Control Unit Registers and Circuits 18 Figure 5. 16 Organization of the Control Unit Registers and Circuits 18

Storage n Primary Storage (Memory) n ROM n RAM n Secondary (Auxiliary) Storage n Storage n Primary Storage (Memory) n ROM n RAM n Secondary (Auxiliary) Storage n Hard disk (HDD) n Tape n CD and DVDs n Flash disk, etc. . 19

Memory – cont’d n Read Only Memory (ROM) n Non-volatile: content is always there Memory – cont’d n Read Only Memory (ROM) n Non-volatile: content is always there n Only manufacturer can write on ROM, once written the content cannot be changed n Stores the initial program that runs when the computer is powered (bootstrapping) n Many complex functions, such as translators for high-level languages, and OSes are stored in ROM 20

Memory n Random Access Memory (RAM) n Volatile – content is lost when computer Memory n Random Access Memory (RAM) n Volatile – content is lost when computer is off n Provides faster access than secondary storage n Can be read and written n Is like the working memory n Memory made of addressable cells (8 bits) n All memory cells accessed in equal time n Memory address n n Unsigned binary number N long Address space is then 2 N cells 21

Figure 5. 3 Structure of Random Access Memory 22 Figure 5. 3 Structure of Random Access Memory 22

RAM n Parts of the memory subsystem n Fetch/store controller n Fetch: Retrieve a RAM n Parts of the memory subsystem n Fetch/store controller n Fetch: Retrieve a value from memory n Store: Store a value into memory n Memory address register (MAR) n Memory data register (MDR) n Memory cells with decoder(s) to select individual cells 23

Memory and Cache (continued) n Fetch operation n The address of the desired memory Memory and Cache (continued) n Fetch operation n The address of the desired memory cell is moved into the MAR n Fetch/store controller signals a fetch, accessing the memory cell n The value at the MAR’s location flows into the MDR 24

Memory and Cache (continued) n Store operation n The address of the cell where Memory and Cache (continued) n Store operation n The address of the cell where the value should go is placed in the MAR n The new value is placed in the MDR n Fetch/store controller signals a store, copying the MDR’s value into the desired cell 25

Memory and Cache (continued) n Memory register n Very fast memory location n Given Memory and Cache (continued) n Memory register n Very fast memory location n Given a name, not an address n Serves some special purpose n Modern computers have dozens or hundreds of registers 26

Figure 5. 7 Overall RAM Organization 27 Figure 5. 7 Overall RAM Organization 27

Cache Memory n Memory access is much slower than processing time n Faster memory Cache Memory n Memory access is much slower than processing time n Faster memory is too expensive to use for all memory cells n Locality principle n Once a value is used, it is likely to be used again n Small size, fast memory just for values currently in use speeds computing time 28

Secondary Storage n Memory external to the main body of the computer n Stores Secondary Storage n Memory external to the main body of the computer n Stores large amounts of data and programs for future n n 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 29

Secondary Storage – cont’d n Mass storage devices n Direct access storage device n Secondary Storage – cont’d n Mass storage devices n Direct access storage device n n n Hard drive, CD-ROM, DVD Uses its own addressing scheme to access data Sequential access storage device n Tape drive n Stores data sequentially n Used for backup storage these days 30

Secondary Storage – cont’d n Direct access storage devices n Data stored on a Secondary Storage – cont’d n Direct access storage devices n Data stored on a spinning disk n Disk divided into concentric rings (sectors) n Read/write head moves from one ring to another while disk spins n Access time depends on n Time to move head to correct sector n Time for sector to spin to data location 31

Figure 5. 8 Overall Organization of a Typical Disk 32 Figure 5. 8 Overall Organization of a Typical Disk 32

Peripheral Devices (Input – Output Units) n Connected to computer main body physically n Peripheral Devices (Input – Output Units) n Connected to computer main body physically n Used to input and/or output data n I/O controller n Intermediary between central processor and I/O devices n Processor sends request and data, then goes on with its work n I/O controller interrupts processor when request is complete 33

Figure 5. 9 Organization of an I/O Controller 34 Figure 5. 9 Organization of an I/O Controller 34

Software n Programs that are stored in computer n 2 types n Systems Programs Software n Programs that are stored in computer n 2 types n Systems Programs n n OSes, such as Windows, Mac, Linux, Unix, etc. Application Programs n Specific programs, such as payroll program, accounting program, etc. 35

Computer Networks n A computer network is a group of interconnected computers to share Computer Networks n A computer network is a group of interconnected computers to share resources and exchange data through a communications link n Requires two or more individual systems n something to share, e. g. printer, file n A transmission medium n A protocol, i. e. rules of communication n 36

Why do we need networks? n Distribute computation task among different computers – parallel Why do we need networks? n Distribute computation task among different computers – parallel processing n Access to remote resources n Personal communications (e-mail, live chat, audio/video conferencing) n Internet!! n etc. 37

Communication Links n Switched, dial-up telephone line n A circuit is temporarily established between Communication Links n Switched, dial-up telephone line n A circuit is temporarily established between the caller and callee n Analog medium n Requires modem at both ends to transmit information produced by a computer n Computer produces digital information 38

Figure 7. 1 Two Forms of Information Representation 39 Figure 7. 1 Two Forms of Information Representation 39

Figure 7. 2 Modulation of a Carrier to Encode Binary Information 40 Figure 7. 2 Modulation of a Carrier to Encode Binary Information 40

Communication Links (continued) n Dial-up phone links n Transmission rate: 56, 000 bps (56 Communication Links (continued) n Dial-up phone links n Transmission rate: 56, 000 bps (56 Kbps) n Broadband n Transmission rate: exceeding 128, 000 bps (128 Kbps) 41

Communication Links (continued) n Options for broadband communications n Home use n n n Communication Links (continued) n Options for broadband communications n Home use n n n Digital subscriber line (DSL) Cable modem Commercial and office environment n Ethernet n Fast Ethernet n Gigabit Ethernet 42

Figure 7. 3 Transmission Time of an Image at Different Transmission Speeds 43 Figure 7. 3 Transmission Time of an Image at Different Transmission Speeds 43

Communication Links (continued) n Wireless data communication n Uses radio, microwave, and infrared signals Communication Links (continued) n Wireless data communication n Uses radio, microwave, and infrared signals n Enables “mobile computing” n Types of wireless data communication n Wireless local access network n Wireless wide-area access network 44

Local Area Networks n Local area network (LAN) n Connects hardware devices that are Local Area Networks n Local area network (LAN) n Connects hardware devices that are in close proximity n The owner of the devices is also the owner of the means of communications n Common wired LAN topologies n Bus n Ring n Star 45

Figure 7. 4 Some Common LAN Topologies 46 Figure 7. 4 Some Common LAN Topologies 46

Figure 7. 5: An Ethernet LAN Implemented Using Shared Cables 47 Figure 7. 5: An Ethernet LAN Implemented Using Shared Cables 47

Figure 7. 6 An Ethernet LAN Implemented Using a Hub 48 Figure 7. 6 An Ethernet LAN Implemented Using a Hub 48

Wide Area Networks n Wide area networks (WANs) n Connect devices that are across Wide Area Networks n Wide area networks (WANs) n Connect devices that are across town, across the country, or across the ocean n Users must purchase telecommunications services from an external provider n Dedicated point-to-point lines n Most use a store-and-forward, packet-switched technology to deliver messages 49

Figure 7. 7 Typical Structure of a Wide Area Network 50 Figure 7. 7 Typical Structure of a Wide Area Network 50

Overall Structure of the Internet n All real-world networks, including the Internet, are a Overall Structure of the Internet n All real-world networks, including the Internet, are a mix of LANs and WANs n Example: a company or a college n n One or more LANs connecting its local computers Individual LANs interconnected into a widearea “company network” 51

Figure 7. 8(a) Structure of a Typical Company Network 52 Figure 7. 8(a) Structure of a Typical Company Network 52

Overall Structure of the Internet (continued) n Internet Service Provider (ISP) n A wide-area Overall Structure of the Internet (continued) n Internet Service Provider (ISP) n A wide-area network n Provides a pathway from a specific network to other networks, or from an individual to other networks n ISPs are hierarchical n Interconnect to each other in multiple layers to provide greater geographical coverage 53

Figure 7. 8(b) Structure of a Network Using an ISP 54 Figure 7. 8(b) Structure of a Network Using an ISP 54

Figure 7. 8(c) Hierarchy of Internet Service Providers 55 Figure 7. 8(c) Hierarchy of Internet Service Providers 55

Overall Structure of the Internet (continued) n Internet n A huge interconnected “network of Overall Structure of the Internet (continued) n Internet n A huge interconnected “network of networks” n Includes nodes, LANs, WANs, bridges, routers, and multiple levels of ISPs n Early 2003 n n 170 million nodes (hosts) Hundreds of thousands of separate networks located in over 225 countries 56

Communication Protocols n A protocol n A mutually agreed upon set of rules, conventions, Communication Protocols n A protocol n A mutually agreed upon set of rules, conventions, and agreements for the efficient and orderly exchange of information n TCP/IP n The Internet protocol hierarchy n Governs the operation of the Internet n Five layers 57

Figure 7. 10 The Five-Layer TCP/IP Internet Protocol Hierarchy 58 Figure 7. 10 The Five-Layer TCP/IP Internet Protocol Hierarchy 58

Physical Layer n Protocols govern the exchange of binary digits across a physical communication Physical Layer n Protocols govern the exchange of binary digits across a physical communication channel n Goal: create a “bit pipe” between two computers 59

Data Link Layer n Protocols carry out n Error handling n Framing n Creates Data Link Layer n Protocols carry out n Error handling n Framing n Creates an error-free “message pipe” n Composed of two services n Layer 2 a: medium access control n Layer 2 b: logical link control 60

Data Link Layer (continued) n Medium access control protocols n Determine how to arbitrate Data Link Layer (continued) n Medium access control protocols n Determine how to arbitrate ownership of a shared line when multiple nodes want to send at the same time n Logical link control protocols n Ensure that a message traveling across a channel from source to destination arrives correctly 61

Network Layer n Delivers a message from the site where it was created to Network Layer n Delivers a message from the site where it was created to its ultimate destination n Critical responsibilities n Creating a universal addressing scheme for all network nodes n Delivering messages between any two nodes in the network 62

Network Layer (continued) n Provides a true “network delivery service” n Messages are delivered Network Layer (continued) n Provides a true “network delivery service” n Messages are delivered between any two nodes in the network, regardless of where they are located n IP (Internet Protocol) layer n Network layer in the Internet 63

Transport Layer n Provides a high-quality, error-free, order preserving end-to-end delivery service n TCP Transport Layer n Provides a high-quality, error-free, order preserving end-to-end delivery service n TCP (Transport Control Protocol) n Primary transport protocol on the Internet n Requires the source and destination programs to initially establish a connection 64

Figure 7. 15 Logical View of a TCP Connection 65 Figure 7. 15 Logical View of a TCP Connection 65

Application Layer n Implements the end-user services provided by a network n There are Application Layer n Implements the end-user services provided by a network n There are many application protocols, including: n HTTP n SMTP n POP 3 n IMAP n FTP 66

Figure 7. 16 Some Popular Application Protocols on the Internet 67 Figure 7. 16 Some Popular Application Protocols on the Internet 67

Application Layer (continued) n Uniform Resource Locator (URL) n A symbolic string that identifies Application Layer (continued) n Uniform Resource Locator (URL) n A symbolic string that identifies a Web page n Form protocol: //host address/page n The most common Web page format is hypertext information n Accessed using the HTTP protocol 68

Network Services and Benefits n Services offered by computer networks n Electronic mail (email) Network Services and Benefits n Services offered by computer networks n Electronic mail (email) n Bulletin boards n News groups n Chat rooms n Resource sharing n Physical resources n Logical resources 69

Network Services and Benefits (continued) n Services offered by computer networks n Client-server computing Network Services and Benefits (continued) n Services offered by computer networks n Client-server computing n Information sharing n Information utility n Electronic commerce (e-commerce) 70

A Brief History of the Internet and the World Wide Web: The Internet n A Brief History of the Internet and the World Wide Web: The Internet n August 1962: first proposal for building a computer network n Made by J. C. R. Licklider of MIT n ARPANET n Built by the Advanced Research Projects Agency (ARPA) in the 1960 s n Grew quickly during the early 1970 s 71

The Internet (continued) n NSFNet: A national network built by the National Science Foundation The Internet (continued) n NSFNet: A national network built by the National Science Foundation (NSF) n October 24, 1995: Formal acceptance of the term “Internet” n Internet service providers start offering Internet access once provided by the ARPANET and NSFNet 72

Figure 7. 20 State of Networking in the Late 1980 s 73 Figure 7. 20 State of Networking in the Late 1980 s 73

The World Wide Web n Development completed in May 1991 n Designed and built The World Wide Web n Development completed in May 1991 n Designed and built by Tim Berners-Lee n Components n Hypertext n n A collection of documents interconnected by pointers called links URL (Uniform Resource Locator) n The worldwide identification of a Web page located on a specific host computer 74

Figure 7. 21 Hypertext Documents 75 Figure 7. 21 Hypertext Documents 75