Operating  System  Basic

Introduction:

Software is a collection of computer programs and data to provide desired output. Software is categorized into two: i.e. System software and Application software. Operating system (OS) is system software consisting of programs that are loaded while booting the computer.  It is responsible for running other applications. The OS acts as an interface between the user, application programs, hardware, and system peripherals as shown in Figure 1.1

 

Figure 1.1 – Operating System (OS)

Application programs are loaded after the Operating System (OS) is installed in a system . Users interact with the computer and software through the OS. The OS interprets input given by a user through a keyboard, mouse, or other input devices and takes appropriate action.

Operating systems can be of two types: Network Operating System (NOS) and simple stand alone desktop OS i.e. Client OS For example: –

NOS Client OS
Windows 2008 server Windows 7
Windows 2003 server Windows Vista
Windows 2000 server Windows XP Professional
UNIX Windows 2000 Professional
Linux Windows 95/98
NetWare MS DOS

Table 1.1 – Types of Operating Systems

Only PC loaded with NOS can act as a server. PC loaded with client OS acts as a client or a standalone system.

1.1 Microsoft Operating Systems

1.1.1 Windows Versions

The combination of Microsoft DOS (Disk Operating System) and Microsoft Windows 3.1x was the most popular operating system until 1995 In 1995, Microsoft released Windows 95, which was then upgraded to Windows 98. Windows 95 is a combination of OS as well as GUI. Other operating systems that have adopted a similar approach with advance features are Microsoft Windows NT, Windows 2000,Windows ME Windows XP, Windows Vista and Windows 7. Some of the popular versions of MS Windows and their features were:

Version and Release Date Features
Windows 3.1 x (April’92) It supported long file names, true type font system and it provided desktop publishing
Windows 95 (Aug’95) Virtual Memory features was supported by windows 95
Windows NT 4.0 (July’96) It was designed to support multi-user, multiprocessing environment, it supports both workstation and server.
Windows 98 (June ¹98 ) It included new hardware drivers and better support for FAT32
Windows 2000 (Feb 2000) It supports both server and workstations: Active Directory was one of the best features provided by windows 2000 server edition.
Windows Me (Sep’2000) It allowed upgrade to windows 98 with enhanced multimedia and internet features
Windows XP (Aug 2001) It provided Switch users concept, and advanced security features on files and folders
Windows 2003 (April 2003) It included new security features, it provided ” Manage your server ” wizard which helped users to configure machine for specific roles
Windows Vista (Nov 2006) Features like User Accounts, Internet Explorer 7. Windows Calendar, Aero was introduced.
Windows 2008 (Feb 2008) It provides technical security, management and administrative features
Windows 7 (July 2009) It is a faster booting OS, advance feature of aero. Internet explorer 8, Direct Access.

Table 1.2 – Different Windows Versions with Features

1.1.2 Features of DOS

Command prompt interface

DOS provides a text-based interface called the command prompt. From the command prompt, commands can be issued to perform file and disk management, and execute programs. The results of these commands are presented to the user as text messages.

 

Utility programs

DOS provides a number of utility programs (files with .EXE and.COM extensions in the C:\DOS\ directory) to perform various file and system management tasks. Examples of DOS utilities are FORMAT, EDIT, and SCANDISK.

  • Configuring the DOS

There are two configuration files in DOS:

CONFIG.SYS

AUTOEXEC.BAT

CONFIG.SYS

These commands are executed when the system boots up. These commands (also known as parameters) can be edited to have varying effects on the hardware components of the computer system. CONFIG.SYS is a text file that resides in the root directory of the boot drive (usually C:\ ) . It is edited using a simple text editor such as EDIT.

AUTOEXEC.BAT

This file contains a list of DOS commands that must be executed immediately after boot-up. It can be used to start anti-virus checks automatically, log onto a network, or load Windows soon after boot-up. Putting often-used commands in the AUTOEXEC.BAT file saves the trouble of typing all the commands after every boot – up process. It is a text file that resides in the root directory of the boot drive (usually C:\). It is edited using a simple text editor such as EDIT. You can use it to run anti – virus, log onto a network or load windows automatically.

The CLS command is used to clear the screen, but it shows the command prompt and cursor.

1.2 Navigating DOS

1.2.1 The Directory Structure

The top most level of every disk or drive is called a Root directory. It is represented by a backslash. Therefore in the following diagram the root of C: drive is shown as

C:\

The root directory can contain files and sub – directories under it. Sub-directories further contains files and sub – directories

 

Figure 1.2 – Directory Structure of DOS

The root directory normally contains the following files:

MSDOS.SYS (hidden file)

IO.SYS (hidden file)

AUTOEXEC.BAT

CONFIG SYS

1.2.2 The Default Drive

Each drive has a unique drive letter.The default drive of the hard disk,from where Windows is loaded,is usually C .

1.2.3 Directories and the DOS Prompt

The greater than symbol (>) separates the DOS prompt from the commands typed by the user. Usually prompt display as C:\>.

User can change the directory,now if user changes the root directory to users directory,it will appear as: c: \ users \ >

1.2.4 Changing the Current Drive from C: to D:

Ensure that floppy disk is inserted into the floppy drive. Type the drive letter along with colon (i.e. D:) beside the command prompt (C:\>) and press Enter.

The command prompt will change to D:\>indicating that the current drive has changed to D:

1.2.5 Changing the Current Directory

Use the CD (Change Directory) command at the DOS prompt in order to change directories. The table 1.3 lists the commands and their respective actions.

Command Action
C:\>CD users Sets current directory to users; the prompt changes to C:\users >
C:\users>CD.. Sets the current directory to one level above
C:\users>CD\ Changes the current directory to the root

Table 1.3 – Commands to Change the Current Directory

1.2.6 Getting System Information

The DIR (Directory) command displays a listing of all the files and sub-directories in the current directory. It also gives the information about the file size, number of files present in the directory and free space available. The following table 1.4 gives the summary of the commands.

Command Action
C:\>DIR List out all the files and sub-directories in the current directory
C:\> DIR /p Lists out files and sub directories in page-by-page format
C:\>DIR d:\ Lists out files and sub-directories in d:
C:\> DIR a*.* Lists out files and subdirectories whose names being with ‘a’

Table 1.4 – DIR Commands

There is TREE command which allows you to examine your file structure and see the directories and subdirectories that have been created. The table 1.5 lists the summary of the TREE command.

Command Action
TREE Shows the directory structure from the current directory and below
TREE MORE Shows the directory structure one page at a time
TREE/F MORE Shows the position of files stored within the directory structure

 Table 1.5 – TREE Commands

 

Hands – on Exercise

Perform the activity mentioned in Lab No. 1 at the end of this chapter

1.3 DOS File Management

 

COPY Command:

The process of duplicating files in DOS from one directory to another is called as Copying a files which can be achieved by using the COPY command.

Example: C : \>COPY AUTOEXEC.BAT C : \ TEMP \ AUTOEXEC . BAR

The above command copies the AUTOEXEC.BAT file from the current directory to the C:\TEMP\ directory and returns the file in the final location as AUTOEXEC.BAK .

 

MOVE Command:

The process of copying a file from one location to another and deleting the same file at earlier location is known as moving a file. This can be done using the MOVE command.

Example: C : \>MOVE AUTOEXEC . BAT C: \ DOS\

XCOPY Command:

The XCOPY utility allows a user to copy the contents of more than one directory at a time and retain the directory structure. Some of the parameters of the XCOPY command and their description are listed in the table 1.6

 

Parameters Application
/A Copies only those files with archive file attribute
/M Same as but turns off archive attribute after copying
/D:DATE Copies files modified on or after the specified date
/P Prompts for confirmation before every destination file is created
/S Copies contents of subdirectories unless they are empty
/E Copies contents of subdirectories even if they are empty
/V Verifies each file as it is written to the destination
/W Prompts for continuation before copying files

Table 1.6- Parameters of XCOPY Command

REN (RENAME) Command:

The REN command is used to rename a file.

Example: C : \>REN * .TXT * .DOC. Now this command renames alI files in the current directory with filename and extension .TXT to extension .DOC

 

DEL (DELETE) Command:

The DEL command is used to delete a file.

Example: C : \ >DEL *.TXT . It deletes all files with extension .TXT

MD (MAKE DIRECTORY) Command:

The MD command is used to create a directory under a root or a subdirectory within another directory. You can also use mkdir command to create a new directory.

Example: C : \ >MD (drive:) path

[drive:]path:-specifies the drive on which you want to create a new directory along with the name and location of the new directory.

RD (REMOVE DIRECTORY) Command:

To remove a subdirectory, use the RD command. It can only delete empty directories. So before using it delete all files within directory and go at least one level up. Example, C:\>RD

Hands-on Exercise

Perform the activity mentioned in Lab No. 2 at the end of this chapter.

Every file in DOS can have up to four file attributes that indicate something about the actions that can be performed on the file. They are summarized in following table 1.7

Attribute Action
Read only (R) File can be accessed by any program but it cannot be modified or deleted
Archive (A) The file has changed since was last archived using the BACKUP or XCOPY utilities
Hidden (H) The file is hidden and cannot be seen when a normal directory listing is done using DIR
System (S) The file is used by DOS and should not be edited or deleted by users.

Table 1.7 – File Attributes

Now to view the attributes of a file, use the command ATTRIB.

Example: C: \ >ATTRIB filename.


 Summary:

In this chapter you learnt:

All computers need basic software known as an Operating System (OS) to function

The OS acts as an interface between the user, application programs, hardware, and system peripherals

Operating System can be of two types: Network Operating System (NOS) and simple stand alone desktop O.S. i.e. Client O.S.

DOS (Disk Operating System) provides a text-based interface called the command prompt that can be issued to perform file and disk management, and execute programs.

DOS provides a number of utility programs to achieve various file and system management tasks.

There are two configuration files in DOS:

CONFIG.SYS

AUTOEXEC.BAT

CONFIG.SYS is executed when the system boots up. These commands (also known as parameters) can be edited to have varying effects on the hardware components of the computer system.

AUTOEXEC.BAT file contains a list of DOS commands that must be executed immediately after boot-up.

The top most level of every disk or drive is called a Root directory. It contains files and sub-directories under it and further sub-directories contain files and sub-directories.

The DOS commands like COPY, MOVE, XCOPY, REN, DEL, MD, RD etc. are used for file management.


Quiz:

1.Fill in the Blanks:

  • The …….. acts as an interface between the user, application programs, hardware and system peripherals.
  1. Windows
  2. Desktop
  3. operating system
  4. Mouse

 

  • Dos provides a text-based interface called the ……………..
  1. Command Prompt
  2. Windows
  3. Editor
  4. CONFIG.SYS

 

  • The DOS command CD is used to ……………………..

 

  1. Compress the disk
  2. Copy the files to the directory
  3. Copy the contents of more than one directory at a time and retain the directory structure
  4. Change the Directory

 

  • …………………………..DOS attribute is used by backup programs.

 

  1. Read-only
  2. b.Archive
  3. Hidden
  4. System

 


Lab 1

Objective:

Use of Dos command

 Hands on Exercise

To use DOS command:

  1. Open the DOS prompt and type the DIR command to list the contents of the ro folder.
  2. Type TREE command to view the directory structure below the root as shown in the Figure 1.3.

Figure 1.3 – Output of TREE Command

 

  1. Type the CD\ command to change the current directory to C: as shown in the figure 1.4.

 

Figure 1.4 Result of command cd\

  1. Type the DIR * SYS command to view all files in the DOS directory that have an extension.SYS as shown in figure 1.5.

Figure 1.5 – Result of the command Dir * sys

Figure 1.6 Result of the command ver

Command VER shows the version of DOS (or Windows) that is running

Conclusion

……………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………….

 

Lab 2

Objective:

Use of DOS command

Hands on Exercise

  1. Type the MD command to create a TEMP folder under the root as shown in figure 1,7

 

Figure 1.7 MD Command

 

  1. Type COPY command to copy all files from the root to the TEMP folder as shown in figure 1.8

 

Figure 1.8 Copy Command

 

  1. Type the CD command to enter the TEMP folder as shown in figure 1.9

 

 Figure 1.9 CD Command

  1. Type REN command to rename the file. For example; rename the AUTOEXEC.BAT file in the TEMP folder to AUTOEXEC.BAK as shown in figure 1.10

 

Figure 1.10 REN Command

 

  1. Type the MOVE command to move a file, For example; move AUTOEXEC.BAK file to the root as shown in figure 1.11

 Figure 1.11 MOVE Command

  1. Type DEL command to delete the file, For example; use Del command to delete the AUTOEXEC. BAK file from the root as shown in figure 1.12

 Figure 1.12 DEL command

 

Read more….

………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………

Leave a Reply

Your email address will not be published. Required fields are marked *