Presentation is loading. Please wait.

Presentation is loading. Please wait.

Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.

Similar presentations


Presentation on theme: "Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization."— Presentation transcript:

1 Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization & Assembly Language Lecture 9 (Computer System Organization) Input / Output

2  Study from Lecture notes  Logical Structure of a Simple Personal Computer  I/O-mapping  Direct Memory Access  Interrupt  Bus Arbiter & Cycle Stealing  Buses  A Typical Modern PC  Input / Output Devices Input / output2

3  Motherboard = large printed circuit board  The motherboard consists mainly of the following components:  The CPU chip.  Some slots.  Various support chips.  A bus along its length.  Sockets into which the edge connectors of I/O board can be inserted.  Sometimes there are two buses:  A high-speed bus for modern I/O boards.  A low-speed bus for older I/O boards. 3

4 Input / output  Each I/O device consists of two parts:  The device. (e.g. keyboard, monitor, etc.)  The controller, which controls the device and handle bus access for it. 4

5 Input / output5  There are three different types of I/O that a typical computer system will use:  Port mapped I/O  Memory mapped I/O  Direct Memory Access  For each of these types, there are advantages and disadvantages

6 Input / output  CPU uses special instructions to access the I/O ports  This type is not provided by all CPUs  The Intel 80x86 Family processors  supports this type of I/O  Has In and OUT instructions to provide I/O mapped input/ output characteristics 6

7 Input / output  Peripheral devices are connected to the address and data line of the CPU exactly like the memory  CPU reads/writes the address of the peripheral device to transfer data to/from the device 7

8 Input / output  Direct Memory Access  Special Form of Memory mapped I/O  The I/O peripheral devices read/write data without going through the CPU  The CPU is not involved in the memory access 8

9 Input / output  I/O devices must be able to initiate communication with the CPU.  An interrupt is a signal initiated by the I/O devices to tell the CPU that it requires some attention.  When the CPU is “interrupted”, it suspends running its current program and start running a special procedure, called an interrupt handler  The interrupt handler determines the appropriate course of action (e.g. Check for error, informs the OS that I/O is completed, etc.).  When the interrupt handler finishes, the CPU continues with the program that was suspended when the interrupt occurred. 9

10 Input / output  The bus is not only used by the I/O controllers, but also by the CPU for fetching instructions and data.  A bus arbiter decides who takes the bus in case there is a collision  In general, the I/O devices are given preferences over the CPU  When no I/O is in progress, the CPU could have all the bus cycles to access memory  When some I/O device is also running, that device will request and be granted the bus when it needs it  This is what is called Cycle Stealing 10

11 Input / output  Communication pathway between all components  Shared among all, thus broadcasts the information to all devices that are connected to it  Organize communication information into 3 forms  Address  Data  Control everything else 11 of information being communicated

12 Input / output12 memory I/O

13 Input / output  carries data  remember that there is no difference between “data” and “instruction” at this level  width is a key determinant of performance of bus. Can be 8, 16, 32, 64 bit. 13

14 Input / output  Identify the source or destination of data  e.g. CPU needs to read an instruction (data) from a given location in memory  Bus width determines maximum memory capacity of system (Maximum Cells addressable) 14

15 Input / output  often bundle address and data signals separately and use different physical pathways  may multiplex using same physical pathway 15 1 0 address 1 0 data 1 0 address data

16 Input / output  reset – force all components to reset  clock (s) to synchronize communication.  destination indicator – usually memory or I/O device.  acknowledgment from component – info received from parts of computer  interrupts  Arbitration : Signal for Bus access by devices 16

17 Input / output  signaling and sequencing to permit interactions between components of computer  Ex.. Memory Read  processor puts address value on bus, and “memory read” control indication  memory receives read signal, reads address, gets appropriate data, puts data on bus  processor waits, then reads data from bus  May be  Synchronous – protocol synchronized by a clock – organize protocol by clock “ticks”  Ti  Asynchronous – no clock is required to synchronize protocol. 17

18 Input / output18 T 1 initiate memory read (address, mem read signal) T 2 time for memory to do internal work T 3 data ready for reading from bus T1T1 stable data T2T2 T3T3 clock addrs stable address mem read data Assumption: Sensing of bus signals done during clock trailing edge

19 Input / output19 no shared clock pacing the protocol mem write command processor Memory sends signal that it has finished writing.

20 Input / output  One of the earliest bus architectures in the IBM PC was the ISA  (Industry Standard Architecture) bus.  This bus was too slow for market development  The situation led to other companies developing machines with multiple buses, one of which was the old ISA bus, or its backward- compatible successor, the EISA (Extended ISA) bus.  The most popular of these now is the PCI (Peripheral Component Interconnect) bus 20

21 Input / output21

22 Input / output  A typical modern PC would typically contain:  Three or four empty PCI slots.  Three or four empty ISA slots.  To allow customers to plug in both  New PCI I/O cards, usually for fast devices.  Old ISA I/O cards, usually for slow devices. 22

23 Input / output  Computer terminals consist of two parts:  Keyboard.  Monitor.  In the mainframe world, these parts are often integrated into a single device and attached to the main computer by a serial line or over a telephone line  In the personal computer world, the keyboard and monitor are independent devices. 23

24 Input / output  Keyboards rely on various methods to physically register the pressing of a key - mechanical, electromagnetic, etc.  On personal computers, when a key is depressed, an interrupt is generated and keyboard interrupt handler is started  The interrupt handler reads a hardware register inside the keyboard controller to get the number of the key (1 - 102) that was just depressed  When a key is released, a second interrupt is caused  Thus if a user depresses the SHIFT key, then depresses & releases the M key, then releases the SHIFT key, the operating system can see that the user wants an upper case “M”. 24

25 Input / output  A monitor is a box containing a CRT (Cathode Ray Tube) and its power supplies.  The CRT contains a gun that can shoot an electron beam against a phosphorescent screen near the front of the tube.  Color monitors have three electron guns, one each for:  Red  Green  Blue 25

26 Input / output  CRTs are far too bulky and heavy to be used in notebook computers  The most common screen for notebooks is based on the LCD (Liquid Crystal Display) tech.  Two types are common:  Passive matrix displays.  Active matrix displays 26

27 Input / output  A mouse is a device for pointing at, and selecting items on a desktop  Low-level software in the computer accepts this information as it comes & converts the relative movements sent by the mouse to an absolute position on the screen.  When the user clicks a mouse button, the computer can figure out which item has been selected from knowledge of where the arrow is on the screen.  Four kinds of mice have been produced:  Mechanical mice.  Optical mice.  optomechanical  wireless mice 27

28 Input / output  A computer device that uses the telephone lines to provide the underlying connectivity between computers  A raw telephone line is not suitable for transmission since it uses just 2 signals, 0 volts to represent a 0 and 3 to 5 Volts to represent a 1.  Two-level signals suffer considerable distortion when transmitted over a voice-grade telephone line, thereby leading to transmission errors 28

29 Input / output  A pure sine wave signal at a frequency of 1000 to 2000Hz, called a carrier, can be transmitted with relatively little distortion.  Because the pulsations of a sine wave are completely predictable, a pure sine wave transmits no information at all.  By varying the amplitude, frequency, or phase, a sequence of 1s and 0s can be transmitted  This process is called modulation 29

30 Input / output30 Time Tow-level signal Amplitude modulation Frequency modulation Phase modulation

31 Input / output  Modems can be:  Full-duplex: can transmit in both directions at the same time.  Half-duplex: can transmit in both direction, but once at a time.  Simplex: only transmit in one direction. 31

32 Input / output  Integrated Service Digital Network, is a standard for digital telephony  When the World Wide Web happened and people were clamoring for high-bandwidth digital access to the Internet, ISDN suddenly discovered its killer application  An ISDN line typically holds two independent digital channels at 64,000 bits/sec each, plus a signaling channel at 16,000 bits/sec. For businesses, a 30-channel ISDN line is typically used.  ISDN is faster than the analog channel and  Allows connection to be established in typically no more than 1 sec  No longer requires an analog modem, and  Much more reliable than an analog line. 32

33 Input / output33

34 Input / output  D igital S ubscriber Line  Technology for bringing high-bandwidth information to homes and small businesses over ordinary copper telephone lines  A DSL line carries both data and voice signals, where the data part is always connected  DSL uses the non-voice frequencies to transmit data, so the voice conversations are not affected by the data transmission 34

35 Input / output  The phone line can be used for phone calls while the internet is open  The speed is much higher than the regular modem  It doesn’t necessarily require new wiring, it can use the normal phone line  The company offering the DSL will provide the equipment as part of the installation 35

36 Input / output  The DSL connection works better when the user is closer to the provider’s central office  The connection is faster for receiving data than it is for sending data over the internet  The service is not available everywhere 36


Download ppt "Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization."

Similar presentations


Ads by Google