DOS Structure and Booting

Download Report

Transcript DOS Structure and Booting

An operating system is an interface between the hardware
and the software and the user to communicate with each
other. MS-DOS stands for Microsoft Disk Operating
System, is one of the powerful operating systems. DOS
basically works as an interpreter to provide an interface
between hardware and programs/software. It also controls
the overall operations of the computer system and the flow of
data etc. as other operating systems do. MS DOS is a single
user operating system. It uses a command line interface i.e. to
perform specific tasks, you need to type command. Basically
command line interface Is a mechanism for interfacing with
the computer operating system by typing commands only.
Introduction To MS-DOS
The DOS operating system is a program which is
loaded in the computer memory normally called as
floppy disk. The architecture of MS-DOS consists of
three main files. The files are also known as system
files. These files are
(a) IO.SYS
(b) MS-DOS
© COMMAND.COM
Structure Of MS-DOS
(a)
IO.SYS (Input Output System) :This is the system file which manages the input output
attached to the computer. Basically this system file is
divided into two portions , first portion of IO.SYS controls
the operations of input output devices and second portion
which is also known as SYS.INI loads the MSDOS.SYS
from the hard disk to main memory and stays in the
memory till the power is switched on.
b) MSDOS. :- MS-DOS is also known as DOS Kernel. It acts
like a policeman who controls the various activities of the
system. Basically it acts as a link between the BIOS (Basic InputOutput Services) and the application programs being run by the
computer user. It contains all the modules for process management
which are written in machine language so that they could be easily
ported. It performs four basic functions.
(1) Process Control :- MS-DOS is responsible for loading the
program from the disk into memory requested by the user and also
recovers system files when unwanted termination occurs.
(2) Memory Management :- It allocates the memory to different
application programs and also does file allocation if demanded.
(3) File Management :- File management like reading,
writing, renaming, copying and removing the files is
done by this command.
(4) Application Program Interface :- It provides an
interface between the user and the hardware. Using this,
if programmer has knowledge of hardware, he/she can
directly write programs.
c ) Command.Com :- The command.com is the main operating
system program that acts as an interface between the user and
the system. The commands we give to the system are received
by command.com and the translated into the language
understandable by the system. The MS-DOS shell is known as
command.com which provides a command line interface.
Command.com has two portions as :(a) Resident Portion :- DOS is first loaded into the Resident
Portion of memory and stays there all the time from the
switching on till switch off the computer. It can only be
interrupted by Ctrl+C. It contains code required to reload the
transient portion of Command.com.
(b) Transient Portion :- It is the temporary portion of the
command.com can be erased if memory is required by
application program due to less or shortage of memory. The
Transient portion displays the DOS prompt like A:\> , B:\>
and C:\> and it reads commands from keyboard and executes
those commands.
1. BOOTSTRAP:-The term boot is short for bootstrap. With
the power off , a computer is a dead hunk of silicon, steel, and
wires. During the boot process , it has to wake up, find all of
its peripherals , and configure itself to run software . It takes
some doing to make all of this happen .
SOME DOS RELATED TERMS
2. THE DOS BOOT PROCESS:- When DOS was first used by
IBM for its personal computers , the OS system was called
PC-DOS , and IBM gave certain names to the files that made
them sound like IBM-specific files. But as soon as clone
makers (e.g. Compaq, Dell) starting making IBM compatible
clone computers, Microsoft released a clone Version called
MS-DOS, and renamed some of those files. Now MS-DOS is
much more widely used than PC-DOS and MS-DOS names
are more common.
Booting
When we start our Computer then there is an
operation which is performed automatically by the
Computer which is also called as Booting. In the
Booting, System will check all the hardware’s and
Software’s those are installed or Attached with the
System and this will also load all the Files those are
needed for running a system. In the Booting Process
all the Files those are Stored into the ROM Chip will
also be Loaded for Running the System.
In the Booting Process the System will read all
the information from the Files those are Stored into
the ROM Chip and the ROM chip will read all the
instructions those are Stored into these Files. After
the Booting of the System this will automatically
display all the information on the System. The
Instructions those are necessary to Start the System
will be read at the Time of Booting.
There are mainly two types of Booting:
(1)
(2)
Cold Booting (Switch Booting)
Hot Booting (Warm booting)(Resetting)
1. Cold Booting:
When the PC is switched on, it loads the Bootable
DOS program from the disk to the memory. This type
of Booting of the computer is a slow process. It can
be done only from the ON/OFF switch button on the
cabinet and so called as Switch Booting.
2. Hot Booting (warm booting)
This is also called Warm Booting. It is faster than
cold booting. If computer “Hangs” or halts or crashes
due to some reason, it may be necessary to reset it
either by pressing Reset Button from the cabinet or
by pressing Ctrl+Alt+Del keys from the keyboard
simultaneously. The computer restarts and the
booting of this type from Keyboard keys or Reset
button is called Hot Booting. It is also called
Resetting or Reinitialization.
Pipes and Redirection
A number of Dos commands send output to the
screen and/or require input from the user. Redirection
is a mechanism whereby the output of a command
can be fed either to some other device (e.g. a printer
or file) or to another program or command.
There are four redirection functions:
(1) >
Redirect output
(2) >> Append
(3) <
Redirect input
(4) |
Pipe
(1) > (Redirect output)
Redirects a command's output from the "standard
output device" (usually the monitor) to another
device (e.g. printer) or a file.
Syntax:
To redirect output to a device:
Command > Device
To redirect output to a file:
Command > Filename
(2) >> (Append)
Appends the output from a command to the
specified file.
Syntax:
Command >> Filename
(3) < (Redirect input)
Directs input to a command from a source other
than the default (the default source usually being
the keyboard).
Syntax:
Command < Datasource
(4)
| (Pipe)
The "pipe" redirects the output of a program or
command to a second program or command.
Syntax:
Command1 | Command2
What is Batch File
A batch file is a file containing a series of commands that the
operating system will carry out for you, one at a time. A batch
file is a collection of DOS commands. MS-DOS batch files
consist of the normal operating system commands (e.g. DIR,
DEL, COPY and MKDIR) together with some extra
commands such as IF, FOR, GOTO, SHIFT and PAUSE that
provide conditional control of execution and enable
PARAMETERS to be passed so that the same batch file can
be used in many different contexts.
A batch file, such as WP.BAT, ends with the letters .BAT.
When the user types in the name of a batch file and
presses Enter at the DOS prompt, the commands in that
batch file are performed one at a time-with no additional
instructions from the user. For example, if the user typed
WP and pressed Enter, WordPerfect (a popular word
processing program) would start.
A user can create a batch file to perform any
routine task. For example, a batch file could be created to
prepare a disk for use (a process called formatting). Because
the commands are in a batch file, the user doesn't have to type
them herself, or even remember what they are-all the user
would have to do is type the name of this batch file to format a
disk.
The most important batch file is the AUTOEXEC.BAT. This
file contains commands that are performed automatically each
time the PC is turned on or restarted. Typical AUTOEXEC
BAT commands include those which change the system
prompt, display the current date and time, and set the
directories in which DOS looks for files.
Other than the internal and external DOS
commands the batch file has their own commands. Some
commonly used batch file commands are:
1. REM (Remark)- used for comments
2. PAUSE- to pause the execution of batch file and waits until
user press a key
3. ECHO- to on/off the text display on the screen
4. CALL- calls specified batch file, execute it and returns to the main file.
Example of Batch File:
C:\>EDIT SAT.BAT
type the following in DOS editor:
CLS
DATE
TIME
VER
VOL
LABEL D:
Press ctrl+z to save the file