DOS- Disk Operating System By: Prof.M.B.Salunke Asst. Prof., Department of Computer Engg, SITS,...

21
DOS- Disk Operating System By: Prof.M.B.Salunke Asst. Prof., Department of Computer Engg, SITS, Pune-41

Transcript of DOS- Disk Operating System By: Prof.M.B.Salunke Asst. Prof., Department of Computer Engg, SITS,...

Page 1: DOS- Disk Operating System By: Prof.M.B.Salunke Asst. Prof., Department of Computer Engg, SITS, Pune-41.

DOS- Disk Operating System

By: Prof.M.B.Salunke

Asst. Prof., Department of Computer Engg,

SITS, Pune-41

Page 2: DOS- Disk Operating System By: Prof.M.B.Salunke Asst. Prof., Department of Computer Engg, SITS, Pune-41.

Contents

• Internals of DOS,

• DOS loading,

• DOS memory map,

• Concepts of TSR,

Page 3: DOS- Disk Operating System By: Prof.M.B.Salunke Asst. Prof., Department of Computer Engg, SITS, Pune-41.

The structure of DOS

• Three layers are:– The BIOS (Basic Input/Output System)– The DOS kernel– The command processor (shell)

Page 4: DOS- Disk Operating System By: Prof.M.B.Salunke Asst. Prof., Department of Computer Engg, SITS, Pune-41.

The BIOS Module• Specific to the individual computer system and is provided

by the manufacturer of the system. • It contains the default resident hardware-dependent drivers

for the following devices:– Console display and keyboard (CON)– Line printer (PRN)– Auxiliary device (AUX)– Date and time (CLOCK$)– Boot disk device (block device)

• MS-DOS kernel sends I/O request packets to these device drivers; the drivers translate these requests into the proper commands for the various hardware controllers.

Page 5: DOS- Disk Operating System By: Prof.M.B.Salunke Asst. Prof., Department of Computer Engg, SITS, Pune-41.

The BIOS Module continued…

• In many MS-DOS systems, the most primitive parts of the hardware drivers are located in read-only memory (ROM) so that they can be used by stand-alone applications, diagnostics, and the system startup program.

• The terms resident and installable are used to distinguish between the drivers built into the BIOS and the drivers installed during system initialisation by DEVICE commands in the CONFIG.SYS file.

• The BIOS is read into random-access memory (RAM) during system initialisation as part of a file named IO.SYS.

Page 6: DOS- Disk Operating System By: Prof.M.B.Salunke Asst. Prof., Department of Computer Engg, SITS, Pune-41.

The DOS Kernel

• The kernel is a proprietary program and provides a collection of hardware-independent services called system functions.

• These functions include the following:– File and record management

– Memory management

– Character-device input/output

– Spawning of other programs

– Access to the real-time clock

Page 7: DOS- Disk Operating System By: Prof.M.B.Salunke Asst. Prof., Department of Computer Engg, SITS, Pune-41.

The DOS Kernel continued…

• Programs can access system functions by loading registers with function-specific parameters and then transferring to the operating system by means of a software interrupt.

• The DOS kernel is read into memory during system initialization from the MSDOS.SYS file on the boot disk. (The file is called IBMDOS.COM in PC-DOS.) This file is marked with the attributes hidden and system.

Page 8: DOS- Disk Operating System By: Prof.M.B.Salunke Asst. Prof., Department of Computer Engg, SITS, Pune-41.

The Command Processor

• The command processor, or shell, is the user's interface to the operating system. It is responsible for parsing (describing) and carrying out user commands, including the loading and execution of other programs from a disk or other mass-storage device.

• The default shell that is provided with MS-DOS is found in a file called COMMAND.COM. It is a special class of program running under the control of MS-DOS.

Page 9: DOS- Disk Operating System By: Prof.M.B.Salunke Asst. Prof., Department of Computer Engg, SITS, Pune-41.

More about COMMAND.COM• Default MS-DOS shell, COMMAND.COM, is divided

into three parts:– A resident portion– An initialization section– A transient module

• The resident portion is loaded in lower memory, above the DOS kernel and its buffers and tables. It contains the routines to process Ctrl-C and Ctrl-Break, critical errors, and the termination (final exit) of other transient programs. This part of COMMAND.COM issues error messages and is responsible for the familiar promptAbort, Retry, Ignore?

• The resident portion also contains the code required to reload the transient portion of COMMAND.COM when necessary.

Page 10: DOS- Disk Operating System By: Prof.M.B.Salunke Asst. Prof., Department of Computer Engg, SITS, Pune-41.

More about COMMAND.COM continued…

• The initialization section of COMMAND.COM is loaded above the resident portion when the system is started.

• It processes the AUTOEXEC.BAT batch file (the user's list of commands to execute at system startup), if one is present, and is then discarded.

Page 11: DOS- Disk Operating System By: Prof.M.B.Salunke Asst. Prof., Department of Computer Engg, SITS, Pune-41.

More about COMMAND.COM continued…

• The transient portion of COMMAND.COM is loaded at the high end of memory, and its memory can also be used for other purposes by application programs.

• The transient module issues the user prompt, reads the commands from the keyboard or batch file, and causes them to be executed.

• When an application program terminates, the resident portion of COMMAND.COM does a checksum of the transient module to determine whether it has been destroyed and fetches a fresh copy from the disk if necessary.

Page 12: DOS- Disk Operating System By: Prof.M.B.Salunke Asst. Prof., Department of Computer Engg, SITS, Pune-41.

User Commands

• The user commands that are accepted by COMMAND.COM fall into three categories:

• Internal commands

• External commands

• Batch files

Page 13: DOS- Disk Operating System By: Prof.M.B.Salunke Asst. Prof., Department of Computer Engg, SITS, Pune-41.

DOS Loading

• When system starts/reset program execution begins at an address FFFF0H, which lies within ROM area, containing a jump instruction to system test code and the ROM bootstrap routine,

• ROM bootstrap routine reads the disk bootstrap routine from the boot sector of the system startup disk into memory at some arbitrary address,

• And then transfers control to it.

Page 14: DOS- Disk Operating System By: Prof.M.B.Salunke Asst. Prof., Department of Computer Engg, SITS, Pune-41.

DOS Loading Continued….

• The disk bootstrap routine checks for MS-DOS, by checking first two files from first sector of root directory.

• If not found user is prompted to change disk, and strike any key to try again.

• If found, both files will be read into memory by disk bootstrap routine and transfers controls to the initial entry point of IO.SYS.

Page 15: DOS- Disk Operating System By: Prof.M.B.Salunke Asst. Prof., Department of Computer Engg, SITS, Pune-41.
Page 16: DOS- Disk Operating System By: Prof.M.B.Salunke Asst. Prof., Department of Computer Engg, SITS, Pune-41.
Page 17: DOS- Disk Operating System By: Prof.M.B.Salunke Asst. Prof., Department of Computer Engg, SITS, Pune-41.

DOS Loading Continued….

• IO.SYS consists of two separate modules

– BIOS: containing the linked set of resident device drivers,

– SYSINIT: Supplied by Microsoft and linked into the IO.SYS file, along with the BIOS by the computer manufacturer.

• SYSINIT is called by BIOS initialisation code,

• Determines the contiguous memory present in the system and then relocates itself to high memory,

• Then it moves the DOS kernel, MS-DOS.SYS, from its original load location to its final location, overlaying the original SYSINIT code and any other expendable initialisation code of IO.SYS

Page 18: DOS- Disk Operating System By: Prof.M.B.Salunke Asst. Prof., Department of Computer Engg, SITS, Pune-41.

DOS Loading Continued….

• SYSINIT, next calls the initialisation code in MSDOS.SYS,

• DOS kernel initailises its internal tables and work areas, sets up the interrupt vectors 20H through 2FH, and traces through the linked list of resident device drivers, calling the initialisation function for each.

• These driver functions determine the equipment status, preform any necessary hardware initialisation, and set up the vectors for any external hardware interrupts the driver will service.

Page 19: DOS- Disk Operating System By: Prof.M.B.Salunke Asst. Prof., Department of Computer Engg, SITS, Pune-41.
Page 20: DOS- Disk Operating System By: Prof.M.B.Salunke Asst. Prof., Department of Computer Engg, SITS, Pune-41.
Page 21: DOS- Disk Operating System By: Prof.M.B.Salunke Asst. Prof., Department of Computer Engg, SITS, Pune-41.

Contact Details:Email: [email protected]: microsig.webs.com