Unit -3: Operating system and services in O. S.

Dos History->

MS-DOS acronym for Microsoft Disk Operating System) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and some operating systems attempting to be compatible with MS-DOS, are sometimes referred to as “DOS” (which is also the generic acronym for disk operating system). MS-DOS was the main operating system for IBM PC compatible personal computers during the 1980s and the early 1990s, when it was gradually superseded by operating systems offering a graphical user interface (GUI), in various generations of the graphical Microsoft Windows operating system.MS-DOS


Files and directories
In a computers data is stored in files. When you run a program, MS-DOS processes the data stored in the file and passes it to the system.
In MS-DOS a file can be any size, however the file name is more restricted, it can only have a maximum length of 8 characters plus 3 for the extension.

Furthermore, the files can only contain the following characters:

letters A to Z
numbers 0 to 9
the following special characters: $~! # % & – { } ( ) @ ‘ _ ^
Thus filenames must not contain:

dot (apart from the dot that separates the name and the extension)


directory is a location for storing files on your computer. Directories are found in a hierarchical file system, such as Linux, MS-DOS, OS/2, and Unix.

In the picture to the right is an example of the tree command output that shows all the local and subdirectories (e.g., the “big” directory in the cdn directory). When looking at this overview, the C: drive is considered the current directory and root directory because there is nothing beneath it and you can’t go back any further. If you are using an operating system with multiple user accounts, the directory may also be referred to as a home directory.

Internal and External command->

1.Internal commands: The internal commands are those commands that are automatically loaded in the memory. Some commonly used DOS internal commands are
1 Cls                          2. Dir              3. Date                      4. Time                      5. Ver             6. Copycon               7. Type          8. Ren                       9. Del                         10. MD                      11. CD                                   12. RD                       13. Copy       
1) Cls :- The purpose of this command is to clear the display screen and redisplay the Dos prompt at the top  left corner of the screen.
Syntax:- C : / > Cls
2) Dir:- It displays the list of directories and files on the screen.
Syntax:- C : / > dir.      a. C : / > dir/p – It displays the list of directories or files page wise      b. C: / > dir/w- It displays the list of directories or files width wise     c. C : / > dir/d: –It display list of directories or files in drive D     d. C : / > dir filename extension – It displays the information of specified file.     e. C : / > dir file name with wild cards.
Wild cards: – It is the set of special characters wild are used with some commonly used DOS commands there are two types of wild cards.
1. Asterisk (*˜)2. Question mark (?)
1. Asterisk:-  (*) The wild word will match all characters. 1. C : / > dir *.* – will display list of all files and directories. 2. C : / > dir R*.* – will display all files stored with first character R.

2. Question mark: – This wild card represents a single character that a group or files have in common.
1) C : / > dir  ac .* ˜- will display all files having any first character and remaining name has given in command.
2) C : / > dir ??? R . doc-will display all files having extension doc and having any first three letters and fourth letter is R.
3) Date: – It displays the current system date. User can also change the current date with new date by using this command.
Syntax: – C : /> dateCurrent date is: sat 3-25-2015Enter of new date (mm-dd-yy):-
4. Time : – It displays the current systems time user can also change existing time with new time by using this command.
Syntax : – C : / > timeCurrent time is 12 : 39 – 48 : 36 pEnter new time : –
5. VER : It displays the version of DOS being used currently.
Syntax : – C : / > VerMS – Dos version 6 : 20Copy card .
6. copycon : – The purpose of this command is to create  a file.
Syntax : – C : / > copy con filename . extension
Saves the contents of file by pressing  ctrl +z key combination at the last time of the file. File name should not be greater than 11 characters out of which 8 characters are for the name and 3 characters are for the extension.
Extension is optional :Eg : C : / > copy con ramI am a good boy1. File is copied.C : / >
7. TYPE:- Allows the user to see the contents of a file.
Syntax :- C :/ >Type pathEg: C:/ > Type D:/> ramu
8. REN : – The purpose of this command is to rename the old file name with new file name.
Syntax : – C : / > ren oldfilename newfilenameC : / > ren ramu somu
9. DEL:- The purpose of this command is to delete file. The user can also delete multiple files by busing this command and long with while cards.
Syntax : – C : / > Del file name extension                   C : / > Del ramu                  C : Del x . prg.
10. MD:- The purpose of this command is to create a new directly or sub directly i.e sub ordinate to the currently logged directly.
Syntax : – C : /> MD directoryC : /> MD sub directory
Ex : C : / > MD collegeNow user wants to create a sub directory first year in college directory thenC : / > cd collegeC : / > college > Md first year
11. CD : – The purpose of this command is to change from one director to another directory or sub – directory.
Syntax : – C : / > CD directory name
Ex : C: / > cd collegeC : / > college > CD first yearC : / > college > first year >If the user wants to move to the parents directory then use CD command asC : / > college > first year > cd ….C : / > college >
12 . RD: – The purpose of this command is to  remove a directory or sub directory. If the user wants to remove a directory or sub – directory then first delete all the files in the sub – directory and then remove sub directory and remove  empty main directory.
13. COPY: The purpose of this command is to copy one or more specified files to another disk with same file name or with different file name.
Syntax : – C : / > copy source path target pathC : / > copy A :/> ˜ *. * ˜ C : /> chinni                                      

   2. External commands: –  This commands are not permanent part of the memory. To execute or run this commands an external file is required.
Example : [.] Dot  exe, bat.Some commonly used DOS external commands are .
1. CHKDSK:- The command CHSDK returns the configuration status of the selected disk. It returns the information about the volume, serial number, total disk space, space in directories, space in each allocation unit, total memory and free memory.
Syntax : – C : / > CHKDSK drive nameEg:- C : / > CHKDSK   e :If drive name is not mentioned by default current drive is considered.
2. Diskcopy : – Disk copy command is used to make duplicate copy of the disk like Xerox copy. It first formats the target disk and then copies the files by collection. From the source disk and copied to the target disk.
Syntax : – C : / > disk copy < source path > < destination path >Ex: – c : / > diskcopy A : B :
NOTE: – This command is used after diskcopy command to ensure that disk is copied successfully.
3. Format : – Format is used to erase information off of a computer diskette or fixed drive.
Syntax : – C : / > format drive nameEx : C : / > format  A:
4. Label : This command is used to see volume label and to change volume label.
Syntax : C : / > label drive nameEx : C : / > label  A:
5.Scandisk : – This utility is used to repair and check various  disk errors. It also defects various physical disk errors and surface errors.Syntax : – C : / > scandisk < drive names > C : / > Scandisk  A :
6. Move : The purpose of move is move to files from one place to another place.
Syntax: C : / > Move < source path > < target  path >
7. Print :This command allowed users to print a text file to a line printer.Syntax : C : / > Print  < files name >C : / > print ramu
8. Tree : This command displays the list of directories and files on specified path using graphical display. It displays directories of files like a tree.
Syntax:- C : / > tree > pathC : / > tree  A:
9. Deltree: This command is used to delete files a directories same as by the del and RD commands. This command is more useful than del and RD commands because it completely removes specified directories ie.,  disk will all it files and sub – directories at a time.
Syntax:- C : /  > deltree (path)
C : / > deltree  A:/>ramu 

Batch Files->

A batch file is a text file that contains a sequence of commands for a computer operating system. It’s called a batch file because it batches (bundles or packages) into a single file a set of commands that would otherwise have to be presented to the system interactively from a keyboard one at a time. A batch file is usually created for command sequences for which a user has a repeated need. Commonly needed batch files are often delivered as part of an operating system. You initiate the sequence of commands in the batch file by simply entering the name of the batch file on a command line.

In the Disk Operating System (DOS), a batch file has the file name extension “.BAT”. (The best known DOS batch file is the AUTOEXEC.BAT file that initializes DOS when you start the system.) In UNIX-based operating systems, a batch file is called a shell script. In IBM’s mainframe VM operating systems, it’s called an EXEC.

Types of Operating Systems

An Operating System performs all the basic tasks like managing file,process, and memory. Thus operating system acts as manager of all the resources, i.e. resource manager. Thus operating system becomes an interface between user and machine.

Types of Operating Systems: Some of the widely used operating systems are as follows-

1. Batch Operating System –
This type of operating system does not interact with the computer directly. There is an operator which takes similar jobs having same requirement and group them into batches. It is the responsibility of operator to sort the jobs with similar needs.

Advantages of Batch Operating System:

  • It is very difficult to guess or know the time required by any job to complete. Processors of the batch systems know how long the job would be when it is in queue
  • Multiple users can share the batch systems
  • The idle time for batch system is very less
  • It is easy to manage large work repeatedly in batch systems

Disadvantages of Batch Operating System:

  • The computer operators should be well known with batch systems
  • Batch systems are hard to debug
  • It is sometime costly
  • The other jobs will have to wait for an unknown time if any job fails

Examples of Batch based Operating System: Payroll System, Bank Statements etc.

2. Time-Sharing Operating Systems –
Each task is given some time to execute, so that all the tasks work smoothly. Each user gets time of CPU as they use single system. These systems are also known as Multitasking Systems. The task can be from single user or from different users also. The time that each task gets to execute is called quantum. After this time interval is over OS switches over to next task.

Advantages of Time-Sharing OS:

  • Each task gets an equal opportunity
  • Less chances of duplication of software
  • CPU idle time can be reduced

Disadvantages of Time-Sharing OS:

  • Reliability problem
  • One must have to take care of security and integrity of user programs and data
  • Data communication problem

Examples of Time-Sharing OSs are:Multics, Unix etc.

3. Distributed Operating System –
These types of operating system is a recent advancement in the world of computer technology and are being widely accepted all-over the world and, that too, with a great pace. Various autonomous interconnected computers communicate each other using a shared communication network. Independent systems possess their own memory unit and CPU. These are referred as loosely coupled systems or distributed systems. These system’s processors differ in size and function. The major benefit of working with these types of operating system is that it is always possible that one user can access the files or software which are not actually present on his system but on some other system connected within this network i.e., remote access is enabled within the devices connected in that network.