36
Introduction to Computer Software Chapter 3

Introduction to Computer Software

  • Upload
    domani

  • View
    34

  • Download
    1

Embed Size (px)

DESCRIPTION

Chapter 3. Introduction to Computer Software. Software in General. each information system is based upon software under the form of programs and procedures software is needed for input , processing , output, storage and management activities Trends in software development: usage of packages - PowerPoint PPT Presentation

Citation preview

Page 1: Introduction to Computer Software

Introduction toComputer Software

Chapter 3

Page 2: Introduction to Computer Software
Page 3: Introduction to Computer Software

Software in General

each information system is based upon software under the form of programs and procedures

software is needed for input , processing , output, storage and management activities

Trends in software development: usage of packages usage of non-procedural languages ( 4GL )

Page 4: Introduction to Computer Software

Software Categories

SystemM anagem ent

Program s

SystemSupport

Program s

SystemD eve lopm ent

Program

Systemsoftw are

Program sG enera lPurpose

A pplica tion

A pplica tion-spec ificProgram s

A pplica tionSoftw are

C om puterSoftw are

- Operating Systems- Operating environments- Database

Management System- Telecommunications monitors

- System Utilities- Performance Monitors- Security monitors

- Programming Language

translators- Programming

environments- CASE packages

- Word Processing- Spreadsheets- Database

Managers- Telecommu-

nications- Graphics- Integrated

Packages

- Accounting- Marketing , Sales

analysis- Manufacturing- Production

Control- Finance Capital

Budgeting ,...

O’Brien 88

Page 5: Introduction to Computer Software

Software Trends

Trend: Toward Conversational Natural Programming Languages.

Trend: Toward Easy-to-Use Multipurpose Application Packages.

FirstGeneration

SecondGeneration

ThirdGeneration

FourthGeneration

FifthGeneration?

User-Written programs

Machine language

Packaged programs

Symbolic languages

Operating systems

High-level languages

Database ManagementSystems

4GL

Microcomputer Packages

Natural Languages

Multipurpose GUI Expert

SoftwareTrends

O’Brien 89

Page 6: Introduction to Computer Software

Application Software for End Users

General Applicable Software suites

– MS-office: word , excel, powerpoint, access, outlook, explorer

Web-browsers– netscape– explorer

Electronic mail CASE Encyclopedia Databases Groupware

– Lotus notes

Text: O’Brien p 92 - 101

Page 7: Introduction to Computer Software

Interfaces HW - user

End user

Application SW

System SW

Computer-hardware

System software•operating system: OS, DBMS, comm•support: system utilities•development: compilers, CASE, 4GL

Application software•packages•own development

O’Brien 98

Page 8: Introduction to Computer Software

Operating Systems

User interface file management Task management UNIX, VM or MVS, VSM, MS-DOS Database Management systems

ORACLE, Informix, INGRES, SYBASE, DB2, Paradox Telecommunication monitors

network servers, front-end processors, middleware Programming languages and Compilers

procedural vs. non-procedural, 4GL, natural languages Programming Tools

workbenches, prototyping tools, editors, debuggers

Page 9: Introduction to Computer Software

Basic Functions of an Operating System

Userinterface

Supporting programs and

other functions

Filemanagement

Task management

Utilitymanagement

Communication betweensystem and user

Management ofperipheral devices

Virtual memory

Task follow-up

Multitasking

Management ofdata andprograms

Supporting functions

Text: O’Brien p 105

Page 10: Introduction to Computer Software

Operating System

Examples : UNIX, DOS, OS/2, MVS

UNIX

Kernelprovides elementarycomputer functions

Programminglanguages

Text-processors

Pro

gram

sF

ile - andD

irectory systems

Communication and networks

Programming-utilities

Shell

Programinterpreter

Systeminterface

Page 11: Introduction to Computer Software

Operating systems

Operating system = management system

hides hardware details for the users

different machines look identical

depends on the type of applications

Page 12: Introduction to Computer Software

Other System Software

Network management ( middleware, firewalls, …)

File management

Database management systems

performance monitors

security monitor

Text: O’Brien p 108 - 109

Page 13: Introduction to Computer Software

Program Interaction with the Environment

Batch:

Interactive:

. no interaction with environment

. required data are prepared in advance

. results are delivered to the user afterwards

. moment in time and speed are unimportant for the user

. permanent dialogue between program and user

. input of data in function of the results

. moment in time and speed are extremely important for the user (real time)

. user friendly ( error messages )

Page 14: Introduction to Computer Software

The absolute binary loader

A program must first be loaded in central memory and the P-register must be initialized with the address of the first instruction of the program.

The absolute binary loader is a small program that:

. loads the binary form of the program (absolute object code) from the peripheral memory into the central memory

. is mostly stored in a reserved part of the memorycentral memory

ABL

Page 15: Introduction to Computer Software

The "command interpreter"

Command interpreter

Program that gives access to tables containing the name of the program and its address in the mass memory

These tables are managed by the file manager

With an instructive command processor the user inputs via the terminal , the name of the program to be executed

central memory

ABL

Load chess

chess

FMGR

comm.int

Page 16: Introduction to Computer Software

The interrupt handler

Normal program termination

________________________________________________________________________________________________________________________________________________________________________

________________________________________________________________________________________________________________________________________________________________________

________________________________________________________________________________________________________________________________________________

cmnd interpreterProgram X

return to cmnd.int

________________________________________________________________________________________________________________________________________________________________________

________________________________________________________________________________________________________________________________________________________________________

________________________________________________________________________________________________________________________________________________

cmnd interpreter Program X

return to cmnd.intcontrolunit

In case of a program interruption

Page 17: Introduction to Computer Software

Task scheduling

Task scheduler , job scheduler , queue manager

manages the waiting queue of all commands which have not yet been executed

If there is space available in memory , the task scheduler selects a task from the input queue and orders the loader to load the corresponding program into the memory

Selection criteria

. round robin algorithm: FIFO + limited time slice

CM

preempted tasks after t sec

new tasksfinishedtasks

Page 18: Introduction to Computer Software

Task scheduler 2

CM

preempted tasks after t sec

new batch tasks

finishedtasks

interactive queue

Batch queue

interactive tasks

Handle batch queue only if the interactive queue is empty

Page 19: Introduction to Computer Software

Process scheduling

The process scheduler is the part of the operating system that decides which program in memory , the CPU will work on .

Process status'sactive

wait for CPU

blocked

transitionactive-waiting

i/o terminated(interrupt)

starti/o

task terminated

load

swap-out

Transition Active-Waiting after action of the process scheduler

Page 20: Introduction to Computer Software

Process priorities

Algorithm for according priorities must be :

- simple ( overhead )

- give I/O jobs higher priority for optimal usage of I/O

active

wait for CPU

blocked

P:=P-1

P:=P+1

selectprocess with P max

P can get an initial value , eg. depending on the user category

Page 21: Introduction to Computer Software

Spooling

In case of shared usage of peripheral equipment in a multi-programming environment

Spooling monitor:

Part of the operating system that writes all of the available input and output per program on a disk , and makes it available as soon as the required peripheral equipment is free .

Program B

Program A

Program C

spooler

disk

Page 22: Introduction to Computer Software

End-User Applications

general purpose packages

word processing , productivity packages

Application-specific programs

Business application programs

Scientific application programs

Education, entertainment, art, law, medicine, ...

Graphics packages

Integrated Packages

Page 23: Introduction to Computer Software

Programmingand

programming languages

Page 24: Introduction to Computer Software

Programming

The same hardware can be used for various

applications thanks to the programmabilitySpecific aspects of tasks are not build-in in the hardware but in the software . They are loaded in the program memory ( except for some I/O functions ).

Programming is an important aspect in every automation project.

The programmer has to know the problem very well ;this has to be achieved during analysis or specification gathering .

Specifications are focused on the user.

Specifications are reflected in programs and translated intoan executable program.

Page 25: Introduction to Computer Software

Programming Languages

A Programming language is a set of conventions that allows to express a program in a format that is also more or less readable for humans.

Machine languages Use binary coded instructions

Assembly languages use symbolic coded instructions

Higher Programming languages use statements that are close to English together with arithmetic notations

Fourth generation languages use natural and non-procedural statements

Object oriented languages Data and procedures are combined in objects

Page 26: Introduction to Computer Software

Elementary Languages

There is a direct relationship between the vocabulary of the language ( syntax ) and the instructions for the computer

The most elementary language is the machine language

- operation codes and operands have the format of binary numbers

- completely machine-dependent

- almost unreadable for programmers

- source of errors

- time consuming

- 11011011 represents ADD in a certain language

Page 27: Introduction to Computer Software

Assembly Languages

1

2

3

4

5

6

7

8

9

STO

STO

EQ?

MUL

ADD

ADD

NE?

NE?

STO

0

0

KFL

D2

D2

D1

D1

D2

1

-

-

0

10

KDA

1

3

207

-

D1 P2

D2 P3

P3 P4

D2 P5

D2 P6

D1 P7

P3 P8

P1 P9

DDA P1

e.g.: opening door

• Operation codes and operands get symbolic names

• Addresses of words in memory that contain data get a meaningful name

• Require important knowledge about computers

• susceptible to errors

• Still hardware related

Page 28: Introduction to Computer Software

Higher Level languages

In higher level programming languages they try in the first place to make abstraction of the used machine

Procedures and data are described in terms that are closer to the application domain in which they are used

An instruction can represent a set of machine instructions ;Variables can take abstract values

eg.: month

Much higher productivity;

lower risk for errors:

• Imperative languages: BASIC, FORTRAN, COBOL, ADA, PASCAL, C, Modula, …• Non-imperative languages: LISP, PROLOG, Scheme

Page 29: Introduction to Computer Software

Language ExampleCalculate the average of two numbers

Memory addresses: written 30 oral 31 final 40

Pascal: final := ( written + oral ) / 2

Assembler: load a,written (CALM) add a,oral

divide a,#2 store a,final

machine language: 66 30 54 31 43 02 67 40

required computer knowledge always higher

Page 30: Introduction to Computer Software

Assessment

productivity of programmers is better with higher programming languages

Translation into machine language is not always optimal leading to theoretically slower programs

Higher cost for computer capacity largely compensated by reduced programming costs

elementary languages only used in case of:

- hardware cost much higher than programming cost

- small programs sold in large quantities

- critical parts of programs for supercomputers

Page 31: Introduction to Computer Software

Imperative languages

With imperative languages the programmer writes all tasks to be performed in the appropriate sequence

e.g.: linear equation AX+B=0

- read coefficients A and B ;

- calculate quotient of B divided by A ;

- change sign of the result ;

- assign the value of the quotient to X ;

- write the value of X .

COBOL, BASIC, ADA , Pascal , Modula , .....

Page 32: Introduction to Computer Software

Non-imperative languages

In non-imperative languages only the relationships between the data are given.

The actions to be performed by thee computer are derived from this relationships.

The solution of the linear equation can be formulated as follows:

- The coefficients A and B can be read- the variable X is defined by X= - B/A

to execute the program it is enough to write: write X

e.g.: LISP , PROLOG

Page 33: Introduction to Computer Software

Object oriented languages

In Object oriented languages programs pass an instruction to the object to perform the operation.

Actualstatus

register

transmit

calculate

status

Mo

nth

ly

overviewC

alcu

late

inte

rest

Des

ign

owne

rC++EifelSmalltalkJAVAVisual Basic

Text: O’Brien p 113

Page 34: Introduction to Computer Software

Compilers and Interpreters

Programs written in a higher language must be converted into machine language

Source code

Compiler Interpreter

Object code

Hardware

Page 35: Introduction to Computer Software

Compilers and interpreters 2Compiler:

During compilation the entire program is converted into executable OBJECT code. It can be saved and reloaded several times.

This is especially useful for larger programs that have to be executed several times without having to be modified.

Interpreter:The source code is translated by the interpreter instruction by instruction into machine language and immediately executed.At every execution the translation is redone.This is interesting to debug programs or for small programs using little mass memory.Source code takes much less space than object code.

Page 36: Introduction to Computer Software

Compilation vs Interpretation

execution

modifications

error messages

memory space

mass memory

Compilation Interpretation

fast

slow

cryptic

large

unavoidable

Slow

fast

clear

small

optional