Download CHAPTER 5 Supplementary

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
Transcript
CHAPTER 5 Supplementary
SOFTWARE
• We have seen before that the PC is a big data processor. In order to
do anything useful a computer needs instructions. These
instructions are called software, and there are many different
kinds.
• Software is usually kept on storage devices when it is not being
used, and loaded into a computer’s RAM when it is needed.
Software is always written in the form of programs or sets of
instructions for doing particular things. A computer is nearly
always using or running several programs at once on different
levels. Most computers use three software levels.
• System software runs a computer’s basic functions, such as
controlling which programs are running at any one time.
Examples of systems software include the operating system,
device drivers, programming languages, compilers, assemblers
and translators.
2
SOFTWARE
• Utility software helps users to organize their data. This
also includes drivers which control or drive devices that
are attached
• or linked to the computer. Some common utilities are
screensaver, virus checker, and system tools like disk
defragmenter. Certain utility programs are usually bundled
along with the operating system and are thought of as a type of
systems software. Windows comes with a variety of screen
savers, and various utilities including Drive space that displays
the percentage of drive space used and unused.
• Applications software programs, also called applications,
let users do specific jobs such as writing, drawing or
doing calculations.
3
• System and utility software together make up the
operating system.
SYSTEM SOFTWARE
• For the system software, some of the
instructions are built into the computer
when it is manufactured and are
permanently stored in ROM. This
software “boots up” the computer
when it is first turned on. In fact there
are several different programs inside
the start-up instructions, but for most
users, they are all woven together. You
can differentiate between:
• POST (Power On Self Test) The
Setup instructions, which connect
with the CMOS or BIOS
instructions, which connect with
the various hardware peripherals.
There, also are the Boot
instructions, which call the
operating system (DOS, OS/2, or
Windows_
4
• All these instructions are in ROM
chips, and they are activated one by
one during start-up. Let us look at
each part.
SYSTEM SOFTWARE
• There are three elements in the start-up part of
the ROM chip: The Initializing routine, which sets
up the BIOS functions. The adapter ROM is
integrated. A table covering all the BIOS
programs is constructed. This is often called the
interrupt vectors. The POST (the test programs)
The disk bootstrap loader, which calls upon the
operating system. These programs are stored in
the ROM chip, and they are activated one by
one during the PC start-up.
5
SYSTEM SOFTWARE
The POST
• Power On Self Test is the instruction executed during start-up. It checks the PC
components and that everything works. You can recognize it during the RAM test,
which occurs as soon as you turn power on.
• You may follow the checks being executed in this order, as the information are
gathered:
– 1) Information about the graphics adapter
– 2) Information about the BIOS (name, version)
– 3) Information about the RAM (being counted)
• As users, we have only limited ability to manipulate the POST instructions. But certain
system boards enable the user to order a quick system check. Some enable the user
to disable the RAM test, thereby shortening the duration of the POST. The duration of
the POST can vary considerably in different PCs. If POST detects errors in the
system, it will write error messages on the screen. If the monitor is not ready, or if the
error is in the video card, it will emit a pattern of beeps, (for example 3 short and one
long) to identify the error to the user. If you want to know more of the beeps, you can
find explanations on the Award, AMI and Phoenix web sites. For instance you will
receive error messages if the keyboard is not connected or if something is wrong with
6
the cabling to the floppy drive. POST also reads those user data, which are found in
the CMOS.
SYTEM SOFTWARE
The bootstrap loader
• The last part of the BIOS
execution at start-up is the
bootstrap loader. It is a tiny
program, which only has one
task: to find the boot sector on a
disk (hard disk, floppy or
another boot-drive). When the
disk holds no boot strap routine,
you get an error message like
"Non-system disk, replace with
system disk and press any key".
The bootstrap loader is the last
step in BIOS execution during
start-up. It hands over the
control to the bootstrap routine
found on the boot disk. The OS
is being loaded.
7
SYSTEM SOFTWARE
Two types of data
• CMOS data can be divided in two groups:
Data, which POST cannot find during the
system test and Data, which contain user
options. For example, POST cannot by
itself find sufficient information about the
floppy drive(s). POST cannot read whether
they are floppy drives or not, nor what type.
About the same goes for IDE hard disks,
while EIDE hard disks are a little more
"intelligent," However, POST still needs
assistance to identify them 100% correctly.
The same goes for RAM: POST can count
how much RAM is in the PC. However,
POST cannot always detect the type of
RAM. Since the CPU and BIOS reads data
from RAM chips differently, depending on
the RAM type, the type must be identified to
setup the correct timing.
8
SYSTEM SOFTWARE
The configuration of CMOS data
• The PC must be configured, be supplied with this information.
That is done in the factory or store, where it is assembled. This
information is stored in CMOS, where they stay. CMOS data only
need to be updated, when different or additional hardware
components are installed. This could be a different type hard disk
or floppy disks or a new RAM type. Often the user can do this
him / herself.
• Other data in CMOS contain various user options. This is data,
which you can be written to CMOS. For example, you can adjust
date and time, which the PC then adjusts every second. You can
also choose between different system parameters. Maybe you
want a short system check instead of a long one. Or if you want 9
the PC to try to boot from hard disk C before trying floppy disk A,
or vice versa. These options can be written to CMOS.
SYSTEM SOFTWARE
Opening the Setup program
• You communicate with the BIOS programs and the
CMOS memory through the so-called Setup program.
This gives us a very simple user interface to configuring
the PC with these vital data. Typically you reach the
Setup program by pressing [Delete] immediately after
you power up the PC. That brings you to a choice of
setup menus. You leave Setup by pressing [Esc], and
choose "Y" to restart the PC with the new settings.
Generally, you should not change these settings, unless
you know precisely what you are doing.
10
SYSTEM SOFTWARE
The boot process
• The last step in the PC start-up is reading the
operating system. The start-up program is
instructed to find the Master Boot Record. This is
located in the very first sector on either hard disk ©
or floppy drive A. From the MBR it reads the bootstrap which points to the location of the startup files
of the Operating System. By default, the PC will
look for a boot sector in floppy drive A. That is why
the PC "drops dead" if there is a different diskette
in A drive. If there is no diskette in A drive, the startup program will search for the boot sector on hard
drive C. When the boot sector is found, a small
program segment (boot-strap ) is read from there.
The boot-strap then takes over control of the PC.
The start-up program has done its job. Now DOS,
Windows, Linux, or another operating system takes
control. The operating system allows the computer
to do all the other jobs you want it to by managing
the interaction of both parts of a computer system:
the hardware and the software.
11
UTILITY SOFTWARE
• On personal computers, all the information is
organized in files (sometimes called
documents). These files are themselves
organized into groups called folders or
directories. The operating system has
special programs called utilities for keeping
collections of files and folders tidy. Utilities
allow naming, renaming, copying, deleting,
regrouping, etc. files. More on this topic will
be covered in the Operating System section.
12
UTILITY SOFTWARE
APPLICATION SOFTWARE
• There are thousands and thousands of different types of applications
software. There are programs for farmers, gamblers, games, programs for
working out scientific formulas, etc. A piece of applications software is
called a software package. A package that contains several
applications is called integrated software or a software suite. Software
can be custom-written (written specially for your needs) or shrinkwrapped (mass-produced). A software package usually comes in a
box containing floppy disks or CDs and documentation including a
manual for installing and using the software and the license. The
license is a contract where the user is entitled to use, generally, the
software in one single computer; if there is the need to use that same
software in other computer(s) then more copies of the software must
be purchased. There are also software applications that can be
downloaded from internet; in this case there are two types of software
freeware (free software) and shareware (software that can be used for
a limited period of time, usually 30 days, when it has passed you need
to pay to continue using it). A similar term used for shareware is trial 13
software. Some of the most used applications are described here.
BASIC APPLICATIONS
Word processing
• This software allows computer users to type documents, such as
reports, essays, letters, etc. It includes many useful functions that
make this easier, for example check for spelling mistakes, delete,
move and copy text, combine one document with another, and so
on.. When documents are finished they can be stored on the hard
disk or on a floppy disk or printed.
Database software
• A database is an electronic way of storing and managing
information. It helps to find data quickly and easily. A file
processing system (FPS) is a software for working with simple
databases. A DataBase Management System (DBMS) is more
powerful and can analyze data in many ways.
Desktop Publishing (DTP)
• Is a computerized way of designing the layout of text and pictures 14
in publications, such as books, magazines and leaflets.
BASIC APPLICATIONS
Financial software
• Businesses often use financial or business software to do calculations
on finances (money). There are several kinds of financial software.
Personal financial management software is used to keep records of
private spending. Business Accounting software is used to keep
financial records and organize wages and tax. Financial analysis
software is used by banks and businesses to examine financial data
and predict, or forecast, future profits and spending. Most financial
software programs use spreadsheets or worksheets. These are
mathematical tables which show figure in horizontal rows and vertical
columns.
Computer Aided Design (CAD)
• It is used by designers to draw 3-D designs of buildings, vehicles, furniture
and all sort of other things.
• Computer Aided Testing software is used to test CAD designs. It is
used to visualize or to see a design behaving like a real object. There
are several types of testing including resistance testing and crash
testing.
15
BASIC APPLICATIONS
Graphics software
• Can be used to create pictures or to change and process
pictures you put into a computer. Computer graphics are any kind
of pictures made or processed in a computer. Graphics software
has many creative uses such as making computer art, cartoons
and special effects for films.
Sound and music software
• Is software for processing sound. Some sound software can
recognize human voice and imitate speech. Other software is
used to mix musical sounds or create completely new sounds.
Processing sounds in a computer is called audio processing or
Digital Audio Processing DAP. Any sound that we can hear exists
in the form of sound waves which travel trough the air into our
ears. A device converts sound waves into digital signals so they 16
can be processed and a digital analog device turns them back
into sounds.
BASIC APPLICATIONS
• Voice recognition software can analyze and recognize human
speech. It usually works by word recognition that is, recognizing
the sounds of individual words when they are spoken separately.
Software recognition software converts each word into a pattern
and compares the patterns with each other to work out which word
is which. This method is called pattern-matching. Word
recognition software is usually used in voice controlled word
processors, dictation software or voice input systems.
Games, entertainment and education
• Computers can be used for fun and for learning and training. Computer
games software is one of the most popular of all types of software.
Some games, especially those for children, are designed to be
educational as well. Multimedia software is often both entertaining and
educational. Games, entertainment and education
• Computers can be used for fun and for learning and training. Computer
games software is one of the most popular of all types of software.
Some games, especially those for children, are designed to be
educational as well. Multimedia software is often both entertaining and 17
educational.
OPERATING SYSTEM
• The master control program that runs the computer. The first
program loaded when the computer is turned on, its main part,
the "kernel," resides in memory at all times. The operating
system sets the standards for all application programs that run in
the computer. The applications "talk to" the operating system for
all user interfaces and file management operations.
• Also called an "executive" or "supervisor," an operating system
performs the following functions.
• User Interface All graphics based today, the user interface
includes the windows, menus and method of interaction between
you and the computer. Prior to the Mac, Windows and Motif
(UNIX) interfaces, all interaction was based on commands
entered by the user. Operating systems may support optional
18
interfaces and allow a new shell, or skin, to be used instead.
19
OPERATING SYSTEM
• Job Management Job management controls the order and time in
which programs are run and is more sophisticated in the mainframe
environment where scheduling the daily work has always been routine.
IBM's job control language (JCL) was developed decades ago. In a
desktop environment, batch files can be written to perform a sequence
of operations which can be scheduled to start at a given time.
• Task Management Multitasking, which is the ability to simultaneously
execute multiple programs, is available in all operating systems today.
Critical in the mainframe and large server environment, applications can
be prioritized to run faster or slower depending on their purpose. In the
desktop world, multitasking is necessary just for keeping several
applications open at the same time so you can bounce back and forth
between them.
• Data Management Data management keeps track of the data on disk,
tape and optical storage devices. The application program deals with
data by file name and a particular location within the file. The operating
system's file system knows where that data is physically stored (which
sectors on disk) and interaction between the application and operating 20
system is through the programming interface. Whenever an application
needs to read or write data, it makes a call to the operating system.
OPERATING SYSTEM
• Device Management Device management controls peripheral
devices by sending them commands in their own proprietary
language. The software routine that knows how to deal with each
device is called a "driver." The operating system contains all the
drivers for the peripherals attached to the computer. When a new
peripheral is added, that device's driver is installed into the operating
system.
• Security Multi-user operating systems provide password protection
to keep unauthorized users out of the system. Large operating
systems also maintain activity logs and accounting of the user's time
for billing purposes. They also provide backup and recovery routines
for starting over in the event of a system failure.
21
HISTORY
• The earliest operating systems were developed in the late 1950s to
manage tape storage, but programmers mostly wrote their own I/O
routines. In the mid-1960s, operating systems became essential to
manage disks, complex timesharing and multitasking systems. Today,
all multi-purpose computers from micro to mainframe use an operating
system. Special-purpose devices (appliances, games, toys, etc.)
generally do not. They usually employ a single program that performs
all the required I/O and processing tasks.
• Common Operating Systems
• The primary operating systems in use are the many versions of
Windows (95, 98, NT, ME, 2000, XP), the many versions of UNIX
(Solaris, Linux, etc.), the Macintosh OS, IBM mainframe OS/390 and
the AS/400's OS/400. DOS is still used for some applications, and there
are other special-purpose operating systems.
22
BNF
• Backus-Naur Form (1959)
– Invented by John Backus to describe ALGOL
• 58 and later modified slightly by Peter Naur for
the description of ALGOL 60
– BNF is equivalent to context-free grammars
– BNF is a metalanguage used to describe another
language
– In BNF, abstractions are used to represent classes of
syntactic structures--they act like syntactic variables
(also called nonterminal symbols)
BNF Example
• Non-terminals: BNF abstractions
• Terminals: lexemes and tokens
• Grammar: a collection of rules
– Examples of BNF rules:
<ident_list> F identifier | identifier, <ident_list>
<if_stmt> F if <logic_expr> then <stmt>
BNF Rules
• A rule has a left-hand side (LHS) and a righthand side (RHS), and consists of terminal and
nonterminal symbols
<assign>→ <var> = <expression>
• A grammar is a finite nonempty set of rules
• An abstraction (or nonterminal symbol) can have
more than one RHS
<stmt> →<single_stmt>
| begin <stmt_list> end
Describing Lists and Derivations
• Syntactic lists are described using
recursion (a rule is recursive if its LHS
appears in its RHS)
<ident_list> → ident
| ident, <ident_list>
• A derivation is a repeated application of
rules, starting with the start symbol and
ending with a sentence (all terminal
symbols)
Example Grammar
A Grammar for a small Language
<program> →begin <stmt_list> end
<stmt_list>→ <stmt>
|<stmt> ; <stmt_list>
<stmt> → <var> = <expression>
<var> → A | B | C | D
<expression> → <var> + <var>
| <var> - <var>
| <var>