Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
5 views12 pages

Unit 4 Notes Operating System

Uploaded by

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

Unit 4 Notes Operating System

Uploaded by

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

UNIT-4: OPERATING SYSTEM

Syllabus: Functions, Measuring System Performance, Assemblers, Compilers and Interpreters.


Batch Processing, Multiprogramming, Multi Tasking, Multiprocessing, Time Sharing, DOS,
Windows, Unix/Linux.
Operating System:
• The operating system is an important component of the computer system.
• It can be defined as a set of programs that control how the system work.
• It is considered as the backbone of computer, managing both software and hardware resources.
• An operating system is a software which performs all the basic tasks like file management,
memory management, process management, handling input and output, and controlling peripheral
devices such as disk drives and printers.
Definition: An Operating System acts as an interface between the user and the hardware of computer
system.
Examples: Windows, Linux, Unix and Mac OS, etc.,
Two types of user interfaces supported by various operating systems are:
Command-line interface: User gives instructions to the computer by typing the commands. Example
DOS
Graphical User Interface (GUI): User gives commands to the system by selecting icon or menu item
displayed on the screen with the use of a pointer and-draw device. Example Windows
Structure of Operating System: It consists of four layers

1. Hardware: Hardware consists of CPU, Main memory, I/O


Devices, etc,
2. Software (Operating System): Software includes process
management routines, memory management routines, I/O
control routines, file management routines.
3. System programs: This layer consists of compilers,
Assemblers, linker etc.

4. Application programs: This is dependent on users need. Ex. Railway reservation system, Bank
database management etc.,

Functions of Operating System:


The O.s performs many important functions in a computer
The following are the main functions of an O.S.
1. Process management
2. Memory management
3. Input/output management
4. File Management
5. Error Message/detection
6. Resource Allocation
7. Data security & integrity
8. Communication
9. Command interpretation

1. Process management:
 In a multi programming environment, the OS decides the order in which processes have access
to the processor, and how much processing time each process has. This function of OS is
called process scheduling.
 It assigns processor to different tasks being performed by the computer system.
2. Memory Management:
 It keeps tracks of primary memory, i.e., which bytes of memory are used by which user
program.
 The memory addresses that have already been allocated and the memory addresses of the
memory that has not yet been used.
 It allocates the memory to a process when the process requests it and de allocates the memory
when the process has terminated or is performing an I/O operation.
3. Input/output Management:
 An OS manages device communication via their respective drivers.
 Keeps tracks of all devices connected to system, designates a program responsible for every
device known as the Input / Output controller.
 Decides which process gets access to a certain device and for how long. Allocates devices in
an effective and efficient way.
 Deallocates devices when they are no longer required.

4. File management:
 A file system is organized into directories for efficient or easy navigation and usage. These
directories may contain other directories and other files.
 It keeps track of where information is stored, user access settings and status of every file and
more.These facilities are collectively known as the file system.
 It also performs creation of a new file, modification of an existing file, copying/moving a file
from one storage location to another.
5. Error Detection:
 During program loading or executions, errors may occur in computer hardware or memory,
such errors are detected by operating system and takes appropriate action to ensure correct and
consistent computing.
6. Resource Allocation:
 The Operating System ensures the proper use of all the resources available by deciding which
resource to be used by whom for how much time.
 All the decisions of resource allocation are taken by the Operating System.
7. Data security & integrity:
 The Operating System is responsible for using all the information and resources available on
the machine in the most protected way.
 The Operating System must foil an attempt from any external resource to hamper any sort of
data or information

8. Communication:

 In case of distributed systems which are a collection of processors that do not share memory,
peripheral devices, or a clock, the operating system manages communications between all the
processes.
 Multiple processes communicate with one another through communication lines in the network.
 Communication may be implemented by two methods, either by Shared Memory or by
Message Passing.
9. Command interpretation:
 It is an order to run a task on a computer, we have to give commands to it.
 OS enables the computer to understand the commands given by the users through keyboard or
mouse.
 It also enables the computer to give results based on the commands of the user.

Types of Operating System


Various Operating Systems have evolved depending on the requirement and cost. Different types of
operating system are
1. Single User/Single Tasking Operating System
2. Multi User/Multi Tasking Operating System
3. Multi Programming Operating System
4. Multi-Processing Operating System
5. Batch Processing Operating System
6. Time sharing Operating System
7. Multi Threading Operating System
8. Real Time Operating System
9. Network Operating System
10. Distributed Operating System
11. Network Operating System
1. Single user operating system:
 Single user operating system is a type of operating system that is developed and intended for use
on a computer that will only have a single user at any given time i.e only one person can use the
machine at a time and operating system is available to the single user at a times.
Example MSDOS
Advantages
• It is simple to design implement and maintain
• It is relatively is dedicated to one particular task at a time.
Disadvantages
• Inefficient use of CPU time
2. Single tasking operating system:
 Single tasking operating system are those operating systems that can process one application at
one time. The user can only work on one application at a time.
Example MS-DOS

3. Multi user operating system:


 Multi user operating system is a type of operating system allows multiple users on different
computers or terminals to access a single system with one operating system on it.
 It allows two or more users to run programs at the same time some operating system permit
hundred or even thousands of concurrent users which are commonly called sharable machine.
Example Some multi user systems are Windows 2000 Windows NT .
Advantages
• It makes better use of resources.
Disadvantages
• It has Complex configuration
• Require lot of memory to process
• Relatively expensive than single user operating system
4. Multitasking Operating System:
 Multitasking operating System is a type of operating system that is capable of running more
than one application at a time.
 For example at some time you might be do downloading something from internet as well as
you are writing mail to your friend and listening to music also today most desktop, laptop,
notebook operating system functions with same type of multitasking Operating System
Example Windows 2000 Windows XP Windows Vista Windows NT
Advantages
• Increase the overall performance and productivity of the system
Disadvantages
 It requires lot of memory to execute several programs simultaneously.
5. Multiprogramming operating system:
 Multiprogramming refers to execution of two or more different and independent programs by the
same computer.
 In this two or more programs reside in main memory RAM and are executed concurrently this is
done by switching the CPU from one program to another after instantaneously.
Example windows 2000, Windows XP, Windows Vista and Windows NT
Advantages
• It increases CPU utilization
• It decreases total read time
Disadvantages
• It is relatively complicated
• It requires CPU scheduling

6. Multiprocessing operating system


 Multiprocessing Operating System allows a program to run on more than one central Processing
Unit at a time.
 If one CPU breaks on the other CPU will automatically takes over its job this is also called
parallel processing
Example Windows 2000, UNIX and Linux
Advantages
• It increases the reliability of the system
• It has better performance than single processing system
Disadvantages
• It is very expensive
• If one CPU gets failed it affects the speed of processing
7. Time sharing operating system:
• Time sharing is a technique of allocation of computer resources in a time-dependent to several
programs simultaneously.
• In time sharing the CPU is divided among different users on a schedule basis therefore each user
is given a brief share of the CPU time unlike multiprogramming with CPU is allocated to
programs on priority basis. The share of CPU time is called the Time Flies or time slot or time
Quantum which are very from 10 milliseconds to seconds.
Example Windows 2000 Windows 2003 UNIX and Linux
Advantages
• Reduce the CPU idle time
• Allows many users to execute their tasks simultaneously
Disadvantages
• It is very difficult and expensive to develop
• It is hard to implement
8. Batch processing operating system:
• In this the user's didn't interact directly with the system instead as user prepared a job which
consisted of program data and some control information about the nature of job and submit it to
the computer operator.
• The operating system of such a computer had the function to transfer the control from one job to
another.
• That processing operating systems are ideal in situations where there are large amounts of data,
similar data need to be processed.
• Also known as serial, sequential, or stacked job processing
Example Banks use this process
Advantages
• It increases overall performance as a new job get started on completion of previous job without
human intervention
• The job exhibition is properly organized
• Allows sharing of computer resources among many users
Disadvantages
• It is difficult to provide the desired priority scheduling
• It is difficult to debug program

9. Multithreading operating system:


• Multithreading Operating system allows different parts of a single program to run concurrently.
These Threads will be alternatively active on standby suspended or destroyed according to the
priority assigned to them.
• Example Windows 2000 UNIX and Linux

10. Network operating system:


• Network operating system (NOS) is a software that runs on a computer which acts as a server.
• NOS provide the capabilities required for network operation it enables the server to manage data
users group security applications and other networking functions.
• Entries are based on a client server architecture in which a server enables multiple clients to share
data and resources
Example Microsoft Windows Server 2003, Microsoft Windows Server 2008, UNIX, Linux and
Novell NetWare
Advantages
• It is highly stable because of centralized service
• It maintain security and integrity of user programs and data
Disadvantages
• It is expensive because of high cost of buying and running a server
• Regular maintenance and updates are required
10. Real time operating system:
 Real time operating system is an operating system that has been developed for real time
application it response to input instantly.
 Real time operating systems are commonly found and used in robotics. DOS and UNIX are not
real time because there they can take a few seconds or even minutes to react.
Example Linux is an of a real time operating system.
Advantages
• It is easy to design and develop
• It offers maximum consumption of the system
Disadvantages
• It performed Limited task and cannot be used for general purpose
11. Distributed Operating System:
 The development of networked computers that can be linked and communicate with each other
gave rise to distributed computing.
 Distributed Operating System manages a group of independent computers and make them
appear to be a single computer.
 If many users access to a common database. It makes human to human community Example by
email, www example of distributed operating system
Advantages
• It is reliable that is one machines fail you need not bring down the system
• Computers and software can be added incrementally
Disadvantages

•• create
MS-DOS
Disk
‘Clones’.
√ Operating (Microsoft System)
–computer
• It is very difficult to maintain
• Introduction.
is
Corporation
forsupplied
running
DOS was
PCs
compatible
DOS ofis
tasking
controls
devices
provides
instructions
howoperate.
process
handle
to
by
usemanage
16-bit
based
enabling
It
computer
programs. the
aused
OS from
your
commands.
Input
is by
the
provides
controls 16-bit
interface
any
applications,
managed
floppy
the him/herfor
that
It
awhenthe
files
the
normally
Microcomputer
include: using
Microcomputer.
disk &
E.g.,main
Microsoft
the use
single-user,
computers
connected 1980
computer
most
is
information,
tells
16-bit output,
and
resources,
orfor OS
Microprocessors OS
the
MS-DOS. on for
IBM
1995.
disk-based
to
computerbasic
theit. &
howIntel-
single-
or the
directories
operations
to
using
you
when
to (written
and
applications).
afiles
Command-
execute
use
DOS
user
you
supplied
are
pre-installed
&starting
managing
whichany
of
on
the PC
needs
to
howaIt
&
your
onthe
It is difficult to maintain security and integrity of user programs and data

BIOS:
A computer's basic input/output system (BIOS) is a program that's stored in nonvolatile memory such as
read-only memory (ROM) or flash memory, making it firmware. The BIOS (sometimes called ROM
BIOS) is always the first program that executes when a computer is powered up.

 Here's what happens during the boot process

 Power is turned on.

 The CPU hands control over to the BIOS.

 The BIOS runs a program called Power-On Self Test, which determines how much memory the
computer has and then confirms that critical low-level hardware is operating correctly. Any errors
are indicated by sequences of audible beeps. After this, the BIOS disables all configurable
devices.

 The BIOS identifies all of the computer's peripheral devices, such as hard drives and expansion
cards. It first looks for plug-and-play devices and assigns a number to each, but it doesn't enable
the devices at this time.
 The BIOS locates the primary boot or initial program load (IPL) device. This is usually a storage
device such as a hard drive, floppy drive or CD-ROM that holds the operating system, but it can
be a network card connected to a server. The BIOS also locates all of the system's secondary IPL
devices.

 It selects and enables the primary input (keyboard) and output (monitor) devices, so that if trouble
occurs during the boot process, the BIOS can display a recovery screen and allow the user to
select a stored configuration of system settings that are known to work. The BIOS captured these
settings the last time the computer booted successfully, and it stores them in nonvolatile RAM.

 It scans for non-plug-and-play devices, including the Peripheral Component Interconnect (PCI)
bus, and adds data from their ROMs to its resource table.

 The BIOS resolves device conflicts and configures the chosen boot device.

 It enables plug-and-play devices by calling their option ROMs with appropriate parameters.

 It starts the bootstrap loader. If, for some reason, the default IPL fails to load the operating system,
the BIOS tries the next IPL device in the list.

 The IPL device loads the operating system into memory.

 The BIOS hands over control to the operating system, which may make other resource
assignments.

Disk Operating System:


 MS-DOS is one of the oldest and widely used operating system. DOS is a set of computer
programs, the major functions of which are file management, allocation of system
resources, providing essential features to control hardware devices.
 DOS commands can be typed in either upper case or lower case.

Features of DOS
 It is a single user system.
 It controls program.
 It is machine independence.
 It manages (computer) files.
 It manages input and output system.
 It manages (computer) memory.
 It provides command processing facilities.
 It operates with Assembler.
 Types of DOS Commands

Following are the major types of DOS Command −


Internal Commands − Commands such as DEL, COPY, TYPE, etc. are the internal commands
that remain stored in computer memory.

External Commands − Commands like FORMAT, DISKCOPY, etc. are the external commands
and remain stored on the disk.

DOS Internal Commands:


The DOS internal commands are so-called because their instructions are a part of COMMAND.COM,
and whenever COMMAND.COM is placed into memory each time the DOS or Windows 9x OS is
booted. Therefore, the internal commands are always in memory and can always be executed from any
command line prompt.
List of some Internal Commands:
1.TIME:-
This is an internal command which is used to display the systems time in the format hh:mm:ss:xx
Where h stands for hours, m stands for minutes, s stands for seconds and x stands for 100th of a second.
Displays current time and allows it to be changed.
Syntax:- C:\> TIME

The current time is 2:15:55:03


Enter the new time is:
2.DATE:-
Displays current system date in the format of mm-dd-yy where m stands for month, d stands for day and
y stands for year . It allows it to be changed.
Syntax:- C:\> DATE
The current date is: thur 18-07-2013
Enter the new date is:

3.CLS:-
This command will clear the screen.
Syntax:- C:\> CLS

4.DIR:-
Shows directory information of a diskette: name, size, and the
date and time stamp of files.

Syntax:- C:\> DIR


Optional switches:
Dir /p:- Display directory information page wise.
Dir /w :- Display names and extensions only in width wise.

5.MD (or) MKDIR:-


Makes (creates) a new directory in the specified drive.

Syntax:- C:\>MKDIR <dirname>

6.CD:-
Changes the current directory.
Syntax:- C:\><dirname>

7.COPY CON:-

This command is used to create a file in that particular drive.


Syntax:- C:\>copy con <filename>
After pressing enter you can start typing the text in your file and once finished save it with control+z.

8.TYPE:-
Displays the contents stored in a file.
Syntax:- C:\>TYPE <file name>

9.COPY:-

Copies the data from one file to another file that may be the new file .
Syntax:- C:\> COPY <existing file><new file>

10.DEL:-
Deletes a file from a particular drive.
Syntax:- C:\>DEL< file name>

To del all files in current directory


Syntax:- C:\> DEL *.*

11.REN (Rename):-
Renames a file that is it specifies a new file name to an existing file.
Syntax:- C:\>REN <old file name> <new file name>

12.RD (Remove Directory):-


Removes an existing directory from the specified drive. But the directory must be empty.
Syntax:- C:\>RD [dirname]

DOS External Commands:


External commands are disk-bound external commands, which reside in secondary memory up until the
moment they are needed, at which time the OS must find them and load them into primary memory. To
execute this commands the disk must contain either .exe file(or) .com file.

List of some External Commands:


1.MORE:-
Using TYPE command we can see the content of any file. But if length of file is greater than 25 lines then
remaining lines will scroll up. To overcome through this problem we uses MORE command. Using this
command we can pause the display after each 25 lines.
Syntax:- C:\> TYPE <File name> | MORE

2.SYS:-
This command is used for copy system files to any disk. The disk having system files are known as
Bootable Disk, which are used for booting the computer.
Syntax:- C:\> SYS [Drive name]
C:\> SYS C:A:
System files transferred
This command will transfer the system files from C drive to A drive and displays the
information as “system transferred”.

3.XCOPY:-
When we need to copy a source directory file from one location to another(target) then we uses xcopy
command. This command is much faster than copy command.
Syntax:- C:\> XCOPY < Source directory name > < target directory name>
C:\> XCOPY sree1 sree2
4.FC:-(File Compare)
This command is capable for comparing two set of files and display difference between two files.
Syntax:- C:\> FC <First set of file> <Second set of file>
C:\> FC ROSE.TXT GULAB.TXT
5.CHKDSK:-(Check disk)–
This command is used to check the status of a disk and show the report of result status like no. of
directories, no. of files, no. of bytes used by files and directories, volume name, date of creation, total disk
space, no. of bytes available in the disk etc.
Syntax:- C:\> CHKDSK
6.SORT:-
This command is useful when we want to sort a file. When we run this command the result can be get to
display device or file.
Syntax:- C:\> sort {press enter}
<file name1>
<file name2>
SORT/R:-
This option will sort the given information in reverse order that is it will display the information starting
with Z to A, or 9 to 0 i.e., descending order.
Syntax:- C:\> SORT /R < Input file name> <output file name>

7.FIND:-
The FIND command is used to search a file for a text string from the specified file.
Syntax:- C:\> FIND "String to search" <File name>
C:\>find "office" gulab.txt

---------- gulab.txt
A clock in a office can never get stolen
The office is in hyd.
FIND/n:-
This command is used to display the line number in which the particular string is matched.
C:\>find/n "office" gulab.txt
---------- gulab.txt
[1] A clock in a office can never get stolen
[2] The office is in hyd.
FIND/n:-
This command is used to display the all the lines that do not contain the specified string.

8.ATTRIB:-
Sets the various type of attribute to a file. Like Read only, Archive, Hidden and System attribute.
Syntax:- C:\> ATTRIB [± r] [± a] [± h] <File name>

Here r - for read only, a- for archive,


h - for hidden attribute.

C:\> ATTRIB +r Gulab.tx


This command will change the attribute of file gulab.txt
to read only mode.
To remove the read only attribute we will follow

C:\> ATTRIB -r Gulab.txt


9.DOSKEY:-
Once we install doskey , our dos will star to memorize all commands we used. We can recall those
commands using up or down arrow keys.
Key function for Doskey are given as-
UP,DOWN arrows recall commands
Esc clears current command
F7 displays command history
Alt+F7 clears command history
F9 selects a command by number
Alt+F10 clears macro definitions
Syntax:- C:\> DOSKEY

DOSKey installed
10. FORMAT:-
This command creates new Track & Sectors in a disk and places the Dos files into the disk.
Syntax:- C:\> FORMAT [drive name] [/S]
C:\> FORMAT A:
this command will create new track & sectors.
C:\> FORMAT A: /S
This command will transfer system files after formatting
the disk.
11.TREE:-
This command is used to display all the directories and sub directories which are stored in a particular
drive in a tree format.

Syntax:- C:\>TREE

TREE/f:-
This command is used to display all the files along with sub directories and directories which are stored
in a particular drive.

Windows Operating System


 The operating system window is the extension of the disk operating system.
 It is the most popular and simplest operating system; it can be used by any person who can read
and understand basic English, as it does not require any special training.
 However, the Windows Operating System requires DOS to run the various application programs
initially. Because of this reason, DOS should be installed into the memory and then window can
be executed.
Elements of Windows OS
 Graphical User Interface
 Icons (pictures, documents, application, program icons, etc.)
 Taskbar
 Recycle Bin
 Start button
 Windows explorer
 Mouse button
 Hardware compatibility
 Software compatibility
 Help, etc.

Difference between MS-DOS and Windows


MS-DOS WINDOWS
DOS uses CLI (command line interface). Windows used GUI (graphical user
interface).
DOS does not support networking. Windows does.

DOS is a single user OS. Windows is Multiuser.

DOS is a single tasking OS. Windows is Multitasking.


DOS supports 2 GB of maximum partition size. Windows supports 2 TB or more.
DOS uses FAT 16 file system. Windows uses FAT 32.
DOS does not need any pointing devices While Windows uses various pointing
devices such as light pen, mouse, etc.
DOS was an older version by Microsoft which was Windows has a GUI (Graphical User
entirely text and command based without a mouse. Interface) which means you can use a
mouse, view pictures, have icons, etc.
Dos are not user friendly. Windows operating system is user friendly.

You might also like