外文翻译--和关于Windows模式中高速存储技术的研究_第1页
外文翻译--和关于Windows模式中高速存储技术的研究_第2页
外文翻译--和关于Windows模式中高速存储技术的研究_第3页
外文翻译--和关于Windows模式中高速存储技术的研究_第4页
外文翻译--和关于Windows模式中高速存储技术的研究_第5页
已阅读5页,还剩7页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1 附录 -外文翻译部分 原文: Research of High-spee d Data Storage Technique in Windows Mode Abstr act: In the app lic at ion of modern industry me asure and c ontro l fie lds,th e trans ient st ate s ing le shou ld b e inc ept ed to c ompu ter for storag e and pr oc essin g rea l t im e. With inc re as ing d es ign t arget, it b ec omes mor e an d more import ant t o the prob lems in th e dat a storage proc ess ing a nd the w ays to solv e thes e prob lems in th e dat a storage proc ess ing a nd the w ays to solve th ese prob lems in Window s mode. Ke ywords: Data storage; transfers speed; WinDriver; ASPI; virtual disk. 1 Fore word Wit h the measur e instrum ent prec is ion and prac t ic e dem and targe t inc re as ing, the dat a transfer speed betw e en instrume nt and c omputer impro ves, and most of the data shou ld be proc ess ing rea l t im e. Commo n CP U oper at io n speed h as a lr eady exc e ede d 1 G Hz, so it is e asy for th e op erat ion a b ility of c omputer to sat isfy the c omman d of in dustry me asure an d c ontrol. How e ver, th e key p o int is t he tr ansfer b ott lenec k b etw een the instrum ent and h ost c omput e r. If the dat a c annot be sent to c omput er in time, the c omput er s operat ion a b ilit y w ill no t be ex erted effec t ive ly. Th is prob lem w ill b e d isc ussed as fo llow. The first it em shou ld be e nsured is the kind of the OS(oper at io n system). The most popu lar OS is Wind ow s system, so the most import ant tac he of data transf er w ill be disc ussed in Window s mode. 2Memory Management One of th e k ey c onc epts of mem ory m ana gem ents is th e c orre lat io n 2 betw een the addr ess spac e (log ic addr ess) and stora ge and stora ge sp ac e (physic a l addr ess). When program is runn in g, memory ma nag eme nt un it (MMU) exec utes t he m app in g from log ic a ddress to p hys ic a l ad dress. The log ic a ddress is add ed by the va lue in re loc at io n reg ister befor e sent to memory, and th e va lu e in re loc at ion re g is ter is transpare nt to user. It is obv io us that in Window s mode, memory ma nag eme nt is used th e virt ua l a ddress spac e, but not physic a l address, so the program w ill rec eive the virtual address, instead of physic al address. Consid er ing of the map p ing aff ec tion on dat a tra nsfer spee d, oper at io n phys ic a l address d irec t ly is the best c ho ic e. The operat ion step is as follow : first , send the data to the buffer area (phys ic a l mem ory) that a llo tted by th e mana gem ent soft; sec ond, send th e dat a to the buffer ar ea ( log ic me mory) tha t a llott ed by the man ag emen t soft; third, send the dat a from lo g ic memory to storage d isks. Bot h phys ic a l a ddress and log ic addr ess should be c ont in uous. The reasons ar e list ed as fo llow : f irst, it is sure to a llot the m emory like th at , and next it w ill b e show n; sec ond, re lat iv e to a llott in g sever a l buffer ar eas , a llott ing on e buffer ar ea w ill no t add t he fra gmen t to mem ory to; t h ird , allotting this kind of buffer area c an predigest the program. In the fist step, data ac qu is it io n c ard shou ld obta in the proc ess of transfer data ,and th e phys ic a l addr ess must be c ontinuo us. The buffer area s siz e lies on the dat as size tra nsferred onc e. And in the th ird step, sinc e suing ASPI in terfac e tec hn iq ue (it w ill b e exp la ine d in fourth pa rt), the log ic address should be c ontinuous, too. If the buffer areas in first and th ird step c an be un ited int o one buffer are a, the proc essin g is on ly c onc lud ing tw o steps : f ist, send the d at a to c ontinu ous buffer area; sec ond, send the data to data d isk s. By this w ay, the tim e of the d ata mo ve in th e mem ory w ill b e reduc ed, and th e dat a storag e spee d is inc reased. To avo id th e stor age oper at io n effec t o n th e d ata r ead, the p ing -p ong mod e is ac c epte d in th e storag e proc ess ing . The a llott ed buffer are a is d iv id ed int o tw o same parts. When the first buffer area is full of dat a , the system sends an in terrupt s ig na l t o man ag emen t soft , and tra nsfers the d ata t o hard d isk. The follow in g dat a w ill dat a w ill be sent to the next buffer ar ea. Wh en th is b uff er area is fu ll of dat a, th e system sends an inte eeu pt s ign a l to ma nag eme nt soft, to o. The prec ond it io n of this mode is the storag e speed shou ld shou ld shou ld be 3 higher th an dat a ac qu is it ion spe ed. The transfer spe ed of Wid e Ultra 2 SCSI d isk c an reac h 80 MB/s,and th e dat a w idth is 16b it, w hic h w ill s at isfy th e prec ondition. 3. Me thod on Allotting Continuous Buffre Are a There are severa l m etho ds on a llott ing c ont inuous are a in Win dow s mode, and tw o of these are c ompared here . One is usin g VxD ( Virtu a l Dev ic e Dr iv er) to do this job. It c an allot on e c ontin uous buffer area an d prov ide th e head ad dress of this buffer area to mana gem ent progra m and map p ing form th is buffer area to v irtua l a ddress spac e. In the pro gram, f irst ho ld o ne buffer area in t he v irt ua l address spac e, the n transfer VxD w it h send ing th e hea d address of the v irtua l a ddress spac e to Vx D, so that VxD a llot o ne b uffer are a in t he ph ys ic a l mem ory a nd obt a in t he hc a d address. At last, refer the phys ic a l memory to th e appo inte d virt ua l a ddress spac e . This w ay c an be used in w in3 2 ,and it c an rec e ive a c ont inuous ph ysic a l buffer area and log ic buffer area. How ever, it is muc h c omplex to be c arried out. Anot her is using th e func t ion of c ards D MA op erat ion in Win Dr iver : WD_D MALoc k. By us ing th is func t ion, th e c ont in uous buffer are a c an b e obta in ed for D MA oper at ion are a. Win Dr iv er is on ly used t o dr ive c ards, so it requ ires at le ast one c ard in th e ac qu is it ion system. But it is c ommon for most ac qu isit ion system th an the f irst w ay, and its de pen dab ility is h ighe r, too. More ove r, it is c onven ienc e to upgrad e. So it is a good c ho ic e for ind ustry measure fields. The buffer are a is a llott ed by th is w ay : sett ing the r eason ab le para met er of the func t ion WD_D MALoc k to obta in the c ont inuous p h ysic a l p ag e , and th e c orrespond ing lo g ic address is c ont inuo us, too. The head ad dress of first phys ic a l pag e is the ph ysic a l m emory address .The retur n va lu e of puser addr , one of the param eter of WD_ DMALoc k, is the phys ic a l memory. In add it ion ,w inDr iv er c ollates ever y ac qu isit ion c ard by lo g ic mumber (from l to the m ax imu m ,the log ic nu mber is not c orrespo nd in g to phys ic a l or der),an d th e func tio n c an ru n w ithout op erat ing ac qu isit ion c ar ds or a ny resp onse of thos e c ards, so the log ic number c an be used as l in the func t ion and affords to all ac quisition c ards. 4 One det a il shou ld be p a id muc h attent ion : one of param eter of th is func tio n must be set to “DMA_ KERN EL_ BUFF ER_ ALLOC”, so that Win Dr iver c an a llo t a c ontinuous phys ic a l me mory spac e. More ove r, the proc ess of allott in g buffer area must be p lac e d in t he in it ia liz at io n ph ase in the progra m, and oth er program shou ld not run befor e the memor y mana gem ent soft runs. Otherw ise, the proc ess of a llott in g mem ory ma y be f a ilur e for the syst em h as not e noug h c ontin uous phys ic a l memory spac e. Whe n the proc ess is fin ished, the a llotte d memory m ust be fre e by f unc t ion W D_D MAUn loc k. The f igure sh ow s the a llott ed phys ic a l memory mod e l by pin g -pon g mode (the size of eac h buffer area is 1MB) Data storage buffer area 2 (1MB) Data storage buffer area 1 (1MB) OFFSET0x000FFFFF OFFEST0x00000000 OFFSET0x001FFFFF OFFEST0x00100000 5 Fig.1 Allotted Physic al Memory Model 4. Storage in Hard Disk Hard d isk op erat ion has tw o leve ls : Win dow s and log ic sec tor le ve l. Ac c essing d isk in Window s leve l , the o pera t ion system w ill do most of the jo b. The opera t ion is so simp le th at the Wind ow s98/2000 op erat ion system c an c all API func t ion d irec t ly t o ac c ess the d isk. How ev er, t he sp eed of th is ac c ess is to o low to sat isfy th e d ata storag es req u irem ent. Ac c essing d isk in log ic sec tor leve l , the soft deve lop ed by user self c an operat e disk d irec t ly in lo g ic sec tor. This met hod ga ins h igh er speed th an Window s leve l by ac c essing d isk w ithou t usin g opera t ion systems file system. If the data are store d in c ont in uous log ic sec tor, the speed of dat a storage w ill g et h igh er. So, it is better to ac c ess disk in logic sec tor level and c ontinuous logic sec tor than Window s level. To improv e th e d ata storag e spe ed , system ad opts SCSI hard d isk instea d of IDE hard d isk . In the for ep art of SCSI, us ers dev e lop t he S CSI de v ic e s driver. The job is very c omp le x and oft en mak es mist akes, and th e dr iver s portab ility is n ot w e ll. ASPI ( Adv anc ed S CSI Progr am Int er fac e) tec hn iqu e solv es th is prob le m. Prob lem. ASPI is dev e lop ed by Ad apt ec Comp any, an d def ine d in most operat ion system, inc lud ing Win dow s system, The proc ess of ac c essing SCSI h ard d isk by ASPI inc ludes four ste ps c ommon ly : c onstruc t ac c essing d isk c omman d; send th e c ommand to ASPI m anag er; w a it for exec uting c ommand; explain the state or error c ode returned by ASPI manager. The c onc rete metho d abou t ASPI w ill not be e xp la ine d here, w hic h c an be fou nd in man y boo ks abo ut S CSI. In th e proc ess of d ata stor a ge, the t ime of searc hing trac k and sec tor is red uc ed after th e d isk rotat e speed k eeps norm a l. But a det a il shou ld be pa id m uc h att ent io n. If the ma gne t ic hea d is far form th e sec tor w here to write dat a w hen the f irst tim e to w rite dat a, the magn et ic hea d w ill spend more t ime to w rite to seek tr ic k and sec tor. Moreove r, if the d isk is at dormanc y state (d isk rotate spee d is zero), the proc ess that c hanging the d isk state from dorma nc y state to runn ing stat e w ill c ost many t im es. How ev er, th e data tra nsferr ing form ac qu is it ion c ard to the a llot ted buffer are a ke eps c onstant. This c ase maybe ha ppe ns at this time that some da ta w ill be lost bec ause th e speed of da ta storag e is low er th an th e speed of tra nsfer dat a from ac qu is it io n 6 c ard to memory. To so lv e th is prob lem, th e d isk rotat e spe ed must b e kep t runn ing stat e w hen the proc ess of data storage starts, and ev ery magn et ic hea d be move d to the c y lind er or the c on jo int c ylinder w here th e dat a w ill b e sent to. It is diff ic u lt to oper ate d isks mag net ic he ad by soft and th is method m ayb e hurt disk, so it is better to f ind a new w ay but not to move magn et ic hea d dir ec t ly. An effec t iv e w ay is re ad th e dat a form the sec tor w here th e da ta w ill transfer to mem ory, then w r ite b ac k to the sec tor . By th is w ay, the m agn e t ic head moves to the c ylinder or the c onjoint c ylinder and keeps the disk running. 5. Virtual Disk Genera lly, the disk op erat ion speed is low er than th e memory oper at io n speed of 4 to 6 ord er. So it c an improv e th e stora ge sp eed to us e me mory as d is k, th is w ay is also c alled RAM d isk. RAM d isks dev ic e dr iver a llow s the norma l disk op erat ion, though the op erat ion is ex ec uted in memory inste ad of disk. So it is transpar ent for the user. This w ay is not a goo d c hoic e for the h ig h depe nda b ility system, bec aus e it has man y d isadv anta ges suc h as the memory c apab ilit y shou ld be e noug h, the dat a in the v irtu a l d isk w ill b e lost if th e system or pow er meet some ac c idents. 6. Postscript All the a bov e it ems are the ke y po ints in h igh -spe ed dat a storag e tec hn iqu e. In add it ion, ther e are som e other p o ints a lso as RAID (Redun dan t Arr ays of In expe ns ive D isks ), d isk d ispa tc h a lgor ithm, e tc .The affec t ion r ang e and the c ost of the system are all d iffer ent. So the c hoic es are differ ent. too. “Four Ch ann e ls PXI Bus Preproc essin g Dynam ic Da ta Ac qu is it io n System” is des ign for the aero en g ines trans ie nt a nd d ynam ic sta te, w ind tu nne l exam inat ion. This task be longs to the sub jec t: th e researc h of aero au toma t ism measure and t est tec hn ique. In t he d eve lopm ent of t he s ystem soft, th e rese arc h of the data storage tec hnique has provided the pow erful support. Re fe re nce 1Chen xiangqun XiangYong, WangLei MaHongbing, Zh eng Koug en D ave Probert. Window s Operation System Princ iple 2Cao Ziyua n. Phys ic a l Memorys Alloc at ion and D irec t Ac c ess in Win3 2 Mode,Observe and Control Tec hnique, Vol.20,No.1,Jan2001. 3 Br ian Saw ert. The Programmer s Gu ide To SCSI, Ch ina Elec tr ic Pow er 7 Press,2001 4Wa lt er On ey. Progra mm ing t he Mic rosofy Wind ow s Driv er Mo de l, Mic rosoft Press,1999 5Zh ang Hao. The Arc h ive of P HD2 000 D ata Ac qu is it io n System s Sofr, Sep, 2001 Author Biographies Zh ang Le i: w ork in the F irst Aero naut Inst it ute of Air Fore e, instruc tor, gradu ate stude nt of Be ijin g Un ivers it y of Aeron aut ic s& Astron aut ic s, engag ed in data ac quisition system development: Xu X ing : w ork in Be ijing Un ivers ity of Aerona ut ic s& Astrona ut ic s ,Sc hool of Instrument at ion Sc ienc e & Opto-e lec tron ic s Eng ine er ing, professor, tutor of graduate student, engaged in c omputer measure and c ontrol tec hnique researc h. 8 翻译: 和关于 Windows 模式中高速存储技术的研究 摘要: 在现代工业测量和技术领域的应用中,单一的短暂状态输入计算机存储,并却实时处理。随着设计目标的增加,重要数据的存储速度变的越来越重要。本文主要讲的是数据存储过程中的问题和在 Win dow s 模式中解决这些问题的方式。 关键词:数据存储 转换速度 Windows ASPI 虚拟磁场 1 .展望 随着测量工具的精确和实际需求目标的曾加,数据转换速度在测量仪器和计算之间改进,并且大部分数据都可以实时处理。普通 CPU的运行速度已经超过 1G 赫兹。对于计算机的运行能力来讲,需满足工业测量仪器和控制的要求是很容易的:然而主要的问题在于测量仪器与主机同的转换障碍。如果数据没有及时地传送到计算机,那么计算机的操作能力就不能有效地被运用,这个问题将按如下步骤进行探讨:第一步应先确定操作系统的类别最流行的操作系统是 Window s 系统。因此,最重要的数据转换技术将在 Window s 模式中讨论。 2.存储器管理 存储器管理的一个主要的概念是在“位置空间”(逻辑地址)和“存储空间”(物理地址)间的相互关系。当程序运行时,存储器管理单元执 行从逻辑地址到物理地址间的制作工作。 在传到存储器前,逻辑地址就是通过重新注册的价值得到补充,并且重新登记的的价值对用在虚拟地址中使用,而非物理地址。所以这个程序存到的是虚拟地址而非物理地址。 考虑到数据转换速度中制图因素的影响,操作物理地址显然是最好的选择,操作步骤如下:第一:将数据传到由管理软件分配的缓冲区域(物理区域);第二,将数据传到由管理软件分配的缓冲区域(逻辑区域);第三,将数据从逻辑存储器传送到存储磁盘上,但是物理地址和逻辑地址是无法连续的,原因如下:第一,必须保证向上述那样分配存储器,并且下 一步可以显 9 示出来;第二,相关的分配几个缓冲区域,分配一个缓冲区域并不能将零碎的片段添加的记忆中去。第三,分配到这种缓冲区域可以预先处理此程序。 在第一步中,数据获得下可以获得数据转换过程中,数据存储分配区域的物理地址,并且物理地址必须是连续的。缓冲区域的大小在于一次性转换数据的长度。并在有第三步中,因为使用了 ASPI 界面技术(将在第四部分中介绍),逻辑地址也应是连续的,如果第一阶段和第三阶段的缓冲区域可以统一在一个缓冲区域,那么这个过程只包括两步:第一,将数据传送到连续的缓冲区域;第二,将数据传送到数据磁盘 ,通过这种方式,数据转移到存储器系统的时间将缩短,且数据存储速度将增加。 为了避免存储操作技术影响数据只读功能, PIN G-PO NG 模式有存储过程中被接受,分配缓冲区域被划分为两个相同的部分。第一个缓冲区域充满数据,系统传送一个中断信号到管理软件,并且将数据转到硬盘上,剩下的数据被传到下个缓冲区域,当这个缓冲区域充满数据,系统也会向管理软件传送 中 断 信 号 , 这 个 模 式 的 前 提 是 : 数 据 的 存 储 速 度 应 高 于 获 得 速 度 。WID EULT RA2 SCS I 磁盘的转换速度可以达到 80 MB/S,且数据的宽度是 16 位 ,可以满足这个前提 . 3.分配连续缓冲区域的方式 在 WINDOWS 模式下 ,有多种分配连续缓冲区域的方式 ,这里将比较其中的两种 . 一种是利用 VXD(虚拟装置驱动器 )来做此工作 ,它可以分散一些连续的缓冲区域 ,切给管理程序提供这个缓冲区域的首地址 ,为从这个缓冲区域到虚拟地址提供制图 ,在此程序中 ,首先在虚拟地址中选择一个缓冲区域 ,然后将附有首地址的虚拟地址的 VXD 传送到 VXD,只有这样 , VX D 分散一个在物理存储器与已确定的虚拟地址联系起来 ,这种方法可以在 WI N32 中使用 ,它可以直接收到一个连续的物理缓冲区域和逻辑缓冲区域 .但是 ,这个模式的执行比较复杂 . 另一种是是用 Win Dre ir 中卡的 D MA 运行的功能 :WD- DMALOCK.通过使用其功能 ,对 DMA 来说 ,这个连续的缓冲区域能够获得 ,这个缓冲区域可以作为数据存储缓冲区域使用 . WinDre ir 只是被用来驱动卡 ,因此 ,在获得系统中要求最少一张卡 .但是对大多时获得系统来讲 ,使用数据获得卡是很普通的一件事 ,这种方法较第一种来讲是比较简单的 ,且它的依赖性也更高 ,更多的是 ,对上层来讲是简便的 ,所以对工业测量是个很好的选择 . 缓冲区域是按此方式分散的 ,为了获得一个连 续的物理页码 ,设定一个 10 合理的 WD-D MALO CK 功能的参数 ,切相应的逻辑地址也是连续的 ,首个物理页 码 的 首 地 址 是 一 个 物 理 存 储 器 地 址 .Pus er Addr 的 回 服 价 值 , WD-D MALO CK 的一个参数 ,是物理存储器的地址 .另外 WinDre ir 通过逻辑数字 (从 1 到无穷大 ,逻辑数字与物理顺序不是对应的 )分散获得卡 ,在设有运行获得卡或这些卡的任何影响的情况下 ,这项功能就可运行 .因此逻辑数字在此项功能中被使用设为 1,且对所有的获得卡承担责任 . 有一个细节 ,我们应给予更多的关注 :次功能的一个参数一定要被转送到DMA- KERN EL- BUFF ER- AUO C 中 .这样 , WinDr e ir 可以分散一个连续的物理记忆空间 ,而且分散缓冲区域的过程应放在程序初始化阶段 .且其它的程序不应在存储器管理软件运行前运行 .否则 ,由于系统没有足够的连续的物理存储空间分散存储器过程可能会失败 .当完成此过程时 ,通过 WD-

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论