Software Systems Spring 2005 Outline: 0) Homework 1 1) Patterson's article 2) the system model 3) example: disk drives For next time: 1) look over the three Disk Drive handouts SCSI interface pages 680-686 from Hennessey and Patterson Cheetah product manual Keep these handy. 2) finish Homework 1 3) prepare for a quiz covering Homework 1 Homework 1 ---------- What have we learned so far? Questions? Let's do Sections 1.3 and 1.5 Patterson's article ------------------- Comments? Questions? I started the semester with this article 1) because it says interesting things about latency and bandwidth 2) because it introduces several of the themes we will be talking about all semester. Of course, not all of it will make sense at this point. 1) bandwidth improves faster than latency 2) Moore's law fast transistors and more pins, good for bandwidth fast transistors, good for latency bigger chips, bad for latency 3) physical lower bounds speed of light in networks capacitance on and between chips 4) marketing 5) improving latency usually improves bandwidth 6) sometimes improving bandwidth hurts latency (Patterson may be a overstating his case here. There are also many ways to improve latency that consume bandwidth -- he mentions them later.) 7) layered design hurts latency (operating system overhead) Tools for improving latency: 1) caching 2) replication 3) prediction Lessons for innovators: 1) if you have an idea that needs a little more bandwidth, you won't have long to wait. 2) if you need lower latency, the wait may be longer, or infinite. 3) if trends continue, desperate latency-reducing strategies may pay off System Model ------------ Keep in mind, as always, that a model is a kind of lie. The parts of the system that we care about (for this class) are: 1) CPU 2) registers and other hardware state 3) cache(s) 4) memory 5) buses and ports 6) disk drives 7) network interfaces 8) graphics cards 9) human interface devices 10) measurement and control devices (A/D and D/A) For each component, the questions we are interested in are: 1) what is the software interface? 2) what are the relevant performance characteristics? 3) is there a model for this component that is sufficient for our purposes as users/designers of software systems? 4) can we build an abstract interface for this device that will make it easy to use without sacrificing control and performance? People who write device drivers need (1) People who design and analyze systems need (2) and (3) People who design operating systems and programming languages work on (4) The disk drive -------------- We will answer the previous questions using three carefully-selected readings. The software interface to a SCSI disk drive is... um... SCSI. SCSI (Small Computer Systems Interface) is one of several interfaces cpus use to talk to disk drives. As a quick aside, SCSI and many of the other interfaces in Intel-based systems are OPEN STANDARDS, which means that many companies can manufacture devices that will work together interchangeably. As a result, these manufacturers are forced to compete on the basis of performance and cost, the result of which is an ENORMOUS benefit to consumers. Another benefit of Open Standards is that you can learn about them by downloading the spec from nice people like Seagate. Reading exercise ---------------- 1) Take 2 minutes to skim the pages from the SCSI manual so you know what information I have given you. 2) Then read the following questions. 3) Then go in an find the answers to the questions. Reading questions for the SCSI manual. Some of these questions depend on background information you may not have yet, so if you can't answer some (or any) of them, that's ok (for now)! 1) What's an initiator? 2) What are the four parts of a Command Descriptor Block? 3) If something goes wrong during a request, how does the initiator find out about it? 4) What is a logical block address? How many bits does it contain? 5) What does it mean if the transfer length in a request is zero? 6) How does the drive know whether or not a command is linked? 7) In a read command, how many bits is the Logical Block Address? How many different blocks can be addressed? 8) How does the initiator know the range of valid block addresses? 9) What happens if a request references an illegal block address? 10) Taking advantage of what we know about disk drive mechanics, describe the sequence of steps that occurs between the initiation of a read command and the beginning of data transfer. 11) What is prefetching? 12) What effect does the RCD bit have during a write command?