Скачать презентацию Chapter 3 Introduction to Computer Software Software Скачать презентацию Chapter 3 Introduction to Computer Software Software

3ce0e767f78c66480720d1130e9e92f7.ppt

  • Количество слайдов: 36

Chapter 3 Introduction to Computer Software Chapter 3 Introduction to Computer Software

Software in General l l each information system is based upon software under the Software in General l l 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 ( 4 GL )

Software Categories O’Brien 88 Software Categories O’Brien 88

Software Trends First Generation Second Generation O’Brien 89 Third Fourth Fifth Generation? Trend: Toward Software Trends First Generation Second Generation O’Brien 89 Third Fourth Fifth Generation? Trend: Toward Conversational Natural Programming Languages. User-Written programs Software Trends Packaged programs Operating systems Database Management Systems Machine language Symbolic languages High-level languages 4 GL Microcomputer Packages Trend: Toward Easy-to-Use Multipurpose Application Packages. Natural Languages Multipurpose GUI Expert

Application Software for End Users l General Applicable Software ê suites – MS-office: word Application Software for End Users l 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

Interfaces HW - user System software • operating system: OS, DBMS, comm • support: Interfaces HW - user System software • operating system: OS, DBMS, comm • support: system utilities • development: compilers, CASE, 4 GL Application software • packages • own development O’Brien 98 End user Application SW System SW Computerhardware

Operating Systems l l l User interface file management Task management UNIX, VM or Operating Systems l l l User interface file management Task management UNIX, VM or MVS, VSM, MS-DOS Database Management systems ê l Telecommunication monitors ê l network servers, front-end processors, middleware Programming languages and Compilers ê l ORACLE, Informix, INGRES, SYBASE, DB 2, Paradox procedural vs. non-procedural, 4 GL, natural languages Programming Tools ê workbenches, prototyping tools, editors, debuggers

Basic Functions of an Operating System User interface Communication between system and user Utility Basic Functions of an Operating System User interface Communication between system and user Utility management Task management File management Management of peripheral devices Task follow-up Management of data and programs Multitasking Virtual memory Text: O’Brien p 105 Supporting programs and other functions Supporting functions

Operating System Examples : UNIX, DOS, OS/2, MVS Kernel System interface Programs UNIX Shellprovides Operating System Examples : UNIX, DOS, OS/2, MVS Kernel System interface Programs UNIX Shellprovides elementary computer functions File - and Directory systems Text. Programming processors languages Program interpreter Communication Programmingand networks utilities

Operating systems Operating system = management system l hides hardware details for the users Operating systems Operating system = management system l hides hardware details for the users l different machines look identical l depends on the type of applications

Other System Software l Network management ( middleware, firewalls, …) l File management l Other System Software l Network management ( middleware, firewalls, …) l File management l Database management systems l performance monitors l security monitor Text: O’Brien p 108 - 109

Program Interaction with the Environment Batch: . no interaction with environment. required data are Program Interaction with the Environment Batch: . 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 Interactive: . 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 )

The absolute binary loader A program must first be loaded in central memory and 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 memory central memory ABL

The 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 Load chess central memory chess FMGR comm. int ABL

The interrupt handler Normal program termination cmnd interpreter ________________________ ________________________ In case of a The interrupt handler Normal program termination cmnd interpreter ________________________ ________________________ In case of a program interruption cmnd interpreter ________________________ ________________________ control unit Program X ________________________ ________________________ ________________________ ________________________ ________________________ ________________________ ________________________ return to cmnd. int

Task scheduling Task scheduler , job scheduler , queue manager manages the waiting queue 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 preempted tasks after t sec new tasks CM finished tasks

Task scheduler 2 Handle batch queue only if the interactive queue is empty interactive Task scheduler 2 Handle batch queue only if the interactive queue is empty interactive tasks interactive queue finished tasks preempted tasks after t sec new batch tasks Batch queue CM

Process scheduling The process scheduler is the part of the operating system that decides 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's active task terminated transition active-waiting load swap-out wait for CPU i/o terminated (interrupt) start i/o blocked Transition Active-Waiting after action of the process scheduler

Process priorities Algorithm for according priorities must be : - simple ( overhead ) Process priorities Algorithm for according priorities must be : - simple ( overhead ) - give I/O jobs higher priority for optimal usage of I/O active select process with P max P: =P-1 wait for CPU blocked P: =P+1 P can get an initial value , eg. depending on the user category

Spooling In case of shared usage of peripheral equipment in a multiprogramming environment Spooling Spooling In case of shared usage of peripheral equipment in a multiprogramming 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 A Program B spooler Program C disk

End-User Applications l general purpose packages ê word l processing , productivity packages Application-specific End-User Applications l general purpose packages ê word l processing , productivity packages Application-specific programs ê Business application programs ê Scientific application programs ê Education, entertainment, art, law, medicine, . . . l Graphics packages l Integrated Packages

Programming and programming languages Programming and programming languages

Programming The same hardware can be used for various applications thanks to the programmability Programming The same hardware can be used for various applications thanks to the programmability Specific 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 into an executable program.

Programming Languages A Programming language is a set of conventions that allows to express 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

Elementary Languages There is a direct relationship between the vocabulary of the language ( 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

Assembly Languages e. g. : opening door 1 STO 0 - D 1 P Assembly Languages e. g. : opening door 1 STO 0 - D 1 P 2 2 STO 0 - D 2 P 3 3 EQ? KFL 0 P 3 P 4 4 MUL D 2 10 D 2 P 5 5 ADD D 2 KDA D 2 P 6 6 ADD D 1 1 D 1 P 7 7 NE? D 1 3 P 8 8 NE? D 2 207 P 1 P 9 9 STO 1 - DDA P 1 • 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

Higher Level languages In higher level programming languages they try in the first place 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

Language Example Calculate the average of two numbers Memory addresses: written 30 oral final Language Example Calculate the average of two numbers Memory addresses: written 30 oral final Pascal: Assembler: (CALM) 31 40 final : = ( written + oral ) / 2 load add divide store machine language: a, written a, oral a, #2 a, final 66 30 54 31 43 02 67 40 required computer knowledge always higher

Assessment l l productivity of programmers is better with higher programming languages Translation into Assessment l l 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

Imperative languages With imperative languages the programmer writes all tasks to be performed in 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 , . . .

Non-imperative languages In non-imperative languages only the relationships between the data are given. The 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

Object oriented languages In Object oriented languages programs pass an instruction to the object Object oriented languages In Object oriented languages programs pass an instruction to the object to perform the operation. De ow sign ne r e lat lcu ca tatus s Actual status transmit Text: O’Brien p 113 thly Mon iew rv ove Ca lc int ulate ere st register C++ Eifel Smalltalk JAVA Visual Basic

Compilers and Interpreters l Programs written in a higher language must be converted into Compilers and Interpreters l Programs written in a higher language must be converted into machine language Source code Compiler Interpreter Object code Hardware

Compilers and interpreters 2 Compiler: During compilation the entire program is converted into executable Compilers and interpreters 2 Compiler: 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.

Compilation vs Interpretation Compilation Interpretation fast execution Slow slow modifications fast cryptic error messages Compilation vs Interpretation Compilation Interpretation fast execution Slow slow modifications fast cryptic error messages clear large memory space small unavoidable mass memory optional