Operating System

Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

OPERATING SYSTEM

OCA INSTITUTE OF IT AND MANAGEMENT


UNIT-2
Operating System
 An operating system or OS is a software program that enables the computer hardware to communicate and operate with
the computer software. Without a computer operating system, a computer and software programs would be useless. The
picture is an example of Microsoft Windows XP, a popular operating system and what the box may look like if you were to
visit a local retail store to purchase it.

 Following are some of important functions of an operating System.


• Memory Management
• Processor Management
• File management.
• I/O management
 Memory Management
 Memory management refers to management of Primary Memory or Main Memory. Main memory is a large array of words
or bytes where each word or byte has its own address.
 Main memory provides a fast storage that can be accessed directly by the CPU.
For a program to be executed, it must in the main memory. An Operating System
does the following activities for memory management −
• Keeps tracks of primary memory, i.e., what part of it are in use by whom, what
part are not in use.
• In multiprogramming, the OS decides which process will get memory when and
how much.
• Allocates the memory when a process requests it to do so.
• De-allocates the memory when a process no longer needs it or has been
terminated.
 Processor Management
 In multiprogramming environment, the OS decides which process gets the
processor when and for how much time. This function is called process
scheduling. An Operating System does the following activities for processor
management −
• Keeps tracks of processor and status of process. The program responsible for
this task is known as traffic controller.
• Allocates the processor (CPU) to a process.
• De-allocates processor when a process is no longer required.
 Device Management
 An Operating System manages device communication via their respective drivers. It does the following activities for device
management −
• Keeps tracks of all devices. Program responsible for this task is known as the I/O controller.
• Decides which process gets the device when and for how much time.
• Allocates the device in the efficient way.
• De-allocates devices.
 File Management
 A file system is normally organized into directories for easy navigation and usage. These directories may contain files and
other directions.
 An Operating System does the following activities for file management −
• Keeps track of information, location, uses, status etc. The collective facilities are often known as file system.
• Decides who gets the resources.
• Allocates the resources.
• De-allocates the resources
 Types of Operating systrem

 The operating system are different types. They classified into following type based on given factors.

1. No of user supports & No of task done :


a. Single user : the operating system, which supports only a single user to use the computer resources.
b. Single Tasking: The operating system, which performs a single task at any point of time.
 Example: MS DOS (Microsoft disk operating system)

a. Multi user: the operating system, which supports more than one user to use the computer resources.
b. Multi tasking: The operating system which supports more than one task to be carried out at any point of time.
 Example: Windows Xp, Windows 2000, Unix , Linux etc.
1. User Interface:
a. CUI- CUI stands for command user interface. The user interacts with the operating system by putting commands.
 Example: DOS (Disk operating System )
 The CUI operating system is a text-based operating system, which is used for interacting with the software or files by typing commands to
perform specific tasks. The command line operating system uses only keyboard to enter commands. The command line operating systems
include DOS and UNIX. The advanced command line operating system is faster then the advanced GUI operating system.

a. The graphical mode interface operating system is a mouse-based operating system (Windows Operating System, LINUX), wherein a user performs
the tasks or operations without typing the commands from the keyboard. The files or icons can be opened or closed by clicking them with a mouse
button.

 In addition to this, the mouse and keyboard are used to control the GUI operating systems for several purposes. Most of the embedded-based
projectsare developed on this operating system. The advanced GUI operating system is slower than the command line operating system.

 Introduction to DOS

 What is Dos Operating System :: MS-Dos Stands for Microsoft Disk Operating System & It is developed by Microsoft Corporation.Dos Operating
system was developed in 1981 and its first version was named as Dos 1.00.In Dos work are performed by managing disk And disk files. It Provides a
interface between computer hardware and Software programs.

 Dos is a 16 bit operating system that means it can save and process 16 bit of data at a single time. It is a single user and single tasking Operating
system. It is NON-GUI(Graphical User Interface) It Works on CUI(Command User Interface)environment.

 It is a command line operating system which means you have to use commands in command line interface to obtain desired result.Dos operating
system provides control over the computer behavior and functions of computer system

 .Over the years dos has been upgraded from 1.00 to 1.1,1.25,6.0.8.0 etc
 There are basically two versions of MS-DOS (Dos Operating System)::

• Pc-Dos
• Ms-Dos

 Above Both versions of Dos Operating System have been developed by Microsoft Corporation, here Pc-Dos was specially developed for IBM Personal computer and Ms-
Dos was developed and written for Personal computers or NON-IBM Personal Computers. As there are no such differences found in both versions of Dos Operating Systems.

 Disk operating system (Dos) is a menu-driven operating system which is simpler to use but is not as user-friendly as windows. In Today’s world MSDOS is not used,
windows operating system has replaced MS-DOS. Still, some people use dos operating system as a command line for certain purpose.

 What is command ?

◼ A command is a set of instructions used to perform a specific work

◼ Interpreted by the OS interpreter to a machine language

– E.g. <md Ram>,<cd Ram>,etc.

 Types of command.

◼ Internal Command

– Those commands which are already loaded in the Command.COM file while switching to the MS DOS

– E.g. CLS, VER, DEL, etc.

◼ External Command

– Those commands which are not loaded when loading the Program but are available in the Disk and can be invoked whenever necessary

– E.g. FORMAT, TREE, XCOPY, etc.


 What is file ?

◼ A group of organized data (records) which are assembled for one particular purpose and considered as one unit

◼ Stored in permanent storage like hard disk, diskettes,etc.

 Types of file.

◼ Files can broadly be categorized into two types:

– Executable Files

– Non-Executable Files (Data Files)

 What are exe file ?

◼ Exe Files:

– Program files that run or execute themselves

– Have either COM or EXE or BAT as extension

 What are data file ?

◼ Non- executable files that contain only the data that we produce

◼ Cannot execute themselves

◼ Need application program to run

 What is a directory ?

◼ A directory is a list of file which is itself a file stored in the computer’s memory so that users can reference it as it is required

◼ Also called a catalog of files


 Root directory

◼ The Root directory is that directory that is automatically created when the disk is formatted

◼ It is the current drive that we have been working

– E.g. A:\, B:\ (for Floppy Disk Drive)

– C:\,D:\ etc. (for Hard Disk Drive)

 How to get MS DOS ?

◼ To start MS DOS, click on the Start button and choose Run

◼ In the Run dialog box, type CMD or COMMAND which is the EXE file for MS DOS

◼ Click on the OK button

 Some command in DOS

 Dir- For listing the Sub-directories and Files within a directory, we use the DIR command
◼ Syntax :

– DIR [Directory_name]

– E.g. C:\>DIR NCIT

◼ Displays all the directories/files within the directory NCIT

◼ Dir/p : -Display file and directory page wise.

◼ Dir/w :- Display file And directory in horizontal Style.

◼ Dir/p/ w:- Display file And directories page wise and horizontal style also.

◼ Dir/ah :-Display all hidden files and directories.

◼ Dir/a-d : - Display only files.

◼ Dir/ad :- Display only Directories.

◼ Dir/a/s:-Display all directory and file with subdirectory.

◼ Dir/a :- Display All Hidden And Non hidden file and directories.

◼ Dir n*.* :Display all file and directory starting with ‘ n ’ alphabet.

 MD-For creating the Directory in MS DOS, we use the MD (Make Directory)command


◼ Syntax:

– C:\> MD NCIT

 CD- For changing the directory in MS DOS, we use the CD (Change Directory) command

◼ Syntax:

– C:\>CD NCIT

◼ Now it appears as:

– C:\NCIT>

◼ For switching between the directories we use the CD.. Or CD\ commands

◼ The CD.. Command switches from the current directory to the Parent directory whereas the CD\ command switches from the current directory to the Root directory

 Copy con- For creating the files in DOS, the command COPY CON is used

◼ Syntax:

– COPY CON filename

 Note: File name should not exceed eight characters excluding three characters for extension

– E.g. College1.txt
 Type - For reading the Pre-created files in MS DOS, we use the TYPE command. It displays all the contents that are in the file.

◼ Syntax :

– TYPE Filename

 REN- For renaming the files in MS DOS we use the REN Command

◼ Syntax:

– REN oldfilename newfilename

 DEL- For deleting files in MS DOS we use the DEL command

◼ Syntax :

– DEL Filename

 RD- For deleting the directories in MS DOS we use the RD command

◼ Syntax :

– RD Directoryname

 Note : For removing the directory first the directory should be empty
 Copy- In MS DOS, Files can be copied within the same as well as to another Drive / directory

◼ For copying the files in the same drive we use the following syntax :

– COPY sourcefile destination

– E.g. C:\>COPY [c:\]NCIT\file1.txt C:\NCITNGH

– Files can be copied not only in the same drive but in different drive, too. For copying the files in different drive, a complete location along with the Drive
specification should be mentioned

– Syntax :

– C:\>COPY C:\NCIT\file1 D:\NCITNGH\NCIT

 Move- The MOVE Command in MS DOS is used to permanently move the files from one location to another.

◼ The COPY command only copies the files leaving the original one, whereas the MOVE command does not leave any copy

◼ Syntax :

– C:\>MOVE source_file destination_directory

◼ E.g.

– C:\>MOVE c:\NCIT\file1 D:\NCIT1\file2


 VOL- The VOL command is used to check the Volume of the Disk-drive. It displays the volume of the current disk-drive

◼ Syntax :

– VOL Drivename

◼ E.g.

– C:\> VOL

 VER- The VER command is used to check the version of the Operating System that is used in the Computer

◼ Syntax :

– C:\>VER

◼ E.g. C:\>VER

 Date , Time - For checking the date from the system in MS DOS, we use the DATE command. It returns the current system date.

◼ Similarly, the TIME command returns the current time from the system.

◼ Syntax :

– C:\>DATE

 E.g. C:\>DATE
 Label- The Label command is used to check the label of the disk that you have been currently working

◼ Syntax :

– Label [drivename]

◼ E.g.

– C:\>Label

 Format- The FORMAT command prepares a new disk for use by organizing the disk into magnetic tracks and sectors

◼ Syntax :

– A:\>FORMAT [Drive_name]

◼ E.g.

– C:\>FORMAT A:

 Tree- The TREE command is used to display all directory pathnames on the specified disk

◼ Syntax :

– C:\>TREE [disk_name]

◼ E.g.

– C:\>TREE A:
 Edit - The EDIT command in MS DOS is used to edit the files. It provides a different full screen Editor window with a few menu options.

◼ Syntax :

– C:\>EDIT [filename]

◼ E.g.

– C:\>EDIT file

 Print- The PRINT Command in MS DOS is used to print the text files

◼ Syntax :

– PRINT Filename

◼ E.g.

– PRINT File1.txt

 Cls – this command is used to clear the command prompt screen.

You might also like