Fundamentals of Computer Systems Classification of Software Computer

  • Slides: 36
Download presentation
Fundamentals of Computer Systems Classification of Software Computer Science

Fundamentals of Computer Systems Classification of Software Computer Science

The Software Hierarchy • We can break a computer (and its software) down into

The Software Hierarchy • We can break a computer (and its software) down into a hierarchy • It shows the levels of interactivity with the hardware of the computer User Application Software - Achieve non-computer specific tasks - Real-world activities System Software - Operate / interact with hardware - Computer-centred functions - Specific Tasks Higher up: Less interaction Lower down: More interaction 2 Fundamentals of Computer Systems: Classification of Software Hardware

The Software Hierarchy • The computer is a physical device, with: Mechanics and electronics

The Software Hierarchy • The computer is a physical device, with: Mechanics and electronics Which operate and power software And all its components come together into a single system Components of a Computer 3 Power supply Heart Processor, Memory, Secondary Storage Brain Interfaces - I/O Devices, such as Peripherals Senses – Sight, Sound, Smell, Taste, Touch Interface Controllers Muscles and Nerves Fundamentals of Computer Systems: Classification of Software

The Software Hierarchy • The physical components of a computer are hardware • The

The Software Hierarchy • The physical components of a computer are hardware • The programs we interact with are software They are virtual They do not exist in physical space • They are constructed from 1’s and 0’s on the computer 4 Fundamentals of Computer Systems: Classification of Software

The Software Hierarchy The Computer Mind – Operate using hardware / systems – Enables

The Software Hierarchy The Computer Mind – Operate using hardware / systems – Enables App Software to perform tasks – Allows user interaction / use SYSTEM (Filter, process, store info, learn, behave and control connected devices) … Real-world Activities – Takes instructions from user, passes to System – Enables users to perform tasks APPLICATION (Writing, Calculating, Navigating, Designing) 5 Fundamentals of Computer Systems: Classification of Software

System Software User Application Software - Achieve non-computer specific tasks - Real-world activities System

System Software User Application Software - Achieve non-computer specific tasks - Real-world activities System Software - Operate / interact with hardware - Computer-centred functions - Specific Tasks Hardware 6 Fundamentals of Computer Systems: Classification of Software

System Software • Contains a few subsets of software Operating Systems Utility Programs Library

System Software • Contains a few subsets of software Operating Systems Utility Programs Library Programs Translator Programs • They each perform a very specific function on the computer • Let’s take a look at them one-by-one 7 Fundamentals of Computer Systems: Classification of Software

System Software: Operating Systems • Lets us keep the hardware separate/independent from the programs

System Software: Operating Systems • Lets us keep the hardware separate/independent from the programs we run • Makes hardware useable by programs (on the Application level) The user interacts with applications Applications talk to the operating system The operating systems doles out hardware resources as needed Hides the complexities of the hardware • Acts as resource management for the rest of the programs Examples Include Windows, OSX, Linux distributions (Debian, Ubuntu, etc. ) 8 Fundamentals of Computer Systems: Classification of Software

System Software: Operating Systems • Resource management – Process management – Memory management –

System Software: Operating Systems • Resource management – Process management – Memory management – Disk/file management – I/O management – Battery management • For battery operated devices 9 Fundamentals of Computer Systems: Classification of Software

System Software: Operating Systems • In nutshell, two main roles of OS – Hiding

System Software: Operating Systems • In nutshell, two main roles of OS – Hiding complexities of the hardware for easy use – Resource management 10 Fundamentals of Computer Systems: Classification of Software

System Software: Utility Programs • Performs very small, specific operations • Lack extra functionality

System Software: Utility Programs • Performs very small, specific operations • Lack extra functionality and interactive behaviour • Helps maintain the smooth-running of the system • Employed by the Operating System File management, Problem diagnosis & repair, System information 11 Fundamentals of Computer Systems: Classification of Software

System Software: Library Programs • Centralised Repository or Catalogue • Similar to Utility Programs

System Software: Library Programs • Centralised Repository or Catalogue • Similar to Utility Programs • Discrete sequences of programmed routines Collection of common functions Used by more than one software program Dynamic-Link Library • Less coding, less storage, one update Data: File System: Printing: 12 Cut, Copy, and Paste File Open, File Save File Print Fundamentals of Computer Systems: Classification of Software

System Software: Translator Programs • Handle conversion • Input: Takes program statements Translates one

System Software: Translator Programs • Handle conversion • Input: Takes program statements Translates one language into another • Three types of Translators Assembler Interpreter Compiler 13 Fundamentals of Computer Systems: Classification of Software

Application Software User Application Software - Achieve non-computer specific tasks - Real-world activities System

Application Software User Application Software - Achieve non-computer specific tasks - Real-world activities System Software - Operate / interact with hardware - Computer-centred functions - Specific Tasks Hardware 14 Fundamentals of Computer Systems: Classification of Software

Application Software • Real-world Activities User instructs Application instructs System Software instructs Hardware •

Application Software • Real-world Activities User instructs Application instructs System Software instructs Hardware • Three Types of Applications General-purpose Applications Special-purpose Applications Bespoke Applications 15 Fundamentals of Computer Systems: Classification of Software

Application Software: General Use • Description Common set of functions Applied to many different

Application Software: General Use • Description Common set of functions Applied to many different activities Word Processing: Letters, User guides, Reports, Novels, Invoices, Flyers, Posters Spreadsheets: 16 Manage figures, Data Collection, Stats Analysis, Generate Formulas, Output Charts and Tables Fundamentals of Computer Systems: Classification of Software

Application Software: Specific Use • Description Designed for one particular Activity One specific task

Application Software: Specific Use • Description Designed for one particular Activity One specific task or a set of linked tasks Accountancy: CAD: Web Browser: Media Player: 17 Sage, IRIS, Quicken Auto. CAD, Autodesk, Turbo. CAD Internet Explorer, Firefox, Chrome, Safari Windows Media, Quicktime, i. Tunes, Real. Player, Winamp Fundamentals of Computer Systems: Classification of Software

Application Software: Bespoke Use • Description Commissioned / Made to order Written to suit

Application Software: Bespoke Use • Description Commissioned / Made to order Written to suit specific client’s needs Very narrow scope of application Air Traffic Control Passport Application Support System Robot Control Smartcards Payroll system 18 Fundamentals of Computer Systems: Classification of Software

Programming Languages • Instructive Language Machine Code – Binary – 1 s and 0

Programming Languages • Instructive Language Machine Code – Binary – 1 s and 0 s Computers take instructions Level Low-level Generation Paradigm First-generation Second-generation Imperative Third-generation High-level Fourth-generation 19 Declarative History Languages 1801 – Loom 1822 – Babbage 1940 s – Vacuum Tubes Punch Cards 1950 s – Transistors Assembly Code 1950 s and on – Home Computers Fortran, Lisp, COBOL, Pascal, C, VB, Delphi… 1970 s and on Prolog, SQL, HTML, Haskell Fundamentals of Computer Systems: Classification of Software Machine Code

Programming Languages: Generation 1 Level Low-level Generation First-generation Paradigm History Languages 1801 – Loom

Programming Languages: Generation 1 Level Low-level Generation First-generation Paradigm History Languages 1801 – Loom Punch. Cards Punch 1822 – Babbage 1940 s – Vacuum Tubes Machine. Code Second-generation Imperative 1950 s – Transistors High-level Third-generation 1950 s and on – Home Computers Fourth-generation Declarative 1970 s and on 20 Fundamentals of Computer Systems: Classification of Software Assembly Code Fortran, Lisp, COBOL, Pascal, C, VB, Delphi… Prolog, SQL, HTML, Haskell

Programming Languages: Generation 1 Machine Code Electricity • Low-level Language Electricity Electrical States: 1

Programming Languages: Generation 1 Machine Code Electricity • Low-level Language Electricity Electrical States: 1 s and 0 s (Base 2) States represent data and instructions Machine Code is lowest level of instruction No translation • Instructions tell the microprocessor What data to put into registers How to manipulate data when it’s there 21 Fundamentals of Computer Systems: Classification of Software =0 =1 Light

Programming Languages: Generation 2 Level Low-level Generation First-generation Paradigm History Languages 1801 – Loom

Programming Languages: Generation 2 Level Low-level Generation First-generation Paradigm History Languages 1801 – Loom Punch. Cards Punch 1822 – Babbage 1940 s – Vacuum Tubes Machine. Code Second-generation Imperative Transistors Imperative 1950 s -–Transistors second-generation High-level Third-generation 1950 s and on – Home Computers Fourth-generation Declarative 1970 s and on 22 Fundamentals of Computer Systems: Classification of Software Assembly. Code Fortran, Lisp, COBOL, Pascal, C, VB, Delphi… Prolog, SQL, HTML, Haskell

Programming Languages: Generation 2 Assembly Language • Developed in the 1950 s • Benefits:

Programming Languages: Generation 2 Assembly Language • Developed in the 1950 s • Benefits: Slightly easier to understand, correct errors and code Bridge gap between humans and machines • Mnemonic Codes One-to-one translation with Machine Code General algorithms reduce repetition of code Machine dependent (like Machine Code) 23 Fundamentals of Computer Systems: Classification of Software

Programming Languages: Generation 3 Level Low-level Generation First-generation Paradigm History 1801 – Loom Punch

Programming Languages: Generation 3 Level Low-level Generation First-generation Paradigm History 1801 – Loom Punch Cards 1822 – Babbage 1940 s – Vacuum Tubes Machine Code Second-generation Imperative Transistors Imperative 1950 s -–Transistors second-generation High-level Third-generation 1950 sand andon on ––Home. Computers Fourth-generation Declarative 1970 s and on 24 Languages Fundamentals of Computer Systems: Classification of Software Assembly. Code Fortran, Lisp, COBOL, Pascal, C, C, VB, Delphi… Prolog, SQL, HTML, Haskell

Programming Languages: Generation 3 • Developed from the 1950 s onwards • Real-world problems

Programming Languages: Generation 3 • Developed from the 1950 s onwards • Real-world problems Much easier to understand, correct errors and code Bridge gap between humans and machines • Algorithmic and formula-like Hides low-level functions (memory storage) General algorithms reduce repetition of code More code means Less efficient Reliability reliant on low-level coders 25 Fundamentals of Computer Systems: Classification of Software This is an example of BASIC

Programming Languages: Generation 4 Level Low-level Generation First-generation Paradigm History 1801 – Loom Punch

Programming Languages: Generation 4 Level Low-level Generation First-generation Paradigm History 1801 – Loom Punch Cards 1822 – Babbage 1940 s – Vacuum Tubes Machine Code Imperative 1950 s – Transistors Second-generation Imperative High-level Third-generation 1950 sand andon on ––Home. Computers Fourth-generation Declarative 1970 sand andon on 26 Languages Fundamentals of Computer Systems: Classification of Software Assembly Code Fortran, Lisp, COBOL, Pascal, C, C, VB, Delphi… Prolog, SQL, SQL HTML, Haskell

Programming Languages: Generation 4 • Developed 1970 s to 1980 s • Declarative –

Programming Languages: Generation 4 • Developed 1970 s to 1980 s • Declarative – “What I want” This generation is the one most commonly used today! Application Development Tools English-like (Natural Languages) Problem oriented Specify relationships between objects rather than coding each object separately 27 Fundamentals of Computer Systems: Classification of Software

Low-Level vs High-Level Low Level High Level Pros Cons Structured Efficient Fast execution Direct

Low-Level vs High-Level Low Level High Level Pros Cons Structured Efficient Fast execution Direct access to hardware, esp. memory Difficult to understand Laborious to code Prone to errors Versions differ between processor families 28 Removes complexity of communicating with the hardware Hides laborious and non-essential tasks Easier to understand debug Faster to code Slower to compile / interpret Loss of efficiency Reliant on lower levels Fundamentals of Computer Systems: Classification of Software

Translating to Hardware User Application Software - Achieve non-computer specific tasks - Real-world activities

Translating to Hardware User Application Software - Achieve non-computer specific tasks - Real-world activities System Software - Operate / interact with hardware - Computer-centred functions - Specific Tasks Hardware 29 Fundamentals of Computer Systems: Classification of Software

Translating to Hardware • Communication with hardware • Distribution of software Third / Fourth

Translating to Hardware • Communication with hardware • Distribution of software Third / Fourth Gen Language Compiler Programmer Assembly Language Assembler Computer Processor 30 Machine Code Object Code Fundamentals of Computer Systems: Classification of Software Interpreter

Low vs High Low Level Machine language Uses binary code to write program No

Low vs High Low Level Machine language Uses binary code to write program No translator required Assembly language Uses Mnemonic code for Opcode Uses hexadecimal for opcode so easy for human to understand find errors Hard to find errors Needs assembler to translate into machine/ binary code Features Used where processor architecture needs to be reflected Used where memory addressing is required Used to make device driver or software to control hardware Translates one line of assembly code to one machine code 31 Fundamentals of Computer Systems: Classification of Software

Low vs High Level Features Imperative language Instructions are executed in programmer-defined sequences One

Low vs High Level Features Imperative language Instructions are executed in programmer-defined sequences One line of source code is mapped to several lines of machine code Developed to aid problem solving, so also known as problem-oriented language Uses English like keywords so easy to use and develop Less error prone 32 Fundamentals of Computer Systems: Classification of Software

Compiler vs Interpreter High-level language translator interpreter Compiles all the source code into object

Compiler vs Interpreter High-level language translator interpreter Compiles all the source code into object code in one go Compilation may be slow if program is long Translates one line of code without looking at the entire program Slower than compilation as it needs to analyse each statement from source code for execution. . exe is created from object code which can be distributed to the customer without source code Easier to write than compilers No development environment and compiler is required for object code Object code runs faster than interpreted code as no translation is required at runtime Compiled code is machine-specific so can only be run on type of processor where created. 33 Fundamentals of Computer Systems: Classification of Software Interpreted code is machine-independent so the code can be run on any type of processor Needs development environment to run the program as there is no object code.

Byte-code • An intermediate language between – Machine code and HLL source code •

Byte-code • An intermediate language between – Machine code and HLL source code • Produced by a compiler – Designed to translate source code into object code – For execution on a virtual machine(VM) based on a stack machine • Bytecode is then interpreted – By the underlying real machine’s interpreter – Makes object code portable • Can be run on different platform with a different instruction set. 34 Fundamentals of Computer Systems: Classification of Software

Byte-code • VM – Stack-based machine – Not register-based • E. g. – –

Byte-code • VM – Stack-based machine – Not register-based • E. g. – – – – 35 x x*y+z Push x Push y Multiply Push z Add Pop x Fundamentals of Computer Systems: Classification of Software