operating system

Download Report

Transcript operating system

Introduction to Computing
Lecture # 5
Outline
• System software and its components
• Operating system and its functions
• Device drivers and utility programs
2
System Software
• System software enables the applications software to
interact with the computer and helps the computer
manage its internal and external resources. (Williams &
Sawyer)
• System software is a collection of computer programs
that manage the resources of a computer and
facilitate access to those resources. (Schneider & Gersting)
• There are three basic components of system
software:
1. Operating systems
2. Device drivers
3
3. Utility programs
The Components of System Software
4
1.
Operating system the principal
component of
system software
2.
Device drivers help the computer
control peripheral
devices
3.
Utility programs support, enhance,
or expand existing
programs
The Operating System: What It Does
• The operating system consists of the master system
of programs that manage the basic operations of the
computer.
• These programs provide resource management
services of many kinds.
• They handle the control of and use of hardware
resources:
–
–
–
–
5
Disk space
Memory
CPU
Peripheral devices
The Operating System: What It Does
• Booting - the process of loading an operating system
into a computer’s main memory
6
The Operating System: What It Does
• Booting
– diagnostic routines first start up and test the main
memory, the central processing unit, and other
parts of the system to make sure they are running
properly.
– BIOS (basic input/output system) will be copied to
main memory to help the computer interpret
keyboard characters or transmit characters to the
display screen or to a diskette.
– Then the boot program obtains the operating
system, usually from hard disk, and loads it into the
computer’s main memory.
7
The Operating System: What It Does
• OS provides user interface: user-controllable display
screen that allows you to interact with your computer
8
The Operating System: What It Does
CPU Management
• Supervisor (kernel) – manages the CPU. It
remains in main memory while the computer
is running, and directs other “non-resident”
programs to perform tasks that support
application programs.
• Example
9
– Writing a report using a word processor program
and want to print out a portion of it while continuing
to write.
– OS will select a printer
– Executing printer driver
The Operating System: What It Does
Memory Management
• The OS manages memory via:
– Partitioning - division of memory into separate
areas called partitions, each of which can hold a
program or data.
– Foreground/background - division of memory into
higher priority (foreground) and lower priority
(background) areas.
– Queues - temporary line-ups for programs waiting
to be executed. Programs that are to be executed
wait on disk in queues.
10
The Operating System: What It Does
File Management
• A file is a named collection of related
information.
• A file can be a program or it can be a data file.
• Files are stored on hard disks and other
secondary storage devices.
• OS records the storage location of all files.
11
The Operating System: What It Does
Task Management
• A task is an operation such as storing, printing or
calculating.
• A computer is required to perform many different
tasks at once.
• Some operating systems also handle more than one
program at the same time.
• Among the ways operating systems manage tasks in
order to run more efficiently are:
– Multitasking
– Multiprogramming
– Time sharing
12
– Multiprocessing
The Operating System: What It Does
Task Management
• Multitasking
– Multitasking is the execution of two or more programs by one
user concurrently on the same computer with one CPU.
– Executing more than one program concurrently.
– Earlier OS could do only single-tasking
– Today, multitasking Operating Systems are used.
– OS directs the processor to spend a predetermined amount
of time executing the instructions for each program, one at a
time.
– A small part of each program is executed, and the cycle
keeps on repeating until processing is complete.
13
The Operating System: What It Does
Task Management
• Multiprogramming
– Multiprogramming is the execution of different
users’ programs concurrently on a multi-user
operating system.
– Concurrent execution of different users’ programs
– The processor spends a certain amount of time
executing each user’s program.
14
The Operating System: What It Does
Task Management
• Time sharing
– In time-sharing, a single computer processes the
tasks of several users at different stations in roundrobin fashion.
– Round-robin processing of programs for several
users.
– Time slicing is used for time sharing.
– A time slice is a fraction of a second.
– The computer may rapidly switch back and forth
15
among different tasks.
Introduction to Computing
Lecture # 5
The Operating System: What It Does
Task Management
Multitasking Vs Time-sharing
• Multitasking
• Time-sharing
• The processor directs the
programs to take turns
accomplishing small tasks
or events, such as, a
calculation, search a
record, print a part.
• The computer spends a
fixed amount of time with
each program before
going on to the next one.
• Each task may take a
different amount of time.
17
The Operating System: What It Does
Task Management
• Multiprocessing
– Multiprocessing is processing done by two or more
computers or processors linked together to perform
work simultaneously.
– Simultaneous processing of two or more programs
by multiple computers
– Processing instructions from different programs or
different instructions within the same program at
once.
18
The Operating System: What It Does
Task Management
• Two possible approaches to multiprocessing:
– Coprocessing - the controlling CPU works
together with specialized microprocessors called
coprocessors, each of which handles a particular
task.
– Parallel processing - several full-fledged
processors work together on the same tasks,
sharing memory.
19
The Operating System: What It Does
Task Management
Number of
Users
Number of
Processors
Order of
Processing
Multi-tasking
One
One
Concurrently
Multiprogramming
Multiple
One
Concurrently
Time sharing
Multiple
One
Round robin
Multiprocessing
One or more
Two or more
Simultaneously
Processing of two or more programs
20
The Operating System: What It Does
• Formatting (initializing) a disk - the process of
preparing that disk so that it can store data or
programs
21
Other System Software:
Device Drivers & Utility Programs
• Device drivers -
specialized software
programs that allow
input and output
devices to
communicate with the
rest of the computer
system
22
Other System Software:
Device Drivers & Utility Programs
• Many basic device derivers come with system
software.
• If, however, we buy a new peripheral device,
such as a mouse, scanner, or printer, the
package will include a device driver (probably
on a CD-ROM).
23
Utilities: Service Programs
• Utility Programs, also known as service programs,
perform tasks related to the control and allocation of
computer resources.
• They enhance existing functions or provide services
not supplied by other system software programs.
• Built-in utilities – as part of the operating system.
• External utility programs – such as Norton Desktop
24
Utilities: Service Programs
• Backup utility
– Program which makes a duplicate copy of the
information onto hard disk or removable media.
– Example: Norton Backup
25
Utilities: Service Programs
• Data-recovery utility
– Program which restores data that has been
physically damaged or corrupted.
– Data can be damaged by viruses, bad software,
hardware failure, and power fluctuations that occur
while data is being written/recorded.
26
Utilities: Service Programs
• Virus
– A virus consists of hidden programming
instructions that are buried within an application or
system program.
– They copy themselves to other programs, causing
destruction.
– Viruses are spread when people exchange floppy
disks or download information from computer
networks or the Internet
27
Utilities: Service Programs
• Antivirus software
– Program that scans hard disks, floppy disks, and
memory to detect viruses.
– Some utilities destroy the virus as soon as it is
detected and others notify the user of possible viral
behavior.
– Examples of antivirus software are Norton
AntiVirus, Dr. Solomon’s Anti-Virus Toolkit, McAfee
VirusScan, and Webscan.
28
Utilities: Service Programs
• Data compression utility
– In order to gain more disk space, the user has four
options:
•
•
•
•
delete old files
buy a new hard disk with more capacity
add an hard drive
or buy a data compression utility.
– Program which removes redundant elements,
gaps, and unnecessary data from a computer’s
storage space so that less space (fewer bits) is
required to store or transmit data.
29
Utilities: Service Programs
• Fragmentation - the
scattering of portions of
files about the disk in
nonadjacent areas, thus
greatly slowing access
to the files
• Defragmenter utility program that finds all the
scattered files on your
hard disk and
reorganizes them as
contiguous files
30
Utilities: Service Programs
• Disk scanner and disk
cleanup utilities:
• Detect & remove
unnecessary files
• Detect & correct disk
problems
31