Page 412 - FUNDAMENTALS OF COMPUTER
P. 412

NPP










                     412                         Fundamentals of Computers                           NPP


                    (iii)  Interrupt Controlled Data  Transfer  (iii)  B§Q´>ßQ>  H§$Q´>moëS>  S>mQ>m  Q´>m§g\$a
                        The input-output device is started by the   BZnwQ>-AmCQ>nwQ> {S>dmBg H$mo CPU Ûmam àma§^ {H$¶m
                    CPU and the CPU goes on executing its main  OmVm h¡ VWm CPU BgHo$ ‘w»¶ àmoJ«m‘ H$mo E³Or³¶yQ> H$aZo
                    program. Whenever IO device is ready it gives  Ho$ {bE OmVm h¡ O~ IO {S>dmBg V¡¶ma H$mo OmVr h¡ Vmo
                    a signal to the CPU over its interrupt line. When-
                    ever CPU is interrupted it completes the cur-  ¶h BgH$s BÝQ>aßQ> bmBZ na CPU Ho$ {bE EH$ {g½Zb
                    rent  instruction.  Now the CPU  starts execut-  XoVr h¡ O~ H$^r CPU H$mo BÝQ>aßQ> {H$¶m OmVm h¡ Vmo ¶h
                    ing other program written for IO data transfer.  dV©‘mZ BÝñQ´>³eZ H$mo nyam H$aVm h¡& A~ CPU IO S>mQ>m
                    This program is called Interrupt Service Rou-  Q´>mÝg’$a Ho$ {bE {bIo J¶o Aݶ àmoJ«m‘ H$mo E³Or³¶yQ>
                    tine (ISR). Before branching to ISR the address  H$aZm àma§^ H$aVm h¡& ¶h àmoJ«m‘ BÝQ>aßQ> g{d©g ê$Q>rZ
                    of next instruction is automatically push onto  (ISR) H$hbmVm h¡&  ISR ‘| ~«mqMJ Ho$  nhbo AJbr
                    the stack. Now data transfer takes place with  BÝñQ´>³eZ H$m ES´>og ñdV… ñQ>oQ> na nyam hmo OmVm h¡& A~
                    the help  of instructions written  in ISR. After  ISR ‘| {bIo J¶o BÝñQ´>³eÝg H$s ghm¶Vm go S>mQ>m Q´>m§g’$a
                    executing the ISR, the program  control  will  hmoVm h¡&  ISR H$mo  E³Or³¶yQ> H$aZo  Ho$ níMmV²  àmoJ«m‘
                    automatically return to the main program and  H$ÊQ´>mob ñdV… ‘w»¶ àmoJ«m‘ ‘| dmng Am OmVm h¡ VWm CPU
                    CPU  will  start executing the  main program.  ‘w»¶ àmoJ«m‘ H$mo E³Or³¶yQ> H$aoJm& Bg àH$ma, ¶h {d{Y
                    Thus this method gives efficient utilisation of  CPU H$s Hw$eb Cn¶mo{JVm XoVr h¡& CPU H$m g‘¶ I/O
                    CPU. The time of CPU is not wasted in checking  H$s ñQ>oQ>g H$s Om§M H$aZo ‘| Zï> Zht hmoVm h¡&
                    status of IO.

                    2. DMA  Data Transfer                       2. DMA S>mQ>m Q´>m§g\$a
                        The group of wires carrying information     BÝ\$m°_}eZ bo OmZo dmbo dm`g© H$m g_yh {gñQ>_ ~g
                    is called System Bus. Normally, CPU is the bus  H$hbmVm h¡Ÿ& gm_mÝ`V`m ~g na Omo ^r S>mQ>m Q´>m§g\$a
                    master. That means when data is to be trans-  hmoVm h¡, dh CPU Ho$ {Z`§ÌU _| hmoVm h¡ Š`m|{H$ CPU
                    ferred between memory and the IO devices, it
                    must be under control of the CPU. But in some  hr ~g H$m ñdm_r hmoVm h¡Ÿ& bo{H$Z `{X h_|  A{YH$
                    data transfer the speed is reduced because of  OmZH$mar Q´>m§g\$a H$aZm h¡ Am¡a H$moB© JUZm Zht H$aZm
                    the involvement of the CPU. Therefore a data  h¡, Vmo EH$ Eogr VH$ZrH$ H$s Amdí`H$Vm hmoVr h¡ {Og_|
                    transfer technique is used in which IO devices  CPU ~rM _| Z AmE Am¡a grYo-grYo _o_moar VWm BZnwQ>-
                    directly  access  the memory and CPU  is  by-  AmCQ>nwQ> `wpŠV`m| _| S>mQ>m Q´>m§g\$a hmo& Eogr hr {d{Y H$mo
                    passed. This type of data transfer is called Di-
                    rect Memory Access (DMA) Data transfer. The  DMA (S>m`aoŠQ> _o_moar EŠgog) S>mQ>m Q´>m§g\$a H$hVo
                    main advantage  of DMA data transfer  is the  h¢Ÿ& Bg {d{Y _| CPU go {ZdoXZ H$aHo$ ~g H$m {Z`§ÌU
                    greater speed. It is useful when a bulk of data  bo {b`m OmVm h¡Ÿ&  CPU ~g  H$mo CÀM à{VamoY H$s
                    is transferred and no computation is needed.  AdñWm _| S>mb XoVm h¡ VWm grYo-grYo BZnwQ>-AmCQ>nwQ>
                    For example, data transfer between RAM and  `wpŠV`m| d _o_moar Ho$ _Ü` S>mQ>m H$m Q´>m§g\$a hmoVm h¡ &
                    Floppy disk, Hard disk or high speed printer.
                    When you have prepared a program. You want  BgH$m _w»` \$m`Xm `h h¡ {H$ `h EH$ A{YH$ J{V go
                    to save this program into hard disk. The pro-  H$m`© H$aZo dmbm S>mQ>m Q´>m§g\$a  hmoVm h¡Ÿ&  O¡go, hmS>©
                    gram must  be  directly  saved into Hard  disk  {S>ñH$, âbm°nr {S>ñH$ d ao_ Ho$ _Ü` S>mQ>m Q´>m§g\$a `{X
   407   408   409   410   411   412   413   414   415   416   417