Ii Unit Os
Ii Unit Os
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
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.
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.
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.
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.
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.
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.
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.
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.
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
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
DOS Prompt
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.
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
Ex. C :\> 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.
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
1 file(s) copied.
C :\>
6. TYPE This command is used to view / display the contents of a file on the screen.
8. COPY: The copy command is used to copy one or more files on the same disk or to
another disk.
Or
C:\> D: RANI E:
9. REN/RENAME: this command is used to renames an existing file or files.
Or
C:\>RENAME <old file name> <new file name>
11. DIR: this command is used to displays a list of files and subdirectories in a directory.
This command displays a list of files and subdirectories of default disk page by page.
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.
Or
Or
Or
To return back from a subdirectory : The CD.. Or CD\ command is used to return back
from a subdirectory.
Or
Syntax: C:\suresh> CD \
13. EDIT: This is command starts MS-DOS screen editor, which is used to create and edit
files.
15. EXIT: this command is used to quit the CMD.EXE (command prompt) program.
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.
3. DISKCOPY: This command copies the contents of one floppy disk to another.
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.
properties of disk like serial number, volume label, memory and other properties along with
errors on the disk if any.
Volume: Specifies the drive letter<followed by a colon>, mount point, volume name.
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]
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.
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,
/R in command line reverses the sort order; that is, the data of the specified file sorts
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.
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:).
Here drive1 specifies the drive on which backup files are stored. drive2:path
specifies the path to which those backup files will be restored.
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.
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 an option.
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.
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 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.
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.
“?” (Question mark): The “?” is used to refer to a single common character in file names.
This command will list all the files starting with the letter C and having a length of 3
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.
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.
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
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,
Viruses are most easily spread by attachments in e-mail message. Viruses also spread
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
Some examples or worms are- “Code Red” and “Nimda”.
Trojan Horse: Trojan horse is destructive programs that masquerade as useful programs.
Similarly, users install Trojan horses thinking that it will serve a useful purpose such as a
However, Trojan horses contain programs that corrupt the data or damage the files.
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
Applets and ActiveX controls are generally used to provide added functionality such as
However, these programs when designed with a malicious intention can be disastrous for
Java Applets have strong security checks that define what an applet can do and what it
cannot.
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.