Introduction to Computer Science Lesson 5

Similar documents
Data Manipulation. Chih-Wei Tang ( 唐之瑋 ) Department of Communication Engineering National Central University JhongLi, Taiwan

Chapter 2: Data Manipulation

Chapter 2: Data Manipulation

Homeschool Enrichment. The System Unit: Processing & Memory

Introduction to the Personal Computer

Components of a personal computer

1. INTRODUCTION 2. OVERVIEW

Chapter 2: Data Manipulation. Copyright 2015 Pearson Education, Inc.

Chapter 4 The Components of the System Unit

Computer Overview. A computer item you can physically see or touch. A computer program that tells computer hardware how to operate.

Intentionally Blank 0

Objectives. Learn how computers are connected. Become familiar with different types of transmission media

Computers Are Your Future

Terminology, Types of Computers & Computer Hardware

Computers Are Your Future

Discovering Computers 2012

PC I/O. May 7, Howard Huang 1

Computer chip: A very small pieces of silicon or other semi-conducting material onto which integrated circuits are embedded Circuit board: A thin

A+ Guide to Managing & Maintaining Your PC, 8th Edition. Chapter 16 Networking Types, Devices, and Cabling

Prepared by Agha Mohammad Haidari Network Manager ICT Directorate Ministry of Communication & IT

Electricity: Voltage. Gate: A signal enters the gate at a certain voltage. The gate performs operations on it, and sends it out was a new signal.

About the Presentations

Computer Systems. Communication (networks, radio links) Meatware (people, users don t forget them)

Technology in Action 12/11/2014. Networking Fundamentals. Chapter Topics. Networking Fundamentals (cont.) Networking Fundamentals (cont.

VISUAL SUMMARY. The System Unit

Introduction to Computer Science Lecture 2: Data Manipulation

Chapter I The System Unit

Module 11 Narrowband and Broadband ISDN

Computer Architecture and Data Manipulation. Von Neumann Architecture

ITP 140 Mobile Applications Technologies. Networks

CMSC 1513 Lecture 1.2

Chapter 8 Networking and Digital Communication

Computer Hardware. In this lesson we will learn about Computer Hardware, so that we have a better understanding of what a computer is.

Twelfth Edition. Chapter 8: Wired and Wireless Communication. Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall 1

Introduction to Computer Science. William Hsu Department of Computer Science and Engineering National Taiwan Ocean University

A+ Guide to Hardware: Managing, Maintaining, and Troubleshooting, 5e. Chapter 1 Introducing Hardware

Introduction to Computer Science. William Hsu Department of Computer Science and Engineering National Taiwan Ocean University

Chapter 9 Introduction to Networks

Motherboard BIOS. Fig: 1 What you see (or something similar) if you turn the PC manufacturer's logo off

Chapter 2: Data Manipulation

Not long ago, home local area networks were proof of their owner s geekhood. They were very

Chapter 4 The Components of the System Unit

White Paper Broadband Multimedia Servers for IPTV Design options with ATCA

Chapter 12. Network Organization and Architecture

Chapter 13: Advanced Laptops and Portable Devices

Networks. Computer Technology

Part I: Hardware and communication

Internetwork. recursive definition point-to-point and multi-access: internetwork. composition of one or more internetworks

CSC 170 Introduction to Computers and Their Applications. Computers

ITP 140 Mobile Applications Technologies. Networks

FUNCTIONS OF COMPONENTS OF A PERSONAL COMPUTER

Chapter 2: Data Manipulation

Integrated t Services Digital it Network (ISDN) Digital Subscriber Line (DSL) Cable modems Hybrid Fiber Coax (HFC)

Unit 9 : Fundamentals of Parallel Processing

Chapter 2. Prepared By: Humeyra Saracoglu

Understanding Computers. Hardware Terminology

Inside the Computer System

Data Communication. Introduction of Communication. Data Communication. Elements of Data Communication (Communication Model)

Introduction to Networks and the Internet

Networking. Prof. Abdul Hameed

Desktop Desirable Features: (please read notes below)

MSc-IT 1st Semester Fall 2016, Course Instructor M. Imran khalil 1

Bus Example: Pentium II

PDF created with pdffactory Pro trial version How USB Ports Work by Marshall Brain. Introduction to How USB Ports Work

Bits and Bytes. Here is a sort of glossary of computer buzzwords you will encounter in computer use:

Q1. Describe C.P.U and its subunits with the help of diagram?

Unit 4 Part A Evaluating & Purchasing a Computer. Computer Applications

Lectures More I/O

7/28/ Prentice-Hall, Inc Prentice-Hall, Inc Prentice-Hall, Inc Prentice-Hall, Inc Prentice-Hall, Inc.

lesson 3 Transforming Data into Information

Internet Architecture

Lesson 4: The Network Interface Card

Figure 2.1 CPU and main memory connected via a bus. Computer Architecture 2014/10/12. Chapter 2: Data Manipulation

Intel Thunderbolt. James Coddington Ed Mackowiak

Pengantar Teknologi Informasi dan Teknologi Hijau. Suryo Widiantoro, ST, MMSI, M.Com(IS)

The Components of the System Unit

Full file at

Chapter 11: Input/Output Organisation. Lesson 17: Standard I/O buses USB (Universal Serial Bus) and IEEE1394 FireWire Buses

True/False Indicate whether the statement is true or false. Bubble A for True and B for False

True/False Indicate whether the statement is true or false. Bubble A for True and B for False

What's in a computer?

The Central Processing Unit

Module 6: INPUT - OUTPUT (I/O)

Chapter 1: introduction

Hardware. Multimedia computers. Embedded devices. Mobile Phones. Multimedia PC (MPC) Current equipment

Module 1. Introduction. Version 2 EE IIT, Kharagpur 1

2. LAN Topologies Gilbert Ndjatou Page 1

COMPUTER ORGANIZATION & SKILLS

(Refer Slide Time 00:01:09)

Chapter Two. Hardware Basics: Inside the Box

Introduction. Computer System Organization. Languages, Levels, Virtual Machines. A multilevel machine. Sarjana Magister Program

It is the process of sharing data, programs, and information between two or more computers.

end systems, access networks, links circuit switching, packet switching, network structure

card slots CPU socket Monitor Computer case houses CPU (Central Processing Unit), CPU central power supply, DVD drive, etc processing unit Keyboard

Chapter 6 Part 1 Understanding Hardware

Class X Subject : IT (Vocational) Chapter -1 Ouestion / Answer

Data Manipulation. *2.4 Arithmetic/Logic. Instructions. Logic Operations Rotation and Shift Operations Arithmetic Operations. *2.5 Communicating with

Introduction to Computer Science (I1100) Networks. Chapter 6

System Unit Components Chapter2

So computers can't think in the same way that people do. But what they do, they do excellently well and very, very fast.

Transcription:

Introduction to Computer Science Lesson 5 BSc in Computer Science University of New York, Tirana Assoc. Prof. Marenglen Biba Copyright 2012 Pearson Education, Inc. 1-1

Data Manipulation 2.1 Computer Architecture 2.2 Machine Language 2.3 Program Execution 2.4 Arithmetic/Logic Instructions 2.5 Communicating with Other Devices 2.6 Other Architectures Copyright 2012 Pearson Education, Inc. 2-2

Communicating with other devices Main memory and the CPU form the core of a computer. In this section, we investigate how this core, which we will refer to as the computer, communicates with peripheral devices such as mass storage systems, printers, keyboards, mice, monitors, digital cameras, and even other computers. Copyright 2012 Pearson Education, Inc. 2-3

System Board Each internal and external component is connected to the system board. The system board, also referred to as the main board, the motherboard, or the planar board, is made of fiberglass and is typically brown or green, with a meshwork of copper lines. These lines are the electronic circuits through which signals travel from one component to another and are collectively called the bus. Copyright 2012 Pearson Education, Inc. 2-4

Motherboard Copyright 2012 Pearson Education, Inc. 2-5

Another motherboard Copyright 2012 Pearson Education, Inc. 2-6

Controllers Communication between a computer and other devices is normally handled through an intermediary apparatus known as a controller. In the case of a personal computer, a controller may consist of circuitry permanently mounted on the computer's motherboard or, for flexibility, it may take the form of a circuit board that plugs into a slot on the motherboard. In either case, the controller connects via cables to peripheral devices within the computer case or perhaps to a connector, called a port, on the back of the computer where external devices can be attached. These controllers are sometimes small computers themselves, each with its own memory circuitry and simple CPU that performs a program directing the activities of the controller. Copyright 2012 Pearson Education, Inc. 2-7

Controllers A controller translates messages and data back and forth between forms compatible with the internal characteristics of the computer and those of the peripheral device to which it is attached. Originally, each controller was designed for a particular type of device; thus, purchasing a new peripheral device often required the purchase of a new controller as well. Recently, steps have been taken within the personal computer arena to develop standards, such as the universal serial bus (USB) and FireWire, by which a single controller is able to handle a variety of devices. For example, a single USB controller can be used as the interface between a computer and any collection of USB-compatible devices. Copyright 2012 Pearson Education, Inc. 2-8

USB and FireWire The universal serial bus (USB) and FireWire are standardized serial communication systems that simplify the process of adding new peripheral devices to a personal computer. USB was developed under the lead of Intel. The development of FireWire was led by Apple. In both cases the underlying theme is for a single controller to provide external ports at which a variety of peripheral devices can be attached. In this setting, the controller translates the internal signal characteristics of the computer to the appropriate USB or FireWire standard signals. In turn, each device connected to the controller converts its internal particularities to the same USB or FireWire standard, allowing communication with the controller. Copyright 2012 Pearson Education, Inc. 2-9

USB and FireWire The result is that attaching a new device to a PC does not require the insertion of a new controller. Instead, one merely plugs any USB compatible device into a USB port or a FireWire compatible device into a FireWire port. Of the two, FireWire provides a faster transfer rate, but the lower cost of USB technology has made it the leader in the lower-cost mass market arena. USB compatible devices on the market today include mice, keyboards, printers, scanners, digital cameras, and mass storage systems designed for backup applications. FireWire applications tend to focus on devices that require higher transfer rates such as video recorders and online mass storage systems. Copyright 2012 Pearson Education, Inc. 2-10

Communication means Port: The point at which a device connects to a computer Memory-mapped I/O: CPU communicates with peripheral devices as though they were memory cells Copyright 2012 Pearson Education, Inc. 2-11

Figure 2.13 Controllers attached to a machine s bus Copyright 2012 Pearson Education, Inc. 2-12

Figure 2.14 A conceptual representation of memory-mapped I/O Copyright 2012 Pearson Education, Inc. 2-13

DMA: Direct Memory Access Since a controller is attached to a computer's bus, it can carry on its own communication with main memory during those nanoseconds in which the CPU is not using the bus. This ability of a controller to access main memory is known as direct memory access (DMA), and it is a significant asset to a computer's performance. Copyright 2012 Pearson Education, Inc. 2-14

DMA example For instance, to retrieve data from a sector of a disk, the CPU can send requests encoded as bit patterns to the controller attached to the disk asking the controller to read the sector and place the data in a specified area of main memory. The CPU can then continue with other tasks while the controller performs the read operation and deposits the data in main memory via DMA. Thus two activities will be performed at the same time. The CPU will be executing a program and the controller will be overseeing the transfer of data between the disk and main memory. In this manner, the computing resources of the CPU are not wasted during the relatively slow data transfer. Copyright 2012 Pearson Education, Inc. 2-15

Handshaking The transfer of data between two computer components is rarely a one-way affair. Even though we may think of a printer as a device that receives data, the truth is that a printer also sends data back to the computer. After all, a computer can produce and send characters to a printer much faster than the printer can print them. If a computer blindly sent data to a printer, the printer would quickly fall behind, resulting in lost data. Thus a process such as printing a document involves a constant two-way dialogue, known as handshaking, in which the computer and the peripheral device exchange information about the device's status and coordinate their activities. Copyright 2012 Pearson Education, Inc. 2-16

Communicating with Other Devices (continued) Parallel Communication: Several communication paths transfer bits simultaneously. Serial Communication: Bits are transferred one after the other over a single communication path. Copyright 2012 Pearson Education, Inc. 2-17

Communication technologies: parallel Communication between computing devices is handled over two types of paths: parallel and serial. These terms refer to the manner in which signals are transferred with respect to each other. In the case of parallel communication, several signals are transferred at the same time, each on a separate "line." Such a technique is capable of transferring data rapidly but requires a relatively complex communication path. Examples include a computer's internal bus where multiple wires are used to allow large blocks of data and other signals to be transferred simultaneously. Moreover, most PCs are equipped with at least one "parallel port" through which data can be transferred to and from the machine eight bits at a time. Copyright 2012 Pearson Education, Inc. 2-18

Communication technologies: serial In contrast, serial communication is based on transferring signals one after the other over a single line. Thus serial communication requires a simpler data path than parallel communication, which is the reason for its popularity. USB and FireWire, which offer relatively high speed data transfer over short distances of only a few meters, are examples of serial communication systems. For slightly longer distances (within a home or office building), serial communication over Ethernet connections, either by wire or radio broadcast, are popular. Copyright 2012 Pearson Education, Inc. 2-19

Modems For communication over greater distances, traditional voice telephone lines dominated the personal computer arena for many years. These communication paths, consisting of a single wire over which tones are transferred one after the other, are inherently serial systems. The transfer of digital data over these lines is accomplished by first: converting bit patterns into audible tones by means of a modem transferring these tones serially over the telephone system, and then converting the tones back into bits by another modem at the destination. Copyright 2012 Pearson Education, Inc. 2-20

Modem A modulator/demodulator (modem) allows computers to communicate with one another over existing phone or cable lines. Internal modems attach directly to a computer s motherboard and connect to a regular phone jack using the same connector as a phone. External modems also connect to the phone jack but are attached to the computer via an external port. External modems are typically easier to configure and troubleshoot than internal modems and have the benefit of being easily transported to another computer. Copyright 2012 Pearson Education, Inc. 2-21

Modem Copyright 2012 Pearson Education, Inc. 2-22

ISDN An ISDN network connection between two computer systems Integrated Service Digital Network (ISDN) was an early international standard for sending voice and data over digital or normal telephone wire These days it is being largely replaced by newer technologies such as DSL and cable. ISDN uses existing telephone circuits or higher speed conditioned lines to get speeds of either 64K or 128K. Copyright 2012 Pearson Education, Inc. 2-23

DSL For faster long-distance communication over traditional telephone lines, telephone companies offer a service known as DSL (Digital Subscriber Line), which takes advantage of the fact that existing telephone lines are capable of handling a wider frequency range than that used by traditional voice communication. More precisely, DSL uses frequencies above the audible range to transfer digital data while leaving the lower frequency spectrum for voice communication. Although DSL has been highly successful, telephone companies are rapidly upgrading their systems to fiber-optic lines, which support digital communication more readily than traditional telephone lines. Copyright 2012 Pearson Education, Inc. 0-24

DSL DSL connection showing both data and voice over a single phone line DSL uses existing copper telephone wire for the communications circuit. The existing phone line is split into two bands to accomplish this, and the frequency below 4,000Hz is reserved for voice transmission while everything else is used for data transmission. Copyright 2012 Pearson Education, Inc. 2-25

Other Technologies Other technologies that compete with DSL and fiber optics include cable, as used in cable television systems, and satellite links via highfrequency radio broadcast. Copyright 2012 Pearson Education, Inc. 0-26

Cable connection Cable modem configuration in a house Cable communications or cable modems use existing cable TV connections for data transmission. The cable provider uses an existing channel in the cable network for data communications, which are connected via a cable modem. The cable modem provides a network connection for a local computer or is installed directly in a PC system. This allows for very high-speed, always-on networking for clients that have cable TV installed. Copyright 2012 Pearson Education, Inc. 2-27

Home network Typical home network environment using a wireless router In this example, the teenage son even has his Sony Playstation connected to the Internet using a wireless bridge. The Playstation provides a LAN connection option using the 802.3 Ethernet standard. Copyright 2012 Pearson Education, Inc. 2-28

Fast communication needed By combining multiplexing (the encoding or interweaving of data so that a single communication path serves the purpose of multiple paths) and data compression techniques, traditional voice telephone systems were able to support transfer rates of 57.6 Kbps, which falls short of the needs of today s multimedia and Internet applications, such as YouTube and Facebook. To play MP3 music recordings requires a transfer rate of about 64 Kbps, and to play even low quality video clips requires transfer rates measured in units of Mbps. This is why alternatives such as DSL, cable, and satellite links, which provide transfer rates well into the Mbps range, have replaced traditional audio telephone systems. For example, DSL offers transfer rates on the order of 54 Mbps. Fiber networks allow to transfer data in order of Gbps and we are approaching the Tbps. Copyright 2012 Pearson Education, Inc. 0-29

43Tbps over a single fiber: World s fastest network 43Tbps over a single fiber: World s fastest network would let you download a movie in 0.2 seconds http://www.extremetech.com/computing/187258-43tbps-over-a-single-fiber-worldsfastest-network-would-let-you-download-a-movie-in-0-2-milliseconds Copyright 2012 Pearson Education, Inc. 0-30

Bandwidth and broadband terms The maximum rate available in a particular setting depends on the type of the communication path and the technology used in its implementation. This maximum rate is often loosely equated to the communication path s bandwidth, although the term bandwidth also has connotations of capacity rather than transfer rate. That is, to say that a communication path has a high bandwidth (or provides broadband service) means that the communication path has the ability to transfer bits at a high rate as well as the capacity to carry large amounts of information simultaneously. Copyright 2012 Pearson Education, Inc. 0-31

Data Manipulation 2.1 Computer Architecture 2.2 Machine Language 2.3 Program Execution 2.4 Arithmetic/Logic Instructions 2.5 Communicating with Other Devices 2.6 Other Architectures Copyright 2012 Pearson Education, Inc. 2-32

Other Architectures Technologies to increase throughput: Pipelining: Overlap steps of the machine cycle Parallel Processing: Use multiple processors simultaneously SISD: No parallel processing MIMD: Different programs, different data SIMD: Same program, different data Copyright 2012 Pearson Education, Inc. 2-33

Computer Power A computer's clock is a circuit, called an oscillator, which generates pulses that are used to coordinate the machine's activities: the faster this oscillating circuit generates pulses, the faster the machine performs its machine cycle. Clock speeds are measured in hertz (abbreviated as Hz) with one Hz equal to one cycle (or pulse) per second. Typical clock speeds in desktop computers are in the range of a few hundred MHz (older models) to several GHz. MHz is short for megahertz, which is a million Hz. GHz is short for gigahertz, which is 1000 MHz. Copyright 2012 Pearson Education, Inc. 2-34

Computer Power Unfortunately, different CPU designs might perform different amounts of work in one clock cycle, and thus clock speed alone fails to be relevant in comparing machines with different CPUs. If you are comparing a machine based on a PowerPC to one based on a Pentium, it would be more meaningful to compare performance by means of benchmarking, which is the process of comparing the performance of different machines when executing the same program, known as a benchmark. By selecting benchmarks representing different types of applications, you get meaningful comparisons for various market segments. Conclusion: The best machine for one application might not be the best for another. Copyright 2012 Pearson Education, Inc. 2-35

CPU Benchmarking Copyright 2012 Pearson Education, Inc. 2-36

Software for comparing CPUs SiSoftware Sandra Copyright 2012 Pearson Education, Inc. 2-37

Computer Speed Electric pulses travel through a wire no faster than the speed of light. Since light travels approximately 1 foot in a nanosecond (one billionth of a second), it requires at least 2 nanoseconds for the control unit in the CPU to fetch an instruction from a memory cell that is 1 foot away. The read request must be sent to memory, requiring at least 1 nanosecond, and the instruction must be sent back to the control unit, requiring at least another nanosecond. Consequently, to fetch and execute an instruction in such a machine requires several nanoseconds - which means that increasing the execution speed of a machine ultimately becomes a miniaturization problem, i.e. how to reduce distances that a pulse has to travel. Copyright 2012 Pearson Education, Inc. 2-38

Dual-Core CPU As technology provides ways of placing more and more circuitry on a silicon chip, the physical distinction between a computer's components diminishes. For instance, a single chip might contain a CPU and main memory. This is an example of the "system-on-a-chip" approach in which the goal is to provide an entire system in a single device that can be used as an abstract tool in higher level designs. In other cases multiple copies of the same circuit are provided within a single device. Today's state of the art allows for more than one entire CPU to be placed on a single chip. This is the underlying architecture of devices known as dual-core CPUs, which consist of two CPUs residing on the same chip along with shared cache memory. Such devices simplify the construction of MIMD systems and are readily available for use in home computers. Copyright 2012 Pearson Education, Inc. 2-39

Pipelining However, increasing execution speed is not the only way to improve a computer's performance. The real goal is to improve the machine's throughput, which refers to the total amount of work the machine can accomplish in a given amount of time. An example of how a computer's throughput can be increased without requiring an increase in execution speed involves pipelining, which is the technique of allowing the steps in the machine cycle to overlap. In particular, while one instruction is being executed, the next instruction can be fetched, which means that more than one instruction can be in "the pipe" at anyone time, each at a different stage of being processed. In turn, the total throughput of the machine is increased even though the time required to fetch and execute each individual instruction remains the same. Copyright 2012 Pearson Education, Inc. 2-40

Pipelining Example of 4-stage pipeline. The colored boxes represent instructions independent of each other Copyright 2012 Pearson Education, Inc. 2-41

SISD: Single Instruction stream, Single Data stream Copyright 2012 Pearson Education, Inc. 2-42

Multiprocessor machines Pipelining can be viewed as a first step toward parallel processing, which is the performance of several activities at the same time. However, true parallel processing requires more than one processing unit, resulting in computers known as multi-processor machines. A variety of computers today are designed with this idea in mind. One strategy is to attach several processing units, each resembling the CPU in a single-processor machine, to the same main memory. In this configuration, the processors can proceed independently yet coordinate their efforts by leaving messages to one another in the common memory cells. Copyright 2012 Pearson Education, Inc. 2-43

SIMD: Single Instruction stream, Multiple Data stream Copyright 2012 Pearson Education, Inc. 2-44

MISD: Multiple Instruction stream, Single Data stream Copyright 2012 Pearson Education, Inc. 2-45

MIMD: multiple-instruction stream, multiple-data stream When one processor is faced with a large task, it can store a program for part of that task in the common memory and then request another processor to execute it. The result is a machine in which different instruction sequences are performed on different sets of data, which is called a MIMD (multiple-instruction stream, multiple-data stream) architecture, as opposed to the more traditional SISD (single-instruction stream, single-data stream) architecture. Copyright 2012 Pearson Education, Inc. 2-46

MIMD Copyright 2012 Pearson Education, Inc. 2-47

Parallel computing Parallel computing is a form of computation in which many calculations are carried out simultaneously, operating on the principle that large problems can often be divided into smaller ones, which are then solved concurrently ("in parallel"). Parallelism has been employed for many years, mainly in highperformance computing, but interest in it has grown lately due to the physical constraints preventing frequency scaling. As power consumption (and consequently heat generation) by computers has become a concern in recent years, parallel computing has become the dominant paradigm in computer architecture, mainly in the form of multicore processors. Copyright 2012 Pearson Education, Inc. 2-48

End of class Readings Book: Chapter 2 Copyright 2012 Pearson Education, Inc. 0-49

Lab Session SiSoftware Sandra Cisco Virtual Desktop Copyright 2012 Pearson Education, Inc. 0-50

Assignment 1 Download a benchmarking software for computer performance: SiSoftware Sandra. Perform the following tasks on two computers and compare them with the following features of the software: Comparison Processor Arithmetic Processor Multimedia Cryptography test Multi-core Efficiency Memory Bandwidth Cache/Memory Latency Cache Bandwidth 2. Information about hardware Mainboard Processors Busses and devices Copyright 2012 Pearson Education, Inc. 0-51

Assignment 1 - Deadline Deadline 25/04/2016, 23:59 Submit in Turnitin a.doc document Name the document as surname.doc Follow the template on the course website Put in the document screenshots or information copies from SiSoftware Sandra tests. Copyright 2012 Pearson Education, Inc. 0-52

Assignment 2 Complete the Cisco Virtual Desktop test Execute the procedure in Test mode. Put the screenshots of your test in a.doc document. Name the document as surname.doc Submit in Turnitin Deadline 09/05/2016, 23:59. Copyright 2012 Pearson Education, Inc. 0-53