Fork me on GitHub

磁盘接口

若转载请于明显处标明出处:http://www.cnblogs.com/kelamoyujuzhen/p/8980477.html

磁盘接口

 磁盘接口是磁盘与主机系统间的连接部件,作用是在主机和硬盘之间传输数据,不同接口直接影响着程序运行快慢以及系统性能的好坏。目前常见硬盘接口类型:IDE/ATA、SAS、SATA、FC、SCSI 。每种接口协议有不同的技术规范,具备不同的传输速度。其存取性能差异较大,实际应用中面对的目标市场各不相同。

如何理解接口?

参考 冯.诺依曼结构 总线 接口 南桥 北桥

  
 
SCSI与ATA是目前流行的两大主机与外设通信协议规范,而且他们各自都有自己的物理接口定义。ATA协议对应IDE接口,SCSI协议对应SCSI接口。
目前,硬盘提供的物理接口包括如下。

用于ATA指令系统的IDE接口。

用于ATA指令系统的SATA接口。

用于SCSI指令系统的并行SCSI接口。

用于SCSI指令系统的串行SCSI(SAS)接口。

用于SCSI指令系统的IBM专用串行SCSI接口(SSA)。

用于SCSI指令系统的并且承载于FabreChannel协议的串行FC接口(FCP)。

 

IDE(Integrated Drive Electronics)

IDE的英文全称为Integrated Drive Electronics,即电子集成驱动器,它的本意是指把控制电路和盘片、磁头等放在一个容器中的硬盘驱动器。
IDE接口,也称为PATA接口,即Parallel ATA(并行传输ATA)。ATA的英文拼写为Advanced Technology Attachment,即高级技术附加。
最初,它使用一个40芯电缆与主板上的ATA接口进行连接,只能支持两个硬盘,最大容量也被限制在504MB之内。后来,随着传输速度和位宽的提高,最后一代的ATA规范使用80芯的线缆,其中有一部分是屏蔽线,不传输数据,只是为了屏蔽其他数据线之间的相互干扰。
IDE电缆上1针(第一针)的位置通常由电缆一侧的红色条纹指定。见下图
每个IDE通道可以支持多少个驱动器?

每个IDE通道(IDE channel)可以支持两个驱动器。 一个IDE带状电缆(IDE ribbon cable)有三个连接。 一个连接连接到主板,另外两个连接可用于两个驱动器。最开始的时候,主板上有一个IDE通道,支持一个主设备和从设备。下图是主板有2个插槽,可见有2个IDE通道。

SATA(Serial ATA)

SATA的全称是SerialATA,即串行传输ATA。相对于PATA模式的IDE接口来说,SATA是用串行线路传输数据,但是指令集不变,仍然是ATA指令集

SATA对比IDE(PATA)有啥优势?

①Increased data transfer rate

The primary reason SATA is used over PATA is because of the increased data transfer speeds with that SATA. PATA is capable of data transfers speeds of 66/100/133 MBs/second, whereas SATA is capable of 150/300/600 MBs/second. The speed differences are due to the various flavors of PATA and SATA, with the fastest speeds being the latest version of each currently available. You'll notice that SATA's slowest speed is still faster than PATA's fastest speed. The improved speed of SATA allows for programs to load faster, as well as pictures and larger documents. For video game enthusiasts, faster data transfer speeds can mean better gaming experiences (i.e. smoother game-play).

②Easy cable management and cable length

Another advantage of SATA over PATA is the length of the cable connecting the hard drive to the computer motherboard. The max length of a PATA cable is 18-inches, whereas a SATA cable can be up to 3.3 feet (1 meter) in length. With this extra length, you have more flexibility of where a hard drive can be mounted in a computer case.

③Increased airflow

SATA cables are also smaller in size than a PATA cable, allowing for increased airflow inside the computer case and decreased heat build-up. Better airflow can help improve the overall life of a computer.

④Support for more drives

There are typically four to six SATA connections on a computer motherboard, allowing for multiple SATA hard drives to be hooked up. There are usually only two PATA connections on a computer motherboard that supports a total of four PATA hard drives.

SATA对比IDE(PATA)有啥略势?

①Drivers and support

There are only a few small disadvantages of SATA over PATA. One disadvantage is that SATA hard drives sometimes require a special device driver for the computer to recognize and use the drive. However, a SATA hard drive can act as a PATA hard drive, thus eliminating the need for the specific driver to be loaded. However, some SATA functionality will be lost to gain this mimic functionality.Older operating systems such as Windows 95 and 98 that were released long before SATA was introduced do not support SATA drives.

②One drive per cable

Another disadvantage with SATA is that the cable allows for only one SATA hard drive to be connected at a time. Whereas a PATA cable allows for hooking up two PATA hard drives per cable

SCSI( Computer System Interface)

SCSl与ATA是目前现行的两大主机与外设通信的协议规范,而且它们各自都有自己的物理接口定义。对于ATA协议,对应的就是IDE接口;对于SCSI协议,对应的就是SCSl接口。
 
SCSI接口设备一般需要配合价格不菲的SCSI卡一起使用(如果主板上已经集成,则不需要要额外的适配器),而且SCSI接口的设备在安装、设置时比较麻烦,所以远远不如IDE设备使用广泛。在系统中应用SCSI必须要有专门的SCSI控制器,也就是一块SCSI控制卡,才能支持SCSI设备,这与IDE硬盘不同。在SCSI控制器上有一个相当于CPU的芯片,它对SCSI设备进行控制,能处理大部分的工作,减少了CPU的负担(CPU占用率)。
 
普通台式机主板一般不集成SCSI控制器,如果想接入SCSI磁盘,则必须增加SCSI卡。SCSI卡一端接入主机的PCI总线,另一端用一个SCSI控制器接入SCSI总线。卡上有自己的CPU,通过执行R0M中的代码来控制整个SCSI卡的工作。经过这样的架构,SCSI卡将SCSI总线上的所有设备经过PCI总线传递给内存中运行着的SCSI卡的驱动程序,这样操作系统便会知道SCSI总线上的所有设备了。
SCSI卡上有通道(channel),这就分成单通道SCSI卡,多通道SCSI卡。
主机IO总线上可以可以插入多张SCSI卡,Windows设备管理器中会识别出多个SCSI卡,系统自己会区分。每个通道对应一个SCSI控制器,每个通道上可以介入8或16个SCSI设备。
 
SCSI协议与OSI模型?
但凡是一个协议,其与OSI模型都是可以对应上的。SCSI具有OSI完整的7个层次。但是SCSI在实际应用中往往只保留自己的应用 表示 会话上3层协议,地下4层协议嫁接到FC形成FCP,或者嫁接给TCP/IP协议簇,形成iSCSI。
 SCSI线缆最长不超过25米

posted @ 2018-05-02 15:21  克拉默与矩阵  阅读(1354)  评论(0编辑  收藏  举报