分享
6.Storage+and+Other+IO+Topic.ppt
下载文档

ID:3485926

大小:12.54MB

页数:127页

格式:PPT

时间:2024-05-09

收藏 分享赚钱
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,汇文网负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。
网站客服:3074922707
Storage and Other IO Topic
Computer Organization&DesignThe Hardware/Software Interface,2024/2/16,1,Contents of Chapter 6,6.1 Introduction6.2 Dependability,Reliability,and Availability 6.3 Disk Storage 6.4 Flash Storage 6.5 Connecting Processors,Memory,and I/O Devices 6.6 Interfacing I/O Devices to the Processor,Memory,and Operating System 6.7 I/O Performance Measures:Examples from Disk and File Systems 6.8 Designing an I/O System 6.9 Parallelism and I/O:Redundant Arrays of Inexpensive Disks,2,2024/2/16,I/O Designers must consider many factorssuch as expandability and resilience(resume),as well as performance.Assessing I/O system performance is very difficult.In different situations,needs use different measurements.Performance of I/O system depends on:connection between devices and the system the memory hierarchy the operating system,3,6.1 Introduction,2024/2/16,A typical collection of I/O devices,4,2024/2/16,Three characteristicsBehaviorInput(read once),output(write only,cannot read),or storage(can be reread and usually rewritten)PartnerEither a human or a machine is at the other end of the I/O device,either feeding data on input or reading data on output.Data rateThe peak rate at which data can be transferred between the I/O device and the main memory or processor.,5,2024/2/16,I/O performance depends on the application:throughput:In theses cases,I/O bandwidth will be most important.Even I/O bandwidth can be measured in two different ways according to different situations:1.How much data can we move through the system in a certain time?For examples,in many supercomputer applications,most I/O requires are for long streams of data,and transfer bandwidth is the important characteristic.I/O requests:Reads or wriles to I/0 devices.,6,2024/2/16,2.How many I/O operations can we do per unit of time?For example,National Income Tax Service mainly processes large number of small files.response time(e.g.,workstation and PC)both throughput and response time(e.g.,ATM),7,2024/2/16,The diversity of I/O devices,8,2024/2/16,Important but neglected“The difficulties in assessing and designing I/O systems have often relegated I/O to second class status”“courses in every aspect of computing,from programming to computer architecture often ignore I/O or give it scanty coverage”“textbooks leave the subject to near the end,making it easier for students and instructors to skip it!”,9,2024/2/16,Amdahls law remind us that ignoring I/O is dangerous Assume:a bench mark executes in 100 seconds of elapsed time,where 90 seconds is CPU time and the rest is I/O time.CPU time improves by 50%per year,but I/O time doesnt improve.After five years,the improvement in CPU performance is 7.5 times.The elapsed time is reduced to 90/7.5+10=12+10=22 seconds.So,the improvement in elapsed time is only 4.5 times.,10,2024/2/16,6.2 Dependability,Reliability,an Availability,Dependability Computer system dependability is the quality of delivered service such that reliance can justifiably be placed on this service.The service delivered by a system is its observed actual behavior as perceived by other system(s)interacting with this systems users.Each module also has an ideal specified behavior,where a service specification is an agreed description of the expected behavior.A system failure occurs when the actual behavior deviates from the specified behavior.service specification:1.Service accomplishment,where the service is delivered as specified2.Service interruption,where the delivered service is different from the specified service,2024/2/16,11,ReliabilityMTTF mean tine to failureMTTR mean time to repairMTBF(Mean Time Between Failures)=MTTF+MTTRAvailability,MTTF,MTTF+MTTR,Availability=,2024/2/16,12,Summary of studies of reasons for failures,2024/2/16,13,Three way to improve MTTF,Fault avoidance:preventing fault occurrence by construction Fault tolerance:using redundancy to allow the service to comply with the service specification despite faults occurring,which applies primarily to hardware faults Fault forecasting:predicting the presence and creation of faults,which applies to hardware and software faults,14,2024/2/16,6.3 Disk Storage,Nonvolatilethe data remains even when power is removed.magnetic diskshard disksHard Disc DriveHD1956,IBM,30MB温彻斯特式硬盘(温彻斯特来福枪)1980,IBM员工创办SEAGATE每年25%30%的速度增长主要厂家:Western Digital、Seagate、Toshiba、EMC,15,2024/2/16,The organization of hard disk platters:disk consists of a collection of platters(1-4),each of which has two recordable disk surfaces tracks:each disk surface is divided into concentric circles(typically 10,000 to 50,000)sectors:each track is in turn divided into sectors,which is the smallest unit that can be read or written(each track may have 100 to 500 sectors.)(512B-4096B),16,2024/2/16,Hard disk basics-organization,A hard disk is a block device that stores data on rigid,spinning magnetic media.Non-volatile.,Whats Inside A Disk Drive?,18,2024/2/16,Disk platters,The storage resides on multiple platters.Each platter has two recording surfaces.,Disk heads,Each platter has 2 read/write heads.They move over the surfaces(in and out).This is called seeking.The time it takes is the seek time.,Tracks and sectors,Each surface is partitioned into a set of tracks.Each track is partitioned into a set of sectors.,Outer tracks commonly have more sectors.,A Magnetic Bit,Bit-cell composed of magnetic grains50-100 grains/bit.0:Region of grains of uniform magnetic polarity.1:Boundary between regions of opposite magnetization.,for Reading,Writing head,Read/write head for hard drive,Longitudinal recording,Calculating disk capacity,Disk storage capacity(bytes per disk)=,platters heads tracks sectors bytes,disk platter head track sector,Calculating disk access time,Access time to get your(sector of)data isWait time(for disk to free up from previous requests).Seek time(to move head to the right track).Usually an average seek time is specified.Rotational delay(to spin to right sector).Determined by how fast the platters spin.Transfer time(to read bytes off sector).Interestingly,this is not constant since some tracks have more sectors than others.Controller overhead(managing I/O requests).,25,To access data of disk:Seek:position read/write head over the proper track minimum seek time maximum seek time average seek time(3 to 14 ms),Rotational latency:wait for desired sectoraverage latency is the half-way round the disk.,2024/2/16,26,27,Transfer:time to transfer a sector function of rotation speed,Transfer rate todays drives-30 to 80 MBytes/second Disk controller,which control the transfer between the disk and the memory,Access Time=Seek time+Rotational Latency+Transfer time+Controller Time,Assuming the measured seek time is 25%of the calculated average,Access Time 25%6ms 3.0 ms 0.01ms 0.2ms 4.7ms,2024/2/16,Storage density,Determines capacity and performance.Density metrics.Linear density(Bits/inch or BPI)Track density(Tracks/inch or TPI)Areal Density=BPIxTPI,BPI,TPI,Real disk SEAGATE Barracuda 7200.11 2TB,Seagate ST32000641AS4 platters,8 heads.Rotational speed:7,200 revolutions per minute.Average seek time:8.5 milliseconds.Cache size:64 MB.Sector size:512 bytes.Guaranteed sectors:3,907,029,168.Sustained data transfer rate,from disk:138 megabytes per second.I/O data transfer rate,maximum:600 megabytes per second.,硬盘接口,IDE接口Integrated Drive Electronics电子集成驱动器,PATA并口,后发展为ATAAdvanced Technology Attachment(ATA)A command set used as a standard for I/O devices that is popular in the PC.SATA:Serial ATA,串口硬盘,2001年取代了ATASATA II:intel&Seagate,外部传输率从SATA的150MB/s提高到300MB/sSmall Computer Systems Interface(SCSI)与IDE接口不一样,用于小型机以上A command set used as a standard for I/O devices.应用范围广、多任务、带宽大、CPU占用率低,以及热插拔等优点,但较高的价格SAS(Serial Attached SCSI),2024/2/16,30,硬盘尺寸,5.25英寸硬盘:早期用于台式机,已退出历史舞台。3.5寸台式机硬盘主流,广泛用于各种台式计算机。2.5寸笔记本硬盘用于笔记本电脑,桌面一体机,移动硬盘及便携式硬盘播放器1.8寸微型硬盘用于超薄笔记本电脑,移动硬盘及苹果播放器。1.3寸微型硬盘产品单一,三星独有技术,仅用于三星的移动硬盘。1.0寸微型硬盘最早由IBM公司开发,MicroDrive微硬盘(简称MD)。因符合CFII标准,所以广泛用于单反数码相机。0.85寸微型硬盘产品单一,日立独有技术,已知用于日立的一款硬盘手机,前Rio公司的几款MP3播放器也采用了这种硬盘。,2024/2/16,31,2024/2/16,32,6.4 Flash Storage,Characteristics of three flash storage products.U盘、CF卡、SM卡、SD/MMC卡、记忆棒、XD卡、MS卡、TF卡,2024/2/16,33,Nor flash/Nand flash,NOR型闪存更像内存,有独立的地址线和数据线,但价格比较贵,容量比较小NAND型更像硬盘,地址线和数据线是共用的I/O线,类似硬盘的所有信息都通过一条硬盘线传送一般,而且NAND型与NOR型闪存相比,成本要低一些,而容量大得多,2024/2/16,34,SSD,Solid State Disk、IDE FLASH DISK、Serial ATA Flash Disk最大容量为1TB接口规范和定义、功能及使用方法与普通硬盘的完全相同,在产品外形和尺寸上也完全与普通硬盘一致,包括3.5,2.5,1.8多种类型抗震性极佳固态硬盘没有普通硬盘的旋转介质工作温度很宽扩展温度的电子硬盘可工作在-45+85广泛应用于军事、车载、工控、视频监控、网络监控、网络终端、电力、医疗、航空等、导航设备等领域。,2024/2/16,35,Flash memory advantages and disadvantages,AdvantagesLow power.Silent.Faster than disk.Resistant to shock.Compact enough to be embedded within cute little objects.DisadvantagesVery expensive relative to disks(approx.8x).Self destructs after 100,000 writes.Not as dense.Compact enough to be embedded within.?,6.5 Connecting Processors,Memory,and I/O Devices,questionsHow is a user I/O request transformed into a device command and communicated to the device?How is data actually transferred to or from a memory location?What is the role of the operating system?,2024/2/16,37,three characteristics of I/O systems:1.Multiple programs using the processor share the I/O system.2.I/O systems often use interrupts(externally generated exceptions)to communicate information about I/O operations.Because interrupts cause a transfer to kernel or supervisor mode,they must be handled by the operating system(OS).3.The low-level control of an I/O device is complex,because it requires managing a set of concurrent events and because the requirements for correct device control are often very detailed.,2024/2/16,38,Buses,39,Shared communication link(one or more wires)Difficult design:may be bottleneck length of the bus number of devices tradeoffs(fast bus accesses and high bandwidth)support for many different devices cost,2024/2/16,A bus contains two types of lines Control lines,which are used to signal requests and acknowledgments,and to indicate what types of information is on the data lines.,40,Data lines,which carry information(e.g.,data,addresses,and complex commands)between the source and the destination.,Bus transaction include two parts:sending the address and receiving or sending the data,two operations input:inputting data from the device to memory output:outputting data to a device from memory,2024/2/16,The steps of an output operation.,41,Initial a read from memory.Control lines signal a read request to memory,while the data lines contain the address,Memory access the data.,Memory transfers data and signal data is available.The device stores data as it appears on the bus.,2024/2/16,The steps of an input operation.,42,Control lines indicate a write request for memory,while the data lines contain the address,When the memory is ready,it signals the device,which then transfers the data.The memory will store the data as it receives it.The device need not wait for the store to be completed.,2024/2/16,Types of buses:processor-memory(short high speed,custom design)backplane(high speed,often standardized,e.g.,PCI)I/O(lengthy,different devices,standardized,e.g.,SCSI),43,Older PCs often use a single bus for processor-to-memory communication,as well as communication between I/O devices and memory.,2024/2/16,44,A separate bus is used for processor-memory traffic.The I/O bus use a bus adapter to interface to the processor-memory bus.,A separate bus is used for processor-memory traffic.A small number of backplane buses tap into the processor-memory bus.,2024/2/16,Synchronous vs.Asynchronous Synchronous bus use a clock and a synchronous protocol,fast and small but every device must operate at same rate and clock skew requires the bus to be short Asynchronous bus dont use a clock and instead use handshaking,45,Our example,which illustrates how asynchronous buses use handshaking,assumes there are three control lines.ReadReq:Used to indicate a read request for memory.The address is put on the data lines at the same time.DataRdy:Used to indicate that data word is now ready on the data lines.Ack:Used to acknowledge the ReadReq or the DataRdy signal of the other party,Handshaking protocol,2024/2/16,46,Example:The asynchronous handshaking consists of seven steps to read a word from memory and receive it in an I/O device.,When memory sees the ReadReq line,it reads the address from the data bus,begin the memory read operation,then raises Ack to tell the device that the ReadReq signal has been seen.I/O device sees the Ack line high and releases the ReadReq data lines.3.Memory sees that ReadReq is low and drops the Ack line.,2024/2/16,-I/O device,-memory,47,When the memory has the data ready,it places the data on the data lines and raises DataRdy.5.The I/O device sees DataRdy,reads the data from the bus,and signals that it has the data by raising ACK.The memory sees Ack signals,drops DataRdy,and releases the data lines.7.Finally,the I/O device,seeing DataRdy go low,drops the ACK line,which indicates that the transmission is completed.,Example:The asynchronous handshaking consists of seven steps to read a word from memory and receive it in an I/O device.,2024/2/16,48,These finite state machines implement the control for handshaking protocol illustrated in former example.,2024/2/16,Obtaining Access to the Bus“Without any control,multiple device desiring to communicate could each try to assert the control and data lines for different transfers!”So,a bus master is needed.Bus masters initiate and control all bus requests.e.g.,processor is always a bus master.Example:the initial steps in a bus transaction with a single master(the processor).,49,First,the device generates a bus request to indicate to the processor that it wants to use the bus.,2024/2/16,50,The processor responds and generates appropriate bus control signals.For example,if the devices wants to perform output from memory,the processor asserts the read request lines to memory.,The processor also notifies the device that its bus request is being processed;as a result,the device knows it can use the bus and places the address for the request on the bus.,2024/2/16,Bus Arbitration Deciding which bus master gets to use the bus next In a bus arbitration scheme,a device wanting to use the bus signals a bus request and is later granted the bus.,51,four bus arbitration schemes:daisy chain arbitration(not very fair)centralized,parallel arbitration(requires an arbiter),e.g.,PCI self selection,e.g.,NuBus used in Macintosh collision detection,e.g.,Ethernet,Two factors in choosing which device to grant the bus:bus priority fairness,2024/2/16,Bus StandardsSCSI(small computer system interface)PCI(peripheral component interconnect)PCIE(PCI-Express)1.0 2.0 3.0IPI(intelligent peripheral interface)IBMPC-AT IBMPC-XTISAEISAUSB 1.0.2.0 3.0IEEE1394,52,2024/2/16,总线,总线的带宽总线的带宽指的是一定时间内总线上可传送的数据量,即我们常说的每秒钟传送多少MB 的最大稳态数据传输率。与总线带宽密切相关的两个概念是总线的位宽和总线的工作时钟频率。总线的位宽总线的位宽指的是总线能同时传送的数据位数,即我们常说的32 位、64 位等总线宽度的概念。总线的位宽越宽则总线每秒数据传输率越大,也即总线带宽越宽。总线的工作时钟频率总线的工作时钟频率以MHz 为单位,工作频率越高则总线工作速度越快,也即总线带宽越宽。

此文档下载收益归作者所有

下载文档
你可能关注的文档
收起
展开