What is DOS filter in hindi

Explain the following 

  1. DOS filter in Hindi. 
  2. Interrupts and interrupt service routine in Hindi.
  3. Redirection of I/O under DOS in Hindi.
  4. Interrupt vector table in PC in Hindi.
  5. Special interrupt in the PC in detail?

Table of contents (toc)

DOS filter

Introduction

यह filter वो जरूरी programme होता है जो input data stream को process करता है और procedure data को एक stream के रूप में provide करता है। इसमें input कई माध्यमों से प्राप्त किया जा सकता है तथा output भी कई destination तक जा सकता है। हर एक particular implimentation के लिए अलग अलग filters use किये जाते हैं।

Filters in Operating system

Filters एक तरह के program है जो input data stream को लेते हैं। उस पर कुछ process करने के लिए उपरांत  प्राप्त होने वाले data को stream में दे दिया जाता है। यहाँ input एक या उससे अधिक संभव stream के रूप में लिखा जाता है और output को एक या अधिक संभव stream के रूप में destination में भेजा सकता है। DOS में filter का concept standard input device में input लेने के लिए और standard output device में output लेने के लिए सीमित होता है। DOS में piping feature के द्वारा एक program के output को दूसरे program के input के रूप में उपयोग करने की सुविधा दी जाती है इस कार्य के लिए pipe sign (i) का use किया जाता है।

Types of filter in DOS

DOS में standard filter provide करता है जैसे - SORT, FIND और MORE.

SORT filter

इस filter में input device से data को read किया जाता है और sorting करके standard output device में लिख दिया जाता है। SORT [/R] [/+n] command के द्वारा standard ASC 2 sequence में sort किया जाता है। जहाँ n, z से पहले आता है। यदि /R switch दिया गया हो तो sorting reverse order में की जाती है। यदि /n switch उपस्थित हो तो यह बताता है कि sorting किस column से शुरू की जाती है। इसकी default value 1 होती है और यदि nन दिया हो तो sorting पहले column पर की जाती है।

Example

DIR SORT/R 
DIR SORT/+14

FIND Filter

इस filter के द्वारा command में दिए गए सभी files में बताये गए ASC 2 string को search किया जाता है और standard output device में ऐसे सभी lines को भेज दिया जाता है जो कि उस string को hold करती है।

     FIND[\V] [\C][IN] 'string'
     [{.t}] [path] [file name] {........File name.h}

यहाँ यदि \V उपस्थित हो तो ऐसी सभी lines होती है जिसमें संबंधित string उपस्थित न हो।

Example

FIND /N  "RAJU" (C: capital letter)
DIR FIND "collage"

MORE Filter

यह बहुत ही simple तथा useful filter है इसका use तब किया जाता है जब बहुत अधिक data output को manage किया जाता है। यह standard input device में MORE मैसेज के साथ display करता है। जब kb में कोई सा key press की जाती है जब next screenfull information display होती है। ऐसा तब तक होता है जब तक data output complete न हो जाए।

Example

MORE<abc.txt>
MORE<C: \WS\biodata.txt

The filter supplied with DOS

DOS standard filter SORT, FIND और MORE supply करता है जो directory user के द्वारा invoke किये जा सकते हैं।

इन filter के लिए कोई भी filter program या command line उस file या device को specify करती है जिसके द्वारा standard I/O device redirect होती है। यदि input monitor को output के लिए default choice की तरह use किया जाता है। Filter के साथ pipe (!) का use किया जाता है।

Interrupt service routine

कई बार यह आवश्यकता होती है कि ISR को किसी interrupt के लिए memory में DOS के साथ छोड़ दिया जाता है तो यह तब ही interrupt को execute किया जाता है जब वह program जिसके द्वारा ISR को load किया गया है वह रुक जाए। CPU के लिए interrupt asynchronous input होते हैं और उनका कोई भी combination किसी भी समय हो सकता है। Function को सही तरीके से कार्य करने के लिए ISR को लिखना होता है जिससे execution जल्द से जल्द हो सके। Asynchronous होने के कारण interrupt किसी भी क्रम में हो सकता है। इसलिए ISR में bug को प्राप्त करना कठिन होता है।
; Template for a typical service routine
  
 ISR - start 
                    push ds      ; save system context
                    push es      ; in local stack
                    push ax 
                    push bx
                    push cx
                    push dx
                    push bp 
                    push si
                    push di 
                    sti               ; renable interrupt
                     ;
                     ;

ISR को लिखते समय निम्न बातों का ध्यान देना होता है - 

  1. ISR के end में system से संबंधित जानकारियों को सही तरीके से save करना होता है जिससे उसका बाद में उपयोग किया जा सके।
  2. ऐसे भी interrupts को disable रखना होता है जो ISR में interface बन रहे हो परंतु दूसरे सभी interrupts enable होने चाहिए।
  3. यदि interface की स्थिति हो रही हो तो interrupt का कारण ज्ञात करना होता है।
  4. Interrupt को आवस्यकतानुसार service देना होता है।
  5. PIC को एक FoI signal भेजना होता है, जिससे सभी interrupt enable हो जाये।
  6. System से संबंधित जानकारी को pop करते हुए restore करना होता है और stock में पहले से store की गई volume को उपर्युक्त register में store करना होता है।
  7. ISR को IRET निर्देश से निर्देशित किया जाता है। PC में दूसरे सभी interrupt की तरह कुछ special interrupt उपस्थित होते हैं।

Redirection of I/O under DOS

DOS में redirection का उपयोग किया जाता है और यह handle type call के उपयोग से किया जाता है क्योकि handles com में जुड़े होते हैं। DOS के द्वारा जब command com को run किया जाता है तो निम्न पाँच handles को associate किया जाता है जिससे I/O के लिए तीन standard device का उपयोग किया जा सके।



जब कोई नया फ़ाइल या device open होता है तो DOS के द्वारा free handle को उसे दे दिया जाता है। जैसे ही DOS के द्वारा किसी command को प्राप्त किया जाता है तो सबसे पहले command.com को यह देखना होता है कि किसी input redirection को दिया गया है या नहीं।

इसे (<) symbol के द्वारा दर्शाते हुए file या device के नाम को देखा जा सकता है। इसके बाद किसी device में उपस्थित हो तो उसके द्वारा उस file या device को open किया जाता है। जिसमें redirection के बारे में बताया गया हो। इसके बाद redirection symbol (>) को command line में देखा जाता है और साथ ही destination file या device के नाम को देखा जाता है यदि इस प्रकार का redirection प्राप्त होता है तो command.com के द्वारा standard output के handle को close कर दिया जाता है और बताये गए device या file के लिए output handle को open कर दिया जाता है।

जब सभी redirection request पूरे हो जाते हैं तब command.com के द्वारा EXEC loader use किया जाता है ताकि specify किये गए program (i.e show) को load तथा execute किया जा सके। यहाँ show एक child program है जो command.com के सभी redirection को automatically inherit करता है।

Example

show<source.txt>dest.txt
show<ABC.txt>dest.txt

Interrupt vector table in PC

Intel 8088/8086 CPU के द्वारा interrupt को उसके type no. से ज्ञात किया जाता है। Software interrupt के लिए यहाँ instruction में स्वयं दिया जाता है। Internal hardware interrupt के लिए जो कि type 00 से 01H के बीच होते हैं। जिनमें NMI include होता है। CPU के द्वारा internally दिया जाता है। External hardware interrupt के लिए PIC के द्वारा CPU को interrupt type बताना होता है।

एक standard PC में interrupt source PC के interrupt request IRQ 00 से 01H के लिए interrupt type 08 से 0FH तक सीमित होता है।

Interrupt type को प्राप्त करने पर CPU के द्वारा memory space में interrupt vector table को देखा जाता है जो कि address 00000 से 03FFH में उपस्थित होते हैं और संबंधित interrupt का नंबर प्राप्त होता है।

Types of vector used by internal hardware interrupt


Software interrupt ROM-BIOS


Software interrupt DOS

Special interrupt in the PC

सामान्यतः personal computer में तीन प्रकार के interrupt होते हैं -
  1. The NMI interrupt (INT 01H)
  2. The clock interrupt
  3. The C or break interrupt

The NMI interrupt (INT 01H)

यह एक non-moveable interrupt है जिसे disable नहीं किया जा सकता है। 

PC में इसका use दो कारणों से होता है-

  1. RAM, read करते समय priority error को check करता है।
  2. यदि co-processor उपस्थित हो तो उसके साथ interface बनाना।
कुछ PC में user के द्वारा इस line का उपयोग PC में उपस्थित I/O check line के द्वारा भी करने की सुविधा दी गयी है। यदि user I/O check के द्वारा NMI interrupt का  उपयोग करना चाहता है तो उपर्युक्त ISR को इस प्रक्रिया के लिये insert करना होता है। NMI interrupt अधिक कठिन और unusable होता है। User के द्वारा उसमें किसी भी प्रकार का अंतर आ जाता है। यदि interrupt vector में किसी भी प्रकार का modification किया जाना हो तो उसके लिए INT 21H Function का use किया जाना चाहिए।

The Clock interrupt

इस interrupt को system 8253 timer counter प्राप्त करने पर output के द्वारा trigger किया जाता है। Counter 0 से प्राप्त होने वाला output TRQ.o output पर एक interrupt controller का input होता है और यह प्रत्येक 54.936 ms में interrupt को mederate करता है यह interrupts को execute करता है और service routine के द्वारा time ऑफ day record को update किया जाता है। इसके बाद यह check करता है कि diskette drive ON या OFF है और यदि वह ON होता है तो उसे shut OFF कर दिया जाता है। उसके बाद software की सहायता से INT/CH को कॉल किया जाता है। इसमें interrupt के संबंध में vector के द्वारा ऐसे location को point किया जाता है। 

इस प्रकार के कार्य के लिए संबंधित ROM-BIOS service का उपयोग किया जाता है। यूजर के द्वारा स्वयं clock को भी maintain किया जा सकता है और इसके लिए INT/EH में routine लिखना होता है। परंतु यह routine इतना अधिक बड़ा नहीं होना चाहिए कि इसके द्वारा PC के time information को interrupt किया जा सके।

The C or break Interrupt

Ctrl-C को control break के द्वारा PC keyboard से interrupt के रूप में कॉल किया जाता है। जब कभी DOS के द्वारा Nc character को प्राप्त किया जाता है तो DOS ऐसे routine को execute करता है जिसका segment और offset vector table में store हो और यह handler को दिया जाता है और जा रहे कार्य को रोकते हुए control को parent program में लौटा देता है। ऐसे programs जो कि command.com से call किये गए हों उसके लिए इसके द्वारा एक command level को return किया जाता है। DOS के द्वारा सामान्यतः Ctrl-C की checking को करने के लिए function 33H INT 21H की सहायता से flag को check कर दिया जाता है, जिसके कारण DOS को प्रत्येक input या output operation Nc की checking करनी होती है।

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !