You are on page 1of 24

DOS Its Components and Loading

WHAT DOS EXACTLY IS

DOS is short for Disk Operating System an a!ronym for se"era# !#ose#y re#ated operating systems that dominated the market $et%een &'(& and &'')* Ear#y "ersions of +i!rosoft Windo%s ran on top of a separate "ersion of DOS* With Windo%s ') and fo##o%ing OSs the +S,DOS kerne# remained $-t %ith Windo%s as the system.s graphi!a# she##* A"ai#a$#e DOS systems in /0&/ are 1reeDOS D2,DOS 2O+,DOS 3TS,DOS 24DOS and 2EAL56/*

The str-!t-re of DOS

The str-!t-re of Disk Operating System for I7+ 3C,!ompati$#e !omp-ters !an $e $roken do%n into fo-r distin!t !omponents8 7IOS +od-#e 9erne# Command 3ro!essor E4terna# Commands

9E2:EL
i5o re; pa!kets

7IOS

Commands to

Hard%are Contro##ers

7IOS

Spe!ifi! to !omp-ter system 3ro"ided $y man-fa!t-rer 2ead into 2A+ as a part of IO*SYS d-ring initia#isation 2esident dri"ers 7-i#t into 7IOS Insta##a$#e dri"ers insta##ed d-ring initia#isation $y DE<ICE !ommands in CO:1I=*SYS fi#e

/* The DOS 9erne#

The DOS kerne# !omponents are !ontained in the +SDOS*SYS >or I7+DOS*CO+? system fi#e* 3rograms !omm-ni!ate %ith the kerne# "ia soft%are interr-pts*

Imp#ements +S,DOS as seen $y app#i!ation programs* 9erne# @ spe!ifi! program


=i"en $y +S Corporation =i"es a !o##e!tion of hard%are independent ser"i!es Ser"i!es @ system f-n!tions #ike 1i#e and re!ord management +emory management Chara!ter de"i!e inp-t5o-tp-t Spa%ning other programs A!!ess to rea#,time !#o!k

6* The Command 3ro!essor

Aser.s interfa!e to the operating system* 2esponsi$#e for parsing and !arrying o-t -ser !ommands* The defa-#t she## that is pro"ided %ith +S, DOS is fo-nd in a fi#e !a##ed CO++A:D*CO+*

CO++A:D*CO+

CO++A:D*CO+ is :OT the operating system $-t simp#y a spe!ia# !#ass of program r-nning -nder the !ontro# of +S,DOS* Can $e rep#a!ed %ith a she## of the programmer.s o%n design $y simp#y adding a SHELL dire!ti"e to the system, !onfig-ration fi#e>CO:1I=*SYS? on the system start-p disk e4* CO++A:D,3LAS from ES3 Systems* Three parts8

A resident portion An initia#iBation se!tion A transient mod-#e

2ESIDE:T 3O2TIO:

This part of CO++A:D*CO+ iss-es error messages and is responsi$#e for the fami#iar prompt

The 2esident portion a#so !ontains the !ode re;-ired to re#oad the transient portion of CO++A:D*CO+ %hen ne!essary*

I:ITIALISATIO: SECTIO:

#oaded a$o"e the resident portion %hen the system is started* It pro!esses the AATOEXEC*7AT $at!h fi#e >the -ser.s #ist of !ommands to e4e!-te at system start-p?

THE T2A:SIE:T 3O2TIO:

#oaded at the high end of memory and its memory !an a#so $e -sed for other p-rposes $y app#i!ation programs* iss-es the -ser prompt reads the !ommands from the key$oard or $at!h fi#e and !a-ses them to $e e4e!-ted* When an app#i!ation program terminates the resident portion of CO++A:D*CO+ does a !he!ks-m of the transient mod-#e to determine %hether it has $een destroyed and fet!hes a fresh !opy from the disk if ne!essary*

The -ser !ommands that are a!!epted $y CO++A:D*CO+ fa## into three !ategories8

Interna# !ommands E4terna# !ommands 7at!h fi#es

I:TE2:AL 5 I:T2I:SIC !ommands

Carried o-t $y !ode em$edded in CO++A:D*CO+ itse#f* CO3Y 2E:>A+E? DI2>ECTO2Y? and DEL>ETE?* The ro-tines for the interna# !ommands are in!#-ded in the transient part of CO++A:D*CO+*

E4terna# 5 EXT2I:SIC !ommands 5 T2A:SIE:T 32O=2A+S

Are the names of programs stored in disk fi#es* 7efore these programs !an $e e4e!-ted they m-st $e #oaded from the disk into the transient program area >T3A? of memory* CH9DS9 7AC9A3 and 2ESTO2E* As soon as an e4terna# !ommand has !omp#eted its %ork it is dis!arded from memoryC hen!e it m-st $e re#oaded from disk ea!h time it is in"oked*

7ATCH 1ILES

are te4t fi#es that !ontain #ists of other intrinsi! e4trinsi! or $at!h !ommands* These fi#es are pro!essed $y a spe!ia# interpreter that is $-i#t into the transient portion of CO++A:D*CO+* The interpreter reads the $at!h fi#e one #ine at a time and !arries o-t ea!h of the spe!ified operations in order*

Let -s re"isit the s#ide that said something a$o-t 7ATCH fi#e no%*

I:ITIALISATIO: SECTIO:

#oaded a$o"e the resident portion %hen the system is started* It pro!esses the AATOEXEC*7AT $at!h fi#e >the -ser.s #ist of !ommands to e4e!-te at system start-p?

In order to interpret a -ser.s !ommand CO++A:D*CO+ first #ooks to see ifthe -ser typed the name of a $-i#t,in >intrinsi!? !ommand that it !an !arry o-t dire!t#y* If not it sear!hes for an e4terna# !ommand>e4e!-ta$#e program fi#e? or $at!h fi#e $y the same name* The sear!h is !arried o-t first in the !-rrent dire!tory of the !-rrent disk dri"e and then in ea!h of the dire!tories spe!ified in the most re!ent 3ATH !ommand* In ea!h dire!tory inspe!ted CO++A:D*CO+ first tries to find a fi#e %ith the e4tension *CO+ then *EXE and fina##y *7AT*

If the sear!h fai#s for a## three fi#e types in a## of the possi$#e #o!ations CO++A:D*CO+ disp#ays the fami#iar message

If a *CO+ fi#e or a *EXE fi#e is fo-nd CO++A:D*CO+ -ses the +S,DOS EXEC f-n!tion to #oad and e4e!-te it* The EXEC f-n!tion $-i#ds a spe!ia# data str-!t-re !a##ed a program segment prefi4 >3S3? a$o"e the resident portion of CO++A:D*CO+ in the transient program area* The 3S3 !ontains "ario-s #inkages and pointers needed $y the app#i!ation program* :e4t the EXEC f-n!tion #oads the program itse#f D-st a$o"e the 3S3 and performs any re#o!ation that may $e ne!essary* 1ina##y it sets -p the registers appropriate#y and transfers !ontro# to the entry point for the program*

When the transient program has finished its Do$ it !a##s a spe!ia# +S,DOS termination f-n!tion that re#eases the transient program.s memory and ret-rns !ontro# to the program that !a-sed the transient program to $e #oaded >CO++A:D*CO+ in this !ase?* A transient program has near#y !omp#ete !ontro# of the system.s reso-r!es %hi#e it is e4e!-ting* The on#y other tasks that are a!!omp#ished are those performed $y interr-pt hand#ers >s-!h as the key$oard inp-t dri"er and the rea#,time !#o!k? and operations that the transient program re;-ests from the operating system* +S,DOS does not s-pport sharing of the !entra# pro!essor among se"era# tasks e4e!-ting !on!-rrent#y nor !an it %rest !ontro# a%ay from a program %hen it !rashes or e4e!-tes for too #ong*

Comparison $et%een +S,DOS and Lin-4 >&? Lin-4 is a f-##,f#edged m-#ti-ser m-#titasking operating system %hereas +S,DOS is a sing#e,-ser sing#e,tasking operating system* >/? +S,DOS does not ha"e $-i#t,in se!-rity !on!epts s-!h as fi#e,o%nership and permissions %hi!h are f-ndamenta# to Lin-4* >6? Lin-4 has an in"erted tree,#ike fi#esystem in %hi!h a## dire!tories and fi#es $ran!h from a sing#e dire!tory i*e* the root dire!tory and its s-$dire!tories* +S,DOS !an ha"e m-#tip#e independent root dire!tories s-!h as A8 C8 D8 et!* >E? Lin-4 -ses for%ard s#ashes F5F to separate dire!tories %hereas +S,DOS -ses $a!ks#ashes FGF for the same p-rpose* >)? Lin-4 fi#enames !an !ontain -p to /)) !hara!ters* +S,DOS fi#enames are #imited to an eight !hara!ters p#-s a three,!hara!ter e4tension and ha"e restri!tions on a##o%a$#e !hara!ters* A#so fi#enames are !ase,sensiti"e in Lin-4 %hereas they are not in +S,DOS* >H? Lin-4 has a "ast#y ri!her !ommand set than does +S,DOS %ith a m-!h greater n-m$er of !ommands and indi"id-a# !ommands ha"ing greater po%er f#e4i$i#ity and ease of -se* Commands are !ase,sensiti"e in Lin-4 $-t they are not in +S,DOS* >I? A#tho-gh Lin-4 and +S,DOS $oth ha"e pipes and inp-t5o-tp-t redire!tion the +S,DOS pipes -se a !omp#ete#y different ,, and inferior ,, imp#ementation* >(? +S,DOS is not s-ffi!ient#y f#e4i$#e and effi!ient to ser"e as a $ase for a high ;-a#ity genera#,p-rpose =AI >and th-s it had to $e a$andoned $y +i!rosoft?* In sharp !ontrast Lin-4 is an e4!e##ent $ase for a =AI >and it is -sed as a $ase for the X Windo% System %hi!h is e4treme#y !onfig-ra$#e and %hose a#ready e4!e##ent performan!e !ontin-es to impro"e?*

You might also like