Lecture 1 Os
Lecture 1 Os
Lecture # 01
Subject:
Operating System (OS)
Lecture Topic:
Introduction about OS
1. BATCH OS
2. Distributed OS
3. Network OS
4. Time sharing OS
5. Real time OS
6. Multiprocessing OS
7. Multiprogramming OS
Basic Units of Data
Measures
Basic Units of Data
Measures
0,1 = bit represent by small b
4 bits= I Nible
8 bits= 1 byte denoted by B
1024B byte= 1 KB=10^3 B
1024 KB (kilo byte) = 1MB=10^6 B
1024 MB (mega byte) = 1GB= 10^9 B
1024 GB (gaga byte) = 1TB=10^12 B
1024 TB (Tera Byte) = 1PB=10^15 B
1024 PB (pita byte) = 1EB=10^18 B
1024 EB (exa byte) = 1ZB= 10^21 B
1024 ZB (zeta byte)= 1YB( yutta byte)=10^24 B
FUNCTIONS OF OPERATING SYSTEM
1- Memory Management
2- Job Scheduling
3- Booting
4- Device Management
5- Accessing the Web
6- Monitoring Performance
7- Housekeeping Services/ File
Management
8- Controlling Networks
9- Administrating Security
10- Providing User interface
1- Memory Management
Memory management is a process of
optimizing the use of main memory. RAM is
used to store data and instructions
temporarily during execution. OS allocated
memory area to different programs. The
allocated memory area is deallocated when
the program finishes. Some OS allocates a
part of storage medium like hard disk as
additional RAM. A part of Running program
can be in RAM and remaining part may be on
hard disk. This is known as virtual memory.
1- Memory Management
The area of hard disk used for virtual
memory is called swap file. It is used for
exchange data, information and
instructions between memory and hard
disk. The amount of data and program
instructions that can swap at a given time is
called page. The process of swapping items
between memory and hard disk is called
paging.
A situation in which most of the time of OS
is wasted in paging instead of executing the
program is called thrashing.
2- Job Scheduling/Process
Management
Any operation managed by processor is called
job. There may be many jobs to execute such
as executing instructions, getting input or
displaying results to the user etc. OS
determines the order in which these jobs are
processed.
Many scheduling mechanisms are used by the
OS to execute these jobs. Some times, jobs are
executed (FIFO). But in some situations, the
new coming job is given more priority like
(LIFO).
2- JOB SCHEDULING/PROCESS
MANAGEMENT
Some times a device is already busy in executing
some instructions. In this case, the new job is
stored in a memory area called buffer. For
example, if there are three printing jobs, the printer
can print only one job at a time. The OS sends the
next two jobs in buffer. It is know as spooling. The
jobs in buffer is said to be in queue. When printer
completes the first job, it gets the next job from the
buffer and execute it. This is done by the program
called print spooler.
3- Booting
Booting is a process of starting or
restarting the computer. OS starts the
computer to work.
Types of Booting
1- cold boot: when the computer is
turned on after it has been powered off
completely, it is called cold boot.
2- Warm Boot: when the computer is
restarted, it is called Warm booting.
Booting
When booting process take place, the
Kernel and important instructions of OS are
copied from hard disk to main
memory(RAM). Kernel is the most important
part of OS that manages memory and
devices, maintains computer clock, starts
applications and assign computer resources
like devices, programs, data and information
etc.kernel remains in memory permanently
while the computer is turned on.
Six major events of Booting
1- the computer receives and distributes
electrical power to its circuits so the system
components can run.
2- BIOS program starts when the ROM chip
receives power. The BIOS contains instructions
for starting the system before the OS is loaded.
3- the BIOS performs the power-on-self-
test(POST) to check critical system components
and make sure they are running properly. The
computer may beep and flash messages on the
screen during this step.
Six major events Booting
4- if the system components are running properly, the
BIOS looks for devices connected to the computer and
checks their settings. If the BIOS finds an error, the
computer may beep again and display error messages
describing the problem.
5- if steps 3-4 are successful and error free, the BIOS
searches for the system files required to run the OS into
RAM. The OS takes over control of computer function
once the kernel is loaded.
6- the OS completes setup tasks such as requesting
username and password, starts and runs utility software
and other programs in the background. It then display
the main user interface screen.
2- JOB SCHEDULING/PROCESS
MANAGEMENT
Some times a device is already busy in executing
some instructions. In this case, the new job is
stored in a memory area called buffer. For
example, if there are three printing jobs, the printer
can print only one job at a time. The OS sends the
next two jobs in buffer. It is know as spooling. The
jobs in buffer is said to be in queue. When printer
completes the first job, it gets the next job from the
buffer and execute it. This is done by the program
called print spooler.
4- Device Management
OS manages all devices attached to the computer.
The hardware devices are controlled/managed
with the help of small program called device
drivers. A device driver is a program tat tells the
OS how to communicate with a device.
Each device has its own set of commands and
requires a specific driver. The OS loads the drivers
of all the devices when the computer boots. The
devices can not function properly without device
drivers. In windows OS the device drivers file
extension is “.drv” .
4- Device Management
The latest windows OS contain a large
number of device drivers. When a new
hardware device is attached to the
computer, it automatically detects the
device and installs its driver if it is
available. This is known as Plug and Play.
If the driver for the new device is not
available, the OS guides the user to install
it manually from the CD of floppy disk etc.
5- Accessing the Web
OS provides the facility to connect to the
web. It guides the user to set up a
connection between computer and ISP
(internet service provider). Some OS also
provide the facility of web browser and
email program. Web browser is used to
view websites on the internet and email
program is used to send and retrieve
emails on computer.
6- Monitoring
Performance
OS also monitors the performance of the
computer. A performance monitor is a
program that checks and reports
information about different system
resources and devices. For example, it
monitors the processor, disks, memory
and network etc.
7- Housekeeping Services/ File
Management
OS perform different functions related to storage
and file management by using a special program
known as file manager. These functions include
the following,
1- formatting and copying disks
2- displaying a list of files on a storage medium.
3- checking the amount of used of free space on a
storage medium.
4- organizing, copying, renaming, moving and
sorting files.
5- creating shortcuts.
8- Controlling Network
Some OS are network OS called network
OS or NOS. these are the OS that support
network. A network OS organizes how
multiple users access and share resources
on the network. These resources include
programs, files and hardware devices such
as drivers and printers etc.
9- Administrating Security
OS manages the security of computer system as
well as data programs stored on it. Security is
normally maintained by using userID and
passwords. Each user has to enter user ID and
Passwords to log on. The user ID and password
identifies each user independently.
The network administrator can also define
different levels of access for different users. For
example, some users may have full access to all
resources of computer but some users may be
restricted to only specific resources.
10- Providing User interface
User interface is used to interact with the
computer. User interface controls how you
enter data and instructions and how
information is displayed on the screen.
Different types of user interfaces.
1- command line user interface
2- GUI(graphical user interface
)
1- Command Line Interface