chapter4

advertisement
Chapter 4
Software and OS
1
Outline
• Definition
• Categories of Software
– System Software
– Application Software
• Operating systems
2
Objectives
•
•
•
•
•
•
Define software.
List the functions of system software.
List the commonly used application software.
Describe operating system.
Explain the evolution of operating systems.
Explain how the operating system serves as the
memory manger, process manager, device
manager, and file manager.
• Recognize different operating systems
3
part 1
DEFINITION
4
Big picture
5
What is software?
• A computer has no intelligence of its own and
must be supplied with instructions that tell it what
to do and how and when to do it. These
instructions are called Software.
• The U.S Copyright Act of 1980 defines software
as “a set of statements or instructions to be used
directly or indirectly in a computer in order to
bring about a certain result.”
6
What is software?
• We define software as the instructions and
associated data, stored in electronic format,
that direct the computer to accomplish a
task.
• “Software” is a plural noun, so there is no
such thing as “softwares” or “one software”.
People use “software package” to describe a
particular example of software.
7
programs, data and software
• A computer program is a set of detailed, step-bystep instructions that tells a computer how to solve
a problem or carry out a task.
• Software is made up of a group of related
computer programs, if those programs work
together to carry out a task.
• Software also can include data, but data alone is
not software.
8
part 2
CATEGORIES OF
SOFTWARE
9
Software categories
• Computer software can be classified into 2
categories:
– System Software
– Application Software
• System software is the general manager that helps
the computer carry out its basic operating tasks.
• Application software is your servant that helps the
human user carry out a specific task.
10
Software categories
11
system software
• System software deals with the physical
complexities of computer hardware. It consists of
four kinds of programs: operating systems,
utilities, device drivers, and language translators.
• System software tells the computer
– how to interpret data and instructions;
– how to communicate with peripheral equipment like
printer, keyboard and disk drives;
– how to manage files;
– how to use the hardware in general;
– ……
12
system software
• Operating systems are programs that
operate your microcomputer. They
coordinate computer resources, provide an
interface between users and the computer,
and run applications.
• It resides in RAM.
• It includes BIOS, which manages the
essential peripherals.
13
system software
• Utilities, also known as service programs,
perform specific tasks related to managing
computer resources or files.
• They are used to support, enhance, or
expand existing programs in a computer
system.
• They include programs to help users
identify hardware problems, locate lost files
(data recovery), and backup data.
14
system software
• Device drivers are specialized programs
designed to allow particular input or output
devices to communicate with the rest of the
computer system.
• Language translators convert the
programming instructions written by
programmers into a language that
computers understand and process.
15
application software
• Application software (the user’s tools) is software
that performs tasks to directly benefit or assist the
user.
• Some types of application software:
–
–
–
–
–
–
Word processing
Spreadsheet applications
Presentation graphics
Database management
Web browsing
Games
16
Computer System
Education reference
software
User interface
Other system software
components
Operating System
Hardware
Productivity
software
specialty
software
Entertainment
software
Home/personal
software
Misc. software
17
part 3
OPERATING SYSTEMS
18
Functions of OS
• Every computer has an operating system,
and every operating system performs three
basic functions:
– managing resources
– providing a user interface
– running applications.
19
Functions of OS
• Resources: These programs coordinate all
the computer's resources including
keyboard, mouse, printer, monitor, storage
devices, and memory.
20
Functions of OS
• User interface: Users interact with
application programs and computer
hardware through a user interface. Almost
all operating systems today provide a
windows-like graphical user interface (GUI)
in which graphic objects called icons are
used to represent commonly used features. .
21
Functions of OS
• Applications: These programs load and run
applications such as word processors and
spreadsheets. Most operating systems
support multitasking, or the ability to run
more than one application at a time.
22
Two kinds of user interfaces
• The user interface is the part of the
operating system with which we are most
familiar. This is the part of the operating
system we interact with when using the
computer. The two most common types of
user interfaces are command-line interfaces
and graphical interfaces.
23
two kinds of user interfaces
• Command-line Interfaces
– All early computers used command-line
interfaces. With this type of interface, you must
type the exact command you wish to execute.
One of the most widely used command-line
interfaces for microcomputer is DOS. This type
of interface is not considered user friendly. You
must memorize the commands and type them
without any spelling errors. Otherwise, they do
not work.
24
Two kinds of user interfaces
• Graphical User Interfaces
– When the user turns on the computer and starts
the operating system, a symbolic desktop is
displayed. On this desktop are various objects,
or icons. These graphical symbols represent
files, disks, programs, and other objects. GUIs
permit the user to manipulate these on-screen
icons. Most people use a pointing device such
as a mouse to click on the icons and execute the
commands.
25
Common operating systems
• DOS
• Command-driven DOS—short for Disk Operating
System—was very popular in the 1980s and early
1990s and runs primarily on PCs (IBM and IBMcompatible). IBM's version of DOS is called PCDOS and Microsoft's version of DOS is called
MS-DOS. Both were developed by Microsoft, and
they are essentially the same.
26
Common operating systems
• Windows
• By far the most popular microcomputer operating
system is Microsoft's Windows with over 90
percent of the market. Windows is designed to run
with Intel and Intel-compatible microprocessors
such as the Pentium III, and IV. It comes in a
variety of different versions including Windows
98, Windows 2000 , Windows XP and Windows
Vista.
27
Common operating systems
• OS/2
• OS/2 is IBM's multitasking graphical user
interface operating system designed to work
with 32-bit microprocessors. However, due
to some management and marketing
disasters, IBM failed to increase its market
share against Windows. Nowadays, only
some businesses use OS/2.
28
Common operating systems
• UNIX
• UNIX is the oldest operating system still used
today. UNIX is a multiuser, multitasking operating
system with built-in networking capabilities.
Because it can run with relatively simple
modifications on most types of computers—from
micros to minis to mainframes—UNIX is called a
portable operating system.
29
Common operating systems
• Linux
• Linux is a version of UNIX. Linus Torvalds
developed Linux in 1990 while he was a
computer science student at Helsinki
University in Finland. He developed it as
freeware, offering UNIX's power without
the hefty price. Free Linux versions can be
downloaded from hundreds of Internet sites.
30
Common operating systems
• Mac OS
• The Mac OS is designed to run on
Macintosh computers. While its market
share is much less than that of Windows, it
is a very powerful and easy-to-use operating
system. Mac computers make up about 4%
of the personal computer market.
31
Common operating systems
• NetWare
• Novell's NetWare is a widely used network
operating system designed for client-server
networks. NetWare has a server portion that
resides on the network server and a client
portion that resides on each client computer
connected to the network.
32
Possible future trend
• Nothing stands still, everything is changing.
33
Evolution of OS
• Batch systems
– Each program to be executed is called a job.
• Time-sharing systems
–
–
–
–
Multiprogramming
Time sharing
Scheduling
Process
• Personal systems
• Parallel systems
• Distributed systems
34
Components of an OS
35
Memory manager
• Memory allocation must be managed to
prevent the “running out of memory”
syndrome.
• Monoprogramming: one single program is
in memory for execution.
36
Memory manager
• In multiprogramming, more than one
program is in memory at the same time, and
they are executed concurrently.
• The CPU switches between programs.
37
Memory manager
38
Partitioning
• In this scheme, memory is divided into
variable length sections.
• Each section or partition holds one program.
• The CPU switches between programs.
39
Paging
• In paging, memory is divided into equally
sized sections called frames.
• The program is divided into equally sized
sections called pages.
• The size of a page and a frame is usually the
same and equal to the size of the block used
by the system to retrieve information from a
storage device.
40
Demand paging
• In demand paging, the program is divided
into pages, but the page can be loaded into
memory one by one, executed, and replaced
by another page.
• In other words, memory can hold one page
from multiple programs at the same time.
41
Demand segmentation
• In demand segmentation, the program is
divided into segments that match the
programmer’s view.
• These are loaded into memory, executed,
and replaced by another module from the
same or a different program.
42
Demand paging and segmentation
• A segment may be too large to fit any
available free space in memory.
• Memory can be divided into frames, and a
module can be divided into pages.
• The page of a module can then be loaded
into memory one by one and executed.
43
Virtual memory
• Virtual memory, which implies demand
paging, demand segmentation, or both, is
used in almost all operating systems.
44
Process manager
• A program is a nonactive set of instructions
written by a programmer and stored on disk (or
tape). It may or may not become a job.
• A program becomes a job from the moment it is
selected for execution until it has finished running
and becomes a program again. During this
duration, a job may or may not be executed.
• A process is a program in execution. It is a
program that has started but has not finished. A
process is a job that is residing in memory.
45
State diagrams
• Refer to page 130 for explanation.
46
Schedulers
• To move a job or process from one state to
another, the process manager uses two
schedulers:
– The job schedulers(page131)
– The process schedulers(page131)
47
Queuing
• There are many jobs and many processes
completing with each other for computer
resources.
• To handle multiple processes and jobs, the
process manager uses queues (waiting lists).
• Associated with each job or process is a job
control block or process control block that
stores information about the job or process.
48
Queuing
• The process manager can have different
policies for selecting the next job or process
from a queue:
–
–
–
–
First in, first out (FIFO)
Shortest length first
The one with the highest priority
etc.
49
Process synchronization
• The whole idea behind process management
is to synchronize different processes with
different resources.
• Whenever resources can be used by more
than one user (processes in this case), you
can have two situations: deadlock and
starvation.
50
Deadlock
51
Deadlock
• Deadlock occurs when the operating system does
not put resources restrictions on processes.
• 4 necessary conditions for deadlock:
– Mutual exclusion (only one process can hold a resource)
– Resource holding ( a process holds a resource even
though it cannot use it until other resources are
available)
– No preemption (the OS cannot temporarily reallocate a
resource)
– Circular waiting (all processes and resources involved
form a loop)
52
Starvation
53
Starvation
• Starvation is the opposite of deadlock.
• It can happen when the OS puts too many
resource restrictions on a process.
• For example, imagine an OS that specifies
possession of all the required resources
before a process can be run.
54
Device manager
• The device manager, or I/O manager, is
responsible for access to I/O devices.
– The device manager monitors every I/O device
constantly to assure that the device is functioning
properly. The manager also needs to know when a
device has finished serving one process and is ready to
serve the next process in the queue.
– The manager maintains a queue for each I/O device or
one or more queues for similar I/O devices.
– The manager controls the different policies for
accessing I/O devices.
55
File manager
• A file manager is responsible for access
files.
– Controls accesses to files.
– Supervises the creation, deletion, and
modification of files.
– Control the names of files.
– Supervises the storage of files, how they are
stored, where they are stored, etc.
– Is responsible for archiving and backups.
56
Objectives
•
•
•
•
•
•
Define software.
List the functions of system software.
List the commonly used application software.
Describe operating system.
Explain the evolution of operating systems.
Explain how the operating system serves as the
memory manger, process manager, device
manager, and file manager.
• Recognize different operating systems
57
That’s all for this chapter!
58
Download