0% found this document useful (0 votes)
129 views25 pages

Ii Unit Os

This document provides an introduction to operating systems, including their objectives and functions. It discusses different types of operating systems such as single-user OS, multi-tasking OS, multi-user OS, and real-time OS. It describes the main functions of an operating system, including process management, memory management, file management, device management, protection and security, and the user interface. It also defines booting as the process of loading the operating system into memory when starting or resetting a computer, and explains the steps in the booting process.

Uploaded by

NareshkumarSetti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
129 views25 pages

Ii Unit Os

This document provides an introduction to operating systems, including their objectives and functions. It discusses different types of operating systems such as single-user OS, multi-tasking OS, multi-user OS, and real-time OS. It describes the main functions of an operating system, including process management, memory management, file management, device management, protection and security, and the user interface. It also defines booting as the process of loading the operating system into memory when starting or resetting a computer, and explains the steps in the booting process.

Uploaded by

NareshkumarSetti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 25

I B.

COM (CA) I SEM OPERATING SYSTEM (OS) UNIT-II

OPERATING SYSTEM
INTRODUCTION:
 The computer system comprises of a functional set of hardware, software, user and
data.
 Hardware consists of the components of computer like memory, processor, storage
devices, and input/output devices.
 The software may be of different kinds-application software and system software.
 A computer system may be a single stand-alone system or may consist of several
interconnected systems.
 The user uses the application software to perform various tasks, for example, the user
uses the storage of a computer –to store a document on the hard disk, to execute a
command on the CPU, to retrieve a document from a peripheral device or to print
document on printer.
 For using the hardware, there is a need for software that interacts with both the
hardware and the application software.
 Operating system (OS) is the software that provides an interface between the
computer hardware, and the application programs or users.

User-Computer Interface

Enduser

Application Programs

Utilities

Operating System

Hardware

View of components of computer system

Prepared By: Naresh Kumar Setti, M.Tech Page 1 of 25


I B.COM (CA) I SEM OPERATING SYSTEM (OS) UNIT-II

Objectives of Operating System:

 Operating system is system software that controls and coordinates the use of
hardware among the different application software and users.
 OS intermediates between the user of computer and the computer hardware. The user
gives a command and the OS translates the command into a form that the machine
can understand and execute.

OS has two main objectives:


1. To make the computer system convenient and easy to use, for the user and
2. To use the computer hardware in an efficient way, by handling the details of the
operations of the hardware.
 Some of the commonly used operating systems are Microsoft Disk Operating System
(MS-DOS), Windows XP, Linux, and Mac OS X Snow Leopard.

1) What are the different types of Operating System?


A) OS are classified into different types depending on their capability of processing.
1) Single User Operating System
2) Multitasking Operating System
3) Multiuser Operating System
4) Multiprocessing Operating System
5) Real time Operating System and
6) Embedded Operating System

1) Single User and Single Task OS:


 Single User and Single Task Os are for use by a single user for a standalone single
computer for performing a single task.
 Operating system for Personal Computers (PC) are single-user OS.
 For example, if the user is editing a document, then a document cannot be printed on
the printer simultaneously.

Prepared By: Naresh Kumar Setti, M.Tech Page 2 of 25


I B.COM (CA) I SEM
 Single user OS are simple OPERATING SYSTEM designed
operating system (OS) UNIT-II
to manage one task at a time.
MS-DOS is an example of single user OS.

2) Single User and Multitasking OS:


 It allows execution of more than one task or process concurrently.
 For this, the processor time is divided amongst different tasks. This division of time is
also called time sharing.
 The processor switches rapidly between processes. For example, the user can listen to
music on the computer while writing an article using word processor software.
 The user can switch between the applications and also transfer data between them.
 Windows 95 and all later versions of Windows are example of Multitasking OS.

3) Multiuser OS:
 It is used in computer networks that allow same data and applications to be accessed
by multiple users at the same time.
 The users can also communicate with each other
 Linux, UNIX, and Windows 7 are examples of multiuser OS.

4) Multiprocessing OS:
 It has two or more processors for a single running process. Processing takes place in
parallel and is also called parallel processing.
 Each processor works on different parts of the same task, or, on two or more different
tasks.
 Since execution takes place in parallel, they are used for high speed execution, and to
increase the power of computer.
 Linux, UNIX and Windows 7 are examples of multiprocessing OS.

5) Real Time OS:


 Real Time OS are designed to respond to an event within a predetermined time. These
operating systems are used to control processes. Processing is done within a time
constraint.

Prepared By: Naresh Kumar Setti, M.Tech Page 3 of 25


I B.COM
 OS(CA) I SEM
monitors OPERATING
the events that SYSTEM
affect the (OS) process and respond UNIT-II
execution accordingly.
They are used to respond to queries in areas like medical imaging system, industrial
control system etc.
 Linux OS is an example of real time OS.

6) Embedded OS:
 It embedded in a device in the ROM. They are specific to a device and are less
resource intensive.
 They are used in appliances like microwaves, washing machines, traffic control
systems etc.

2) What are the Functions of Operating System?


 Operating system is large and complex software consisting of several components.
Each component of the operating system has its own set of defined inputs and
outputs.
 Different components of OS perform specific tasks to provide the overall functionality
of the operating system.

The main functions of the operating system are as follows:


Process 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.
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.

Prepared By: Naresh Kumar Setti, M.Tech Page 4 of 25


IAn
B.COM (CA) I SEM
Operating OPERATING
System does the following SYSTEM
activities for(OS)
memory management: UNIT-II

 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.
File Management:
A file system is normally organized into directories for easy navigation and usage. These
directories may contain files and other directories.
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.

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. The 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 most efficient way.
 De-allocates devices.

Protection and Security:


OS protects the resources and data of system by user authentication and file attributes like
read, write, encryption and back-up of data.

User Interface or Command Interpreter:

Prepared By: Naresh Kumar Setti, M.Tech Page 5 of 25


IOperating
B.COM (CA)system
I SEM provides an OPERATING SYSTEM (OS)
interface between UNIT-II
the computer user and the computer
hardware. The user interface is a set of commands or a graphical user interface via which
the user interacts with the applications and hardware.

3) Define Booting? Explain the Booting process in detail?


A) Booting is just the process of starting or resetting the computer, i.e. to load an operating
system into the computer’s main memory or Random Access Memory (RAM). Once the
operating system is loaded, you see the initial windows desktop screen, its ready for
users to run applications.
There are two types of Booting:
Cold Booting:
Cold booting is the booting process happening when we first turn on computer.
Warm Booting:
Warm Booting is the process happening when we reset (restart) the computer.
Booting procedure of Windows Operating System:

Prepared By: Naresh Kumar Setti, M.Tech Page 6 of 25


I B.COM (CA) I SEM OPERATING SYSTEM (OS) UNIT-II

The first process starting when you turn on your computer is BIOS i.e., Basic Input Output
System. BIOS have two functions, to conduct POST and read MBR.
a) POST - POST stands for Power On Self Test. POST checks all the hardware devices
connected to a computer like RAM, hard disk etc and make sure that the system can
run smoothly with those hardware devices. If the POST is a failure the system halts
with a beep sound.

b) Now BIOS checks the boot priority. We can set the boot priority as CD drive, hard disk
or floppy drive.

c) MBR - The next duty of BIOS is to read the MBR. MBR stands for Master Boot Record
and it’s the first sector on a hard disk. MBR contains the partition table and boot
loader.
Functions of Boot loader

Now BIOS has passed the control to boot loader and boot loader is a small program
which loads kernel (a central part of an operating system) to computers memory.
Actually there are two stages of boot loaders, stage 1 boot loader and stage 2 boot
loader. MBR contains the stage 1 boot loader and stage 1 boot loader is a link to the
stage 2 boot loader. The stage 2 boot loader resides in the boot partition and it loads the
kernel to memory.

Boot files and functions

There are three boot files in a Windows operating system and they are NTLDR,
NTDETECT.COM and Boot.ini. The boot files are found in the active partition of hard disk and
its normally C drive in a Windows machine.

Prepared By: Naresh Kumar Setti, M.Tech Page 7 of 25


INTLDR
B.COM (CA) I SEM stands for NT Loader
- NTLDR OPERATING
andSYSTEM
it’s the(OS)
second stage boot loader. UNIT-II
The path of
NTLDR is C:\Windows\i386\NTLDR.

Boot.ini - Boot.ini contains the configuration files of NTLDR. When the operating system
is loaded we cannot pass any arguments to kernel, so those arguments are passed
through boot.ini. You can edit boot.ini by opening through notepad. The path of Boot.ini
is C:\boot.ini.

NTDETECT.COM - This file detects hardware's and passes information to NTLDR. Using the
collected information the NTLDR creates a hardware key and this key is used to detect
hardware's. A new hardware key is generated after each reboot of the operating system and
That’s why system asks to reboot after installation of a new hardware. The hardware keys
created by NTLDR can be found in Windows registry at HKEY_LOCAL_MACHINE ->
HARDWARES.
Kernel and its functions
After executing the functions of boot files the control is passed to Kernel. Ntoskernal.exe is
the kernel file in a Windows machine and its path is C:\Windows\system 32\ntoskrnal.exe.
Kernel acts as a layer between software and hardware. The library file hal.dll
(C;\Windows\system32\hal.dll) helps Kernel to interact with hardware's. HAL stands for
Hardware Abstraction Layer and this hal.dll file is machine specific. Now the drivers for
hardware's are loaded from the file C:\Windows\system32\config\system and the Kernel is
loaded to primary memory.

Services and log in procedure

When kernel is loaded in the primary memory services for each process is started and the
registry entry for those services can be found at HKEY_LOCAL_MACHINE - System -
Current control set - Services. Winlogon.exe (C:\Windows\system32\winlogon.exe) is the
last service started during this process. Winlogon.exe starts the log in procedures of
windows machine. It first calls the library file msgina.dll
(C:\Windows\system32\msgina.dll). MSGINA stands for Microsoft Graphics Identification
and Authentication and it provides the log in window. Now msginal.dll passes the control to

Prepared By: Naresh Kumar Setti, M.Tech Page 8 of 25


ILSA
B.COM (CA) Security
(Local I SEM Authority), itOPERATING SYSTEM
verifies the (OS) and password from theUNIT-II
username SAM file.
SAM (Security Accounts Manager) contains the information about all users created in a
Windows operating system.

Now the booting procedure is over and we have reached the desktop of Windows operating
system.

MS-DOS
 MS-DOS was the first widely-installed operating system for PCs in 1980s.
 MS-DOS is easy to load and install. It neither requires much memory for the operating
system, nor a very powerful computer to run on.
 MS-DOS is command line user interface operating system. This means that the user
has to type single line commands through the command interface. So, user has to
remember the different commands and their syntax.
 It is a single-user and single-tasking operating system for the PC. Only one user can
use it and only one task can be executed, at a given point of time. Also, it does not
have a built-in support for networking. This operating system was developed by Micro Soft
Corporation.
Starting MS DOS

If you are working in windows

 Click Start menu Click Start menu


 Select All Programs (Or) Select Run…
 Select Accessories Type Command in open textbox
 Select Command prompt Click on OK

DOS Prompt

Prepared By: Naresh Kumar Setti, M.Tech Page 9 of 25


I B.COM (CA)starting
After I SEM DOS the system
OPERATING
displaysSYSTEM (OS)
DOS prompt UNIT-II
as ` C :\>’ to indicate that it is
ready to receive commands. Commands are executed at the system prompt by typing the
command and pressing the enter key.

FILE: In computer terminology, a file is a collection of text or data stored on a storage


device. (Ex. Hard disk or CD/DVD)

File Name: Every file is given a file name so that it can be referred later. In DOS the file
name has two parts – Primary name and Extension name.

Rules for a file name:


1) The Primary name can have 8 alphanumeric characters.
2) The extension name can be up to 3 characters.
3) The Primary name and Extension name must be separated by a period (.)
4) The Primary name should not start or end with any special character.

4) What are the different types of DOS-Commands (Internal & External)?


A) DOS Commands are divided into 2 types:

1. Internal Commands

These are for performing basic operations on files and directories and these commands
are programmed into the command.com file and do not require other files in order to
work. The command.com is loaded into memory at booting.

1. DATE: This command is used to display the system current date and prompt you to enter
a new date.
Syntax & Ex. C:\>DATE 
2. TIME: This command is used to display the system current time and prompt you to

enter a new time.

Syntax & Ex. C:\>TIME

Prepared By: Naresh Kumar Setti, M.Tech Page 10 of 25


I3.
B.COM
CLS: (CA)
ThisI command
SEM is used to OPERATING SYSTEM (OS)
clear the screen. UNIT-II

Syntax & Ex. C:\>CLS

4. To change the default drive.


Syntax: C :\> <Drive name>:

Ex. C :\> E:

This command changes the default drive to E

5. COPY CON: This command is used to create a file in the existing directory. Here CON is a
DOS reserved word which stands for console.

Syntax: C:\>COPY CON <file name>

Ex. C :\> COPY CON STUDENT.DAT

After giving the command STUDENT.DAT, the DOS creates a file with the name
STUDENT.DAT and the cursor will stay at the next position. Then you can enter your data.
After entering the data press <ENTER> and press ^z (ctrl + z) / F6 to save the file. Then
you can return to command prompt.
Example: Creating a data file.
C :\> COPY CON NAMES.DAT

NARESH

PRAVEEN

SUPRIYA

RANI

SWATHA

^Z (PRESS CTRL + Z / F6)

1 file(s) copied.

C :\>

6. TYPE This command is used to view / display the contents of a file on the screen.

Prepared By: Naresh Kumar Setti, M.Tech Page 11 of 25


ISyntax:
B.COM (CA) I SEM
C:\>TYPE <file name>OPERATING SYSTEM (OS) UNIT-II

Ex. C :\> TYPE NAMES.DAT

7. PRINT: This command is used to print the output (contents) of a file.

Syntax: C:\>PRINT <file name>

Ex. C :\> PRINT NAMES.DAT

8. COPY: The copy command is used to copy one or more files on the same disk or to

another disk.

The copy command can


a) Copy a file from one disk to another.
b) Make a duplicate file of an individual file with a different name on the same disk.
c) Copy groups of files on to a different disk making of the wild cards.
Syntax: C:\>COPY <source drive> < file name> <target drive>

Or
C:\> D: RANI E:
9. REN/RENAME: this command is used to renames an existing file or files.

Syntax: C:\>REN <old file name> <new file name>

Or
C:\>RENAME <old file name> <new file name>

Ex. C :\> REN NAMES.DAT STUDENT.DAT

10. DEL: this command is used to deletes one or more files.

Syntax: C:\>DEL <file name>

Ex. C :\> DEL NAMES.DAT

11. DIR: this command is used to displays a list of files and subdirectories in a directory.

Syntax: C :\> DIR

Other formats of DIR command

Syntax: C :\> DIR F:

Prepared By: Naresh Kumar Setti, M.Tech Page 12 of 25


ILists
B.COM (CA)
the I SEM
files OPERATING
on the disk on F drive though SYSTEM (OS) working drive is C
the present UNIT-II

Syntax: C :\> DIR /P

This command displays a list of files and subdirectories of default disk page by page.

Syntax: C :\> DIR /W

This command displays a list of files and subdirectories widely.

12. CREATING SUBDIRECTORY

DOS provides facility of subdividing the disk into different directories called subdirectories.
This kind of organization gives the ability to group all similar files and put them in separate
directories.

MD/MKDIR: The MD or MKDIR command is used to make/create a subdirectory to the


present working directory. The main directory containing the subdirectory is called the root
directory.

Syntax: C :\> MKDIR <Directory name>

Or

Syntax: C:\>MD <Directory name>

Ex: C:\>MD Suresh

CD/CHDIR: The CD or CHDIR CD command is used to change from one directory to


another directory.

Syntax: C :\> CHDIR <Directory name>

Or

Syntax: C:\>CD <Directory name>

Ex: C:\>CD Suresh

This example, changes the current directory to Suresh.

Prepared By: Naresh Kumar Setti, M.Tech Page 13 of 25


IRD/RMDIR:
B.COM (CA) I SEM OPERATING
the RD or RMDIR commandSYSTEM (OS)
is used to remove a subdirectoryUNIT-II
from a
particular directory.

There are two conditions to remove any directory

(1) Directory to be removed should be empty. And

(2) We should be outside the directory we are commanding to delete.

Syntax: C :\> RMDIR <Directory name>

Or

Syntax: C :\> RD <Directory name>

Ex: C :\> RD Suresh

This example deletes /removes the subdirectory suresh.

To return back from a subdirectory : The CD.. Or CD\ command is used to return back
from a subdirectory.

Syntax: C:\suresh> CD..

Or

Syntax: C:\suresh> CD \

13. EDIT: This is command starts MS-DOS screen editor, which is used to create and edit
files.

Syntax: C:\>EDIT <file name>

Ex. C :\> EDIT NAMES.DAT

14. VER: This command is used displays Windows XP version.

Syntax: C :\> VER

15. EXIT: this command is used to quit the CMD.EXE (command prompt) program.

Syntax: C :\> EXIT

Prepared By: Naresh Kumar Setti, M.Tech Page 14 of 25


I2.B.COM (CA) ICommands
External SEM OPERATING SYSTEM (OS) UNIT-II

These external commands are for performing advanced tasks and they do need some
external file support as they are not stored in COMMAND.COM. we have commands such as
“format”, “label”, "xcopy", etc. that are external commands, meaning that they require the
actual application/file in order to use them, along with command.com.

1. XCOPY: This command is used to copy files and directory trees from one disk to another
disk.

Syntax: XCOPY source [ destination]

Source: specifies the file(s) to copy.

Destination: specifies the location and/or name of new files.

Ex. C :\> XCOPY A: D:

This command copies the entire files in drive A to drive D

2. LABEL: It is used to create, change, or delete the volume label of a disk.

Syntax: LABEL [drive:] [label]

Drive: specifies the drive letter of a drive.

Label: specifies the label of the volume.

Ex.: C :\> Label D:

This command displays volume label and serial no.

3. DISKCOPY: This command copies the contents of one floppy disk to another.

Syntax: DISKCOPY [drive1: [drive2:]]

Ex. Diskcopy A: B:

Copies contents of A: to B: drive. This command can be used with /V switches which
verifies that the disk is copied correctly.

Prepared By: Naresh Kumar Setti, M.Tech Page 15 of 25


I4.B.COM (CA) I SEM
CHKDSK: OPERATING
This command is used SYSTEM
to check (OS) and display a status report
a disk UNIT-IIwith

properties of disk like serial number, volume label, memory and other properties along with
errors on the disk if any.

Syntax: CHKDSK [Volume [Path [Filename]]]

Volume: Specifies the drive letter<followed by a colon>, mount point, volume name.

Filename: Specifies the files to check for fragmentation.

Ex. C :\> CHKDSCK D: (this checks the disk drive D)

5. TREE: This command is very useful to view the list of directories and subdirectories
present on the disk in graphical form. Or graphically displays the folder structure of a drive
or path.
Syntax: C :\> TREE [drive:] [path] [/F] [/A]

/F Display the names of the files in each folder.

/A Use ASCII instead of extended characters.


Ex. C :\> TREE (this displays the folder structure of a C drive.)
6. DELTREE: This command is used to remove a directory along with its contents.

Syntax: DELTREE [drive:] [path]

Here, [drive:] [path] specifies the directory name to be deleted.

Ex. DELTREE NARESH (this deletes the directory NARESH).

7. DOSKEY: This command is generally used to Edits command lines, recalls Windows
commands, and creates macros.
Syntax: DOSKEY [/REINSTALL] [/HISTORY] [Macroname = [TEXT]]
/REINSTALL installs a new copy of Doskey.
/HISTORY displays all commands stored in memory.

Macroname Specifies a name for a macro you create.

TEXT Specifies commands you want to record.


Ex. C :\> DOSKEY

Prepared By: Naresh Kumar Setti, M.Tech Page 16 of 25


I8.B.COM
FIND:(CA) I SEM
this command is used toOPERATING
Searches SYSTEM (OS)
for a text string in a file or files. UNIT-II

Syntax: FIND "string" [[drive:][path]filename[ ...]]

The basic essential elements in the command line for find are - the string enclosed in " "
and [[drive:] [path] filename(s)].String specifies the text string to find in the file and
[[drive:] [path] filename(s)] specifies the file or files where the text string search is to be
done.
Ex. C :\> FIND “kavitha” d:/kdc.txt (this command searches the string kavitha in the
file kdc.txt.
9. SORT: This command is used to arrange the data of a file in alphabetical order (A-Z,

0-9) or reverse alphabetical order.

Syntax: SORTS [ /R] [[drive1:] [path1] filename1]

/R in command line reverses the sort order; that is, the data of the specified file sorts

Z to A, then 9 to 0. [drive1:][path1] filename1 specifies the file to be sorted.

Ex. C :\> SORTS NAMES.TXT (this command sorts the data in NAMES.TXT file.)

10. FORMAT: this command is used to formats a disk for use with windows XP.

Syntax: FORMAT volume

Volume: Specifies the drive letter (followed by a colon), mount point, or volume name.

Ex. C :\> FORMAT D: (this formats the drive D, i.e. which deletes all files and
subdirectories.)

11. BACKUP: The Backup command backs up one or more files from one disk to another.
You can backup files onto either a hard disk or on a floppy disk.
Syntax: BACKUP Source Destination

Here source specifies the location of files to be backed up and destination drive specifies
the drive on which you want to store the backup files.

Ex. C :\> BACKUP d: e: (this command backup the files from drive D: to drive E:).

Prepared By: Naresh Kumar Setti, M.Tech Page 17 of 25


I12.
B.COM (CA) I SEMThe RESTORE command
RESTORE: OPERATINGrestores
SYSTEM (OS)
files that were backed upUNIT-II
by using
BACKUP command.
Syntax: C :\>RESTORE drive1: drive2:path

Here drive1 specifies the drive on which backup files are stored. drive2:path
specifies the path to which those backup files will be restored.

5. Explain about wildcard characters?

A) Wildcard characters:

A wildcard character is a keyboard character such as an asterisk (*) or a question mark (?)
that is used to represent one or more characters when you are searching for files, folders,
printers, computers, or people. Wildcard characters are often used in place of one or more
characters when you do not know what the real character is or you do not want to type the
entire name.

Prepared By: Naresh Kumar Setti, M.Tech Page 18 of 25


I B.COM (CA) I SEM
Wildcard OPERATING SYSTEM (OS) UNIT-II
Uses
character
Use the asterisk as a substitute for zero or more characters or a sequence of
characters. If you are looking for a file that you know starts with "gloss" but
you cannot remember the rest of the file name, type the following:

gloss*

This locates all files of any file type that begin with "gloss" including
Asterisk (*)
Glossary.txt, Glossary.doc, and Glossy.doc. To narrow the search to a specific
type of file, type:

gloss*.doc

This locates all files that begin with "gloss" but have the file name extension
.doc, such as Glossary.doc and Glossy.doc.
Use the question mark as a substitute for a single character in a name. For
Question
example, if you type gloss?.doc, you will locate the file Glossy.doc or
mark (?)
Gloss1.doc but not Glossary.doc.

*.  Indicates any filename


.*  indicates any extension

*.*  indicates any filename with any extension

?  Indicates any one character.

:  indicates drive to be specified.

/  indicates an option.

MS-DOS and Windows command line wildcard examples

dir c?mp

List files in MS-DOS using the dir command that contain c, mp, and any other character in-
between. For example, comp, camp, c2mp, and c-mp would all be matched.

Prepared By: Naresh Kumar Setti, M.Tech Page 19 of 25


Idir
B.COM (CA) I SEM
*.mp3 OPERATING SYSTEM (OS) UNIT-II

In this next example, the dir command would only list files that end with .MP3 file extension.

dir *data

List any file that ends with data using the dir command. For example, the files 'appdata',
'mydata', and '123data' would all be matched.

dir he??.*

List any file that is four characters long, begins with he, and has any extension. For
example, help.txt, help.mp3, and heck.jpg would all be matched.

Rename *.txt *.jpg

Rename all files in the current directory that end with the file extension .txt to .jpg. For
example, the file test.txt would become test.jpg.

Del comp*.txt

Deleting files in MS-DOS that begin with comp and end with a .txt extension.

Ex: C:\> DIR .DAT


*

Displays a listing of all files which have different primary names but having DAT extension
name only.

x: C:\> DIR C .
E **

This command displays directory of all files which start the first letter of the primary name

with C.

x: C:\> DIR RAM.


E *

Prepared By: Naresh Kumar Setti, M.Tech Page 20 of 25


I B.COM (CA) I SEM OPERATING SYSTEM (OS) UNIT-II
This command displays the directory of all files having file name RAM with any extension.

“?” (Question mark): The “?” is used to refer to a single common character in file names.

Ex: C:\> DIR C??.


*

This command will list all the files starting with the letter C and having a length of 3

characters (primary name) and any extension.

Ex: C:\> DIR ????Y.TXT

This command lists any filename having Y after 4 letters with extension name TXT.

COMPUTER SECURITY
INTRODUCTION: We all like to be secure in our home, office, locality, city, country, and in
this world. We use different mechanisms to ensure our security.

Inside our homes, we keep our valuables safely locked in a cupboard that is accessible by
the elders of the house.
We keep the gates of our house bolted and even have an intrusion-detection system
installed.
We have high walls and gates surrounding our locality and also a watchman who guards
the open gates.
We have police for our security within a city and armed forces for the country. We take all
these measures to make ourselves and valuables, resources, belongings secure.
 The widespread use of computers has resulted in the emergence of a new area for
security- security of computer.
Computer security is needed to protect the computing system and to protect the data that
they store and access.

Transmission of data using network (internet) and communication links has necessitated
the need to protect the data during transmission over the network.

Prepared By: Naresh Kumar Setti, M.Tech Page 21 of 25


IHere,
B.COM (CA) I SEMthe term computer
we use OPERATING
security SYSTEM
to refer(OS) UNIT-II
to both the computer security and the
network security.

Malicious Software:

Malicious users use different methods to break into the systems. The software that is
intentionally included into a system with the intention to harm the system is called malicious
software. Viruses, Trojan horse, and worms are examples of malicious programs.
JavaScript’s and java applets written with the purpose of attacking are also malicious
programs.

6. What is virus? What are the different types of viruses?

A) Virus is a software program that is destructive in nature. Virus programs have the

following properties:


It can attach itself to other healthy programs.

It can replicate itself and thus can spread across a network.

It is difficult to trace a virus after it has spread across a network.

Viruses harm the computer in many ways:

Corrupt or delete data or files on the computer,

Change the functionality of software applications,

Use e-mail program to spread itself to other computers,

Erase everything on the hard disk, or,

Degrade performance of the system by utilizing resources such as memory or disk

space.

Virus infects an executable file or program. The virus executes when a program infected

with virus is executed or you start a computer from a disk that has infected system files.


Once a virus is active, it loads into the computer’s memory and may save itself to the

hard drive or copies itself to applications or system files on the disk.

Prepared By: Naresh Kumar Setti, M.Tech Page 22 of 25


I B.COM (CA) I SEM OPERATING SYSTEM (OS) UNIT-II


However, viruses cannot infect write protected disks or infect written documents. Viruses

do not infect an already compressed file. Viruses also do not infect computer hardware,

they only infect software.


Viruses are most easily spread by attachments in e-mail message. Viruses also spread

through download on the internet.


Some examples of viruses are “Melissa” and “I Love You”.

Types of viruses:

Worms: Worm is self-replicating software that uses network and security holes to replicate

itself.


A copy of the worm scans the security hole, and then starts replicating from there, as

well.

A worm is however different from a virus.

A worm does not modify a program like a virus; however, it replicates so much that it

consumes the resources of the computer and makes it slow.


Some examples or worms are- “Code Red” and “Nimda”.

Trojan Horse: Trojan horse is destructive programs that masquerade as useful programs.

Prepared By: Naresh Kumar Setti, M.Tech Page 23 of 25


IB.COM (CA) I SEM OPERATING SYSTEM (OS) UNIT-II
The name “Trojan horse” is given because of the Greek soldiers who reached the city of

Troy by hiding them- selves inside the horse.


Similarly, users install Trojan horses thinking that it will serve a useful purpose such as a

game or provide entertainment.


However, Trojan horses contain programs that corrupt the data or damage the files.

Trojan horses can corrupt software applications.


They can also damage files and can contain viruses that destroy and corrupt data and

programs.


Trojan horse does not replicate themselves like viruses.

JavaScript’s, java applets and ActiveX Controls: Applets (java programs), and ActiveX

controls are used with Microsoft technology, which can be inserted in a web page and

downloaded on the client browser for execution.


Applets and ActiveX controls are generally used to provide added functionality such as

sound and animation.


However, these programs when designed with a malicious intention can be disastrous for

the client machine.


Java Applets have strong security checks that define what an applet can do and what it

cannot.

Prepared By: Naresh Kumar Setti, M.Tech Page 24 of 25


IB.COM (CA) I SEM OPERATING SYSTEM (OS) UNIT-II
ActiveX controls do not have such security checks. Normally, ActiveX controls must be

kept disabled while working on the internet.


JavaScript is a scripting language generally nested within HTML code. The client-side

scripts on a HTML page execute inside the web browser on the client computer.


JavaScript codes can be used to transfer files, send e-mail and write to local files. If used

with a maligned intention, the scripts can be dangerous for the client machine.

Prepared By: Naresh Kumar Setti, M.Tech Page 25 of 25

You might also like