Computer 11 Notes for Computer Notes

Posted on • Updated on

Disk Operating System (DOS)

Introduction to disk operating system

When the computer starts, it starts the operating system that takes the control of the machine. An Operating System is a set of programs that help in controlling and managing the Hardware and the Software resources of a computer system. A good operating system should have the following features:

  1. Help in the loading of programs and data from exter­nal sources into the internal memory before they are executed.
  2. Help programs to perform input/output operations, such as:
  • Print or display the result of a program on the printer or the screen.
  • Store the output data or programs written on the comput­er in storage device.
  • Communicate the message from the system to the user through the VDU.
  • Accept input from the user through the keyboard or mouse.


At the end of this lesson, you would be able to:

  • Explain the concept operating system
  • Discuss the functions of operating system
  • Understand the procedures of loading operating system into the memory
  • Use file management features of operating system
  • Create separate locations for logically related files
  • Copy files from one computer to another
  • Use Windows for File Management

Disk operating system

As the name suggests, the operating System is used for operating the system or the computer. It is a set of computer programs and also known as DOS (Disk Operating System). The main functions are to manage disk files, allocate system resources according to the requirement. DOS provides features essential to control hardware devices such as keyboard, screen, disk devices, printers, modems and programs.
Basically, DOS is the medium through which the user and external devices attached to the system communicate with the system. DOS translate the command issued by the user in the format that is understandable by the computer and instruct computer to work accordingly. It also translates the result and any error message in the format for the user to understand.

1. Loading of DOS
The BOOT Record into the computer memory loads DOS (Disk Operating System). BOOT Record in turn is triggered by ROM program already there in the computer.
The system start-up routine of ROM runs a reliability test called Power On Self Test (POST) which initializes the chips and the standard equipment attached to the PC, and check whether periph­erals connected to the computer are working or not. Then it tests the RAM memory. Once this process is over, the ROM bootstrap loader attempts to read the Boot record and if successful, passes the control on to it. The instructions/programs in the boot record then load the rest of the program. After the ROM boot strap loader turns the control over to boot record, the boot tries to load the DOS into the memory by reading the two hidden files IBMBIO.COM and IBMDOS.COM. If these two are found, they are loaded along with the DOS command interpreter COMMAND.COM. COMMAND.COM contains routines that interpret what is typed in through the keyboard in the DOS command mode. By com­paring the input with the list of command, it acts by executing the required routines/commands or by searching for the required routine utility and loads it into the memory.

Computer files in DOS
A file may contain a program or any other kind of information. Generally, a file must be given a name that can be used to iden­tify it. DOS (Disk Operating System) permits the user to assign a name consisting of two parts to a file – primary and secondary names. Primary name can be of a maximum of eight characters consisting of Characters, Alphabets, Number and Hyphen), and the Secondary name should consist of three characters, which is optional. The primary name and the secondary (or extension) name, if any, are to be separat­ed by a dot (.).
Primary name can be linked to proper name, whereas extensions are like surnames of people. Using an exten­sion with the file name is preferable, though optional. However, once the extension is specified, using the complete name (primary name and extension, with the period separating them can only refer the file). Using extensions can be an excellent way of naming a file so that it can be identified easily.

DOS (Disk Operating System) has a way of showing which disk drive is currently active. The floppy disk drives are assigned alphabets A and B, whereas the hard disk drive is assigned the alphabet C. If your PC has a single floppy drive, the drive would be A and if it has two, they would be termed as A and B. If your PC includes a hard disk, besides a FDD (Floppy Disk Drive), the drive names would be A and C. If the prompt is A, then it implies that the first floppy disk drive is active. Where as the DOS prompt would be C, if the hard disk is active. Data as well as instructions reside in a file stored in a disk.

Directory structure in DOS
The files in the computer come from various sources. Some files come with DOS, while other come with publications such as a word processor. These files contain codes and other information that is necessary to make the computer application operational. Before long, there will be hundreds or even thousands of files in the computer, which can make it diffi­cult to locate specific files.
The names of all the files created in a disk are stored in its directory. Directory is just like a file folder, which contain all the logically related files. DOS files are organized in a hierarchical or an inverted tree-like structure. The general analogy is with a file cabinet containing a number of drawers, which in turn may contain folders. The content of these folders is the needed information.
The file cabinet here is the ROOT DIRECTORY, the drawer is INDIVIDUAL DIRECTORY, the folders are SUBDIRECTORYand the informa­tion in these folders may in turn be classified as FILES.
Otherwise, the large number of files that get created for var­ious purposes in a disk can make the directory huge and difficult to view and manage. Therefore, DOS enables the user to organize the files in a disk into directories and sub-directories in a hierarchical structure. Directories can contain other directo­ries. A directory within another directory is called a sub-directory.
Of course, there may be sub-directories of sub-directories, but a file name is the furthest you may descend down the (inverted) tree of directories and files. Thus, a file name corresponds to a tree leaf, a sub-directory to a branch, the directory to the trunk, and the root directory to the root of the tree, hence the name ROOT DIRECTORY.
Command.com (Personal) Autoexec.bat (Accounts) Pk.bat LEAVE INSURANCE GPF PENSION LOAN
The directory/sub-directory is represented in bold letters.

Directory command
The content of each of the sub-directory cannot be viewed unless it is made active, or a sub-directory is specified as part of the DIR command. Doing either of these requires an understanding of the concepts of navigating around the disk.
The directory, the user is in at any point of time, is called the WORKING/PRESENT/CURRENT directory. DOS indicates which direc­tory you are in by displaying the directory’s name in the command prompt. For example, the following command prompt indicate that you are in the DOS directory: C:DOS>. Knowing which directory is current helps you find files, and to move from one directory to another more easily. Typically, the ROOT DIRECTORY () is the initial working directory. The entire specification of directory from root is called a PATH. By itself, the DIR command is applicable to the working/present directory. The names of the sub-directories at adjacent levels are separated by backslash (), while specifying the path to be followed while traveling to a sub-directory.

Using path to specify the location of files
A path is the route that leads from the root directory of a drive to the file you want to use.
For example, to access the NOS.LET file in the LETTER subdirecto­ry of NOS directory, DOS must go from the ROOT () directory through the NOS directory to the LETTER directory.
To specify the same path at the command prompt, you would type it as shown in the following illustration:
This is the path or route to the file NOS.LET. The first letter and the colon (C:) represent the drive the file is on. The first back­ slash () represents the root directory. The second backslash separates the NOS directory from the LETTER sub-directory. The third backslash separates the LETTER sub-directories from the file name, NOS.LET.
Note: MS-DOS recognizes path up to 67 characters long (including the
Drive letter, colon, and backslash).

DIR command
The DIR command gives the list of is there on the disk that is mounted on the active drive.
Syntax : C:> DIR A:> DIR
Volume in drive A has no label
Directory of A:
COMMAND COM 23612 10-20-88 11.30a
DISKCOPY COM 4235 10-20-88 12.00p
FORMAT COM 15780 03-12-89 12.00p
3 file(s) 325013 bytes free
As can be seen, on typing DIR followed by key at DOS prompt, five columns of data followed by the number of files and bytes that are free in the disk are displayed. The first column con­tains the primary name of each file resident on the disk. Howev­er, most files are named with an extension, which appear in the second column. Whereas, the third column contains the size of the file in bytes, and the fourth and fifth columns show the date and time on which the files was created or last modified. The last line displays the number of file(s) and remaining disk space free in bytes. It is important to note that the DIR command only displays the names of the files and not their contents.

Changing a directory
All the names displayed using DIR command that have
be­sides them are directories. You can see the list of files in another directory by changing to that directory and then using the DIR command again.
The Change Directory (CHDIR) or CD command enables the user to travel around the directories in a disk. Type the CD command at the command prompt.
A:> CHDIR {path} or a:> CD {path}
Examples : (Refer to the figure)
1. A:>CD NOS
This command makes the NOS sub-directory under the root directory () active.
The backslash indicates the root, and LETTERS, which is a sub-directory under the NOS directory, becomes the working directory.
3. A:> CD
The root directory becomes the working directory; i.e. you will change back to the root or main directory. The slash typed in this command is a backslash (). No matter which directory you are in, this command always returns you to the root directory of a drive. The root directory does not have a name, it is simply referred to by a backslash ().

Making or creating directory
As the number of files increases in a disk, a need is felt to organize them in a meaningful way by creating sub-directories to store a group of logically related/similar files.
To create a directory, DOS provides the MKDIR (Make Directory) or MD command.
A:>MKDIR [drive:] {pathname} or A:>MD [drive:] {pathname}
Square brackets indicate that [drive:] entry is optional.
The MD or MKDIR command creates a new empty directory whose name is the last item specified in the pathname, in the specified drive. If active, the drive need not be specified. If the direc­tory is to be created as a sub-directory of the working directory on the active drive, typing MD {directory name} at the DOS prompt or command prompt is sufficient.
makes a SALARY directory in the: drive, under ACCT directo­ry.
2. A:> MD C:> SALARY
Makes a salary directory in the C: drive, under root directory.
You may want to delete or remove a directory to simplify your directory structure. DOS provides RD (Remove Directory) to delete a directory.
removes the SALARY sub-directory in ACCT directory.
NOTE: You cannot delete a directory if you are in it. Before you can delete a directory, you must type cd.. at the command prompt. At the same point of time, the directory to be deleted should be empty.

Copying files
To copy a file, DOS provides COPY’ command. When you usecopy’ command, you must use the following two parameters; the location and the name of the file you want to copy, or the source; and the location and the file name to which you want to copy the file or the target (destination). You separate the source and the destination or target with a space. The syntax of the `COPY’ command is
COPY {source} {destination} or,
COPY [drive:] [path] [filename] [drive:] [path] [filename]
i.e. the first set of drive, path and filename refers to the source file, and the second set of drive, path and filename
refers to the destination file.
(a) Copying Single File
To copy the DEBUG.EXE file from the DOS directory to the NOS

  1. Return to the root directory by typing the following command prompt: CD
  2. Change to the DOS directory by typing the following commands at the DOS prompt: CD DOS
  3. To copy the file DEBUG.EXE file from the DOS directory to the NOS, directory type the following at the command prompt: Copy c:dosdebug.exe c:nos and the following message appears: 1 file (s) copied Examples: 1. A:> copy a:letteroffice.doc letteroffice.bak makes a copy of the office.doc file in the current or working directory with a new name office.bak 2. A:> copy office.doc a:lettersnos.mem copy the file office.doc from the root directory to the sub-directory LETTER under root directory with a new name nos.mem. If the target drive is not specified, the copied file will reside in the disk mounted on the active drive. 5.13 USE OF WILDCARD CHARACTERS If you want to carry out a task for a group of files whose names have something in common, you can use wildcard characters to specify groups of files. DOS recognize two wildcard characters: asterisk () represents one or more characters that a group of files has in common; and the question mark (?) represents a single character that a group of files has in common. You can use wildcards to replace all or part of a file’s name or its exten­sion. The following table shows examples of wildcards: Wildcard What it Represents Example *.TXT All files with a .TXT extension JULY.TXT LETTER.TXT REPORT. All files named REPORT with any REPORT.TXT extension REPORT.LET REPORT.WRI M*.* All files beginning with letter M MEMO.TXT regardless of their extension MARCH.XLI ???.* All files having 3 letter names, SUN.BMP with any or no extension WIN.LET You can include the wildcard in the command. Use of wildcard characters in COPY command 1. A:>COPY letters*.COB B: It means, copy all files with extension *.COB from the directory LETTERS under the ROOT directory to the working or ROOT directory of the `B’ drive.
  4. A:> COPY B:COMPANYOPEL.* The command is to copy all files with primary name OPEL (irre­spective extension) in the directory COMPANY under ROOT of the drive B’ into the current working directory of the disk mounted inA’ drive. Incase of one drive, the system will ask for the source and target drive. The command, 3.A:>COPY C:.

copies all files of the ROOT directory of the ‘C’ drive into the working directory of the ‘A’ drive.

  1. A:> COPY LETTE?.* B: copies all files with primary name consisting of 6 charac­ters in total and LETTE as the first five characters (irrespective of extension name) into drive `B’.
  2. A:> COPY B:?.DOC copies all files having a primary name of one character with an extension .DOC from ROOT directory of ‘B’ to the ROOT directory of `A’ drive. 5.14 RENAMING FILES To rename a file, DOS provides REN command. The REN command stands for “Rename”. When you use the REN command, you must include two parameters. The first is the file you want to rename, and the second is the new name for the file. You separate the two names with a space. The REN command follows this pattern: REN oldname newname Example: REN NOS.DOC NOS.MEM Rename the old filename NOS.DOC to a new filename NOS.MEM.

Deleting files
This section explains how to delete or remove a file that is no longer required in the disk. DOS provides DEL command, which means to delete.
Syntax : DEL {drive:} {path} {filename}
delete the EDIT.HLP from the DOS directory under ROOT directory.
The PRINT’ command of DOS works more or less likeTYPE’ com­
mand, but at the same time, it enables the content of a text file
to be printed on a paper.
A:> PRINT [drive:] {path} {filename}

In-text questions 1
1. The startup routine runs, when machine boots up is known as

  1. POST
  2. BOOT up
  3. Operating Routine
  4. I/O operation

2. Operating system is also known as:

  1. database
  2. System software
  3. Hardware
  4. Printer

3. What is the maximum length allowed for primary name of a computer file under DOS?

  1. 8
  2. 12
  3. 3
  4. None of the above

4. Which of the following could be a valid DOS file specifica­tion?


5. How many characters form a secondary name for a file?

  1. 8
  2. 12
  3. 3
  4. None of the above

6. What is the name given to something that the computer will automatically use unless you tell it otherwise?

  1. a specification
  2. a wildcard
  3. a default
  4. a rule

7. As per symbolic notation of DOS, which of the following indicates the ROOT directory
(b) >
(c) /
(d) None of the above

8. In wildcard specification `?’ is used as replacement for

9. With DOS, you may use the *’ and?’:

  1. When changing the default settings
  2. To represent unspecified characters in a filename
  3. Instead of wildcard characters
  4. In the extension but not in the drive name or the file name

10. DOS system file consists of

  4. None of the above

11. The batch file uses the extension

  1. .BAT
  2. .DOC
  3. .PRG
  4. .DOS

12. To display the list of all the file of the disk you would type

  1. DIR
  2. COPY

13. State whether the following questions are True(T) or False(F).

  1. Command.Com is hidden file.
  2. Primary name of a file can be of 10 characters.
  3. The command MKDIR and MD performs the same task.
  4. Under DOS .EXE is not an executable file.
  5. DIR command is used to see the content of a specific file.

What you have learnt
In this lesson you were introduced to one of the most popular desktop operating system and its working environment. It explained the directory structure, file naming conventions. It also talked in great length about the file management in terms of COPY, DEL, and MOVE. Here you learned the steps involved in loading of operating systems into computer.

Terminal questions

  1. Explain in brief what do you understand by Operating system.
  2. Explain the process involved in loading of Operating System.

Feedback to in-text questions 1

  1. 2.b3.a,4.b,5.b,6.c,7.d,8.a,9.b,10.a,11.a,12.a,13. F,F,T,F,F

Top comments (0)