systems software & operating systems. computer languages

49
Systems Software & Operating systems

Upload: william-mclaughlin

Post on 27-Dec-2015

259 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Systems Software & Operating systems. Computer Languages

Systems Software&

Operating systems

Page 2: Systems Software & Operating systems. Computer Languages

Computer Languages

Page 3: Systems Software & Operating systems. Computer Languages

Programming languages All software is

written in special programming languages.

The CPU of the computer can only understand it’s own language – zeros and ones.

Page 4: Systems Software & Operating systems. Computer Languages

Programming languages Programming languages are broken

down into: Low Level Language High Level Language

Page 5: Systems Software & Operating systems. Computer Languages

Low Level LanguageMachine Code

All instructions in every program must be translated into the computers own language called Machine Code

Machine Code uses commands that we do not necessarily understand as humans

It uses binary numbers to represent commands

Page 6: Systems Software & Operating systems. Computer Languages

Machine Code Example

111111111111111111111111

000000000000000000000000

101010101010101010101010

010101010101010101010101

Page 7: Systems Software & Operating systems. Computer Languages

Machine Code - Advantages:

Because this is the computers own language:- programs do not need to be

translated therefore, programs run very fast

Page 8: Systems Software & Operating systems. Computer Languages

Machine Code - Disadvantages

Difficult for humans to program in Machine Code

Difficult to locate errors (DEBUG)

Page 9: Systems Software & Operating systems. Computer Languages

High Level Language

A computer language that uses commands similar to the English Language

True Basic Comal Pascal Fortran Prolog

Page 10: Systems Software & Operating systems. Computer Languages

Advantages: HLL

Easier to read, understand and write programs

Easier to locate errors (Debug)

Page 11: Systems Software & Operating systems. Computer Languages

Portability: A Program is portable if it can run on

different Operating Systems or Platforms

Page 12: Systems Software & Operating systems. Computer Languages

Disadvantages: HLL

Instructions written in a HLL must be TRANSLATED into machine code before the CPU understands the instruction

This takes time making the program slower to run

Page 13: Systems Software & Operating systems. Computer Languages

Translator Programs

Programs which will translate the instructions of a program into Machine code.

There are 2 types of translator: Interpreter Compiler

Page 14: Systems Software & Operating systems. Computer Languages

Source and Object Code Source code is the list of

instructions written in a High Level Language

Object Code is the translated version of the instructions written in Machine Code

Page 15: Systems Software & Operating systems. Computer Languages

Interpreter

Translates the instructions of a program written in a HLL into Machine code one instruction at a time.

LET TOTAL = 0LET TOTAL = 0 FOR COUNTER = 1 TO 10

0000011110101000011010101100000111101010000110101011PRINT “PLEASE ENTER NUMBER”

INPUT NUMBERLET TOTAL = TOTAL+NUMBER

NEXT COUNTERPRINT “THE TOTAL IS “;TOTALEND

Page 16: Systems Software & Operating systems. Computer Languages

Note: Interpreter

Easier to learn to program as errors

are identified as commands are entered Changes are made easily Runs slower Must have the interpreter loaded into memory

for the program to run (requires more memory).

Does not produce Object Code

Page 17: Systems Software & Operating systems. Computer Languages

Compiler

Translates the instructions of a program written in a HLL into Machine code in a single operation.

LET TOTAL = 0 000001111010100001101010111

FOR COUNTER = 1 TO 10 101010101010101010101010101

PRINT “PLEASE ENTER NUMBER” 000111000111000111001110010

INPUT NUMBER 111111111111111111111000000

LET TOTAL = TOTAL+NUMBER 111111110000000000000000000

NEXT COUNTER 111111111111000000000011111

PRINT “THE TOTAL IS “;TOTAL 000000000011111111100000001

END 111100001110001110001110001

SOURCE CODE OBJECT CODE

Page 18: Systems Software & Operating systems. Computer Languages

Note: Compiler

Changes are not easily made. The original source code will have to be edited

and translated again Runs fast Produces Object Code which can be run

without the compiler being present in memory - efficient

Page 19: Systems Software & Operating systems. Computer Languages

Classwork Questions1. Why do HLL's need translation? 2. How do translators help programmers? 3. State two common features of all HLL's. 4. Name two types of translator. 5. Describe how an interpreter works 6. Describe how a compiler works. 7. What are object and source code? 8. If someone were just learning how to write programs, which type of

translator would you recommend they use?          (Give two reasons to justify your answer)

9. By considering a compiler and interpreter, which type is more efficient?  (Give two reasons to justify your answer)

Page 20: Systems Software & Operating systems. Computer Languages

Revision - Types of FilesProgram files - software is another name for a program file

Program files are made up of instructions which the computer follows (Microsoft Office, Windows XP)

Page 21: Systems Software & Operating systems. Computer Languages

Revision - Types of Files

Data files - The files you create using the software on the computer

These are files containing data which a computer user has created (Personal Profile, Dental Check up Database, Olympic Pentathlon Spreadsheet)

Page 22: Systems Software & Operating systems. Computer Languages

Software A computer cannot work without

software All the jobs that a computer can do

are controlled by a program Different computers can have

different software installed but all computers must have:-

Page 23: Systems Software & Operating systems. Computer Languages

An Operating System The Operating System is the set of

programs which controls the entire operation of the computer and any devices that are attached to it

The OS runs from the minute the computer is switched on until it is switched off

Page 24: Systems Software & Operating systems. Computer Languages

Types of Operating System

Windows XP 98 95

MAC OS

Page 25: Systems Software & Operating systems. Computer Languages

Functions of the Operating System

1. Memory Management

2. File Management

3. Error Reporting

4. Human Computer Interface

Page 26: Systems Software & Operating systems. Computer Languages

Memory Management

This program in the Operating System controls where data and programs are placed in Main Memory

Page 27: Systems Software & Operating systems. Computer Languages

File Management

This program in the Operating System deals with storing and retrieving files from backing store

Page 28: Systems Software & Operating systems. Computer Languages

Error ReportingThis program in the Operating System deals with Letting the user know if any mistakes have occurred

Page 29: Systems Software & Operating systems. Computer Languages

Human Computer Interface

This program in the Operating System provides a human computer interface for the user

Page 30: Systems Software & Operating systems. Computer Languages

ROM and RAM The OS can be stored in ROM or RAM.

If stored on ROM chip the chip must be removed to update the OS

If stored in RAM it can be updated quickly and easily by overwriting with the new version of the OS

Page 31: Systems Software & Operating systems. Computer Languages

Directory / Folder This is an area on backing storage where

files are stored

Page 32: Systems Software & Operating systems. Computer Languages

Filing system

Page 33: Systems Software & Operating systems. Computer Languages

Filing Systems There are 2 main types of filing system

Flat Hierarchical

Page 34: Systems Software & Operating systems. Computer Languages

Flat Filing SystemThis system presents all file information in

one level1 Text File 1 5 Spreadsheet File 1

2 Excel File 1 6 Text File 2

3 Word Processing File 1 7 Database SS

4 Word Processing File 2 8 Spreadsheet File 2

Page 35: Systems Software & Operating systems. Computer Languages

Flat (Disadvantages) Not user friendly Poorly organised Difficult to find files if the user forgets the

name of it Groups of files can’t be protected from

unauthorised users All files might not be able to be seen on the

monitor screen

Page 36: Systems Software & Operating systems. Computer Languages

Hierarchical Filing System This system allows different levels to be set

up and presented

Files can be grouped together

Files are organised into Directories Sub-directories

Page 37: Systems Software & Operating systems. Computer Languages

Text File 1 Text File 2 WP File 1 WP File 2SS File 2SS File 1

ClarisWorks SS ClarisWorks WP

HARD DISK

PROGRAM FILES DATA FILES

TEXT FILES SS FILES WP FILES

Root Directory

Sub-directories

Page 38: Systems Software & Operating systems. Computer Languages

Hierarchical (Advantages) More user friendly Better organisation Files can have the same names provided

they are not in the same directory Directories can be protected from

unauthorised users Easier to find files (Is this a good thing?)

Page 39: Systems Software & Operating systems. Computer Languages

Sequential Access to Data The data has to be accessed in

the order it is stored. Access is slow

Page 40: Systems Software & Operating systems. Computer Languages

Random Access to Data The data has to be accessed in the

any order. Access is fast as we can go directly to the data required.

Page 41: Systems Software & Operating systems. Computer Languages

Interactive Systems In an Interactive System the user and the

computer communicate, they interact, and the computer program responds directly to commands

Page 42: Systems Software & Operating systems. Computer Languages

Interactive systems

Page 43: Systems Software & Operating systems. Computer Languages

Real-Time system A Real-time system is an interactive system which

cannot afford to have a delay in the time taken for the computer to respond.

Response in a Real-time system is vital

Page 44: Systems Software & Operating systems. Computer Languages

Background Job Capability

This is when the operating system carries out a task in the foreground and another task in the background. The processor is so quick the user thinks that the tasks are happening at the same time

Page 45: Systems Software & Operating systems. Computer Languages

Background Job CapabilityExample

The computer can print a document as a background task while at the same time appear to allow the user to word process a document as a foreground task. The user does not have to wait on the print job finishing before continuing to word process a document.

Page 46: Systems Software & Operating systems. Computer Languages

Device DriversA device driver is a program which is an add-on to the operating system in a computer, to allow the computer to operate a particular device which is attached to it

Page 47: Systems Software & Operating systems. Computer Languages

Printer DriversA Printer driver is a program which is an add-on to the operating system in a computer, to allow the computer to operate a particular printer which is attached to it

Page 48: Systems Software & Operating systems. Computer Languages

Classwork Questions 21. Files can be stored on disc on a Flat filing system or a Hierarchical filing

system. Describe each system. (A diagram may be helpful in your answer)

2. Which type of filing system do you use for storing your computer files and why?

3. Draw a hierarchical representation of how you store your files on your computer system.

4. What is the purpose of system software?

5. Name two examples of system software.

6. Why might an operating system be thought of as the most important piece of software a computer uses?

7. Name the four functions of an OS.

8. Describe four functions of an OS

Page 49: Systems Software & Operating systems. Computer Languages

End of Unit Check Up You can now try the Interactive Revision

exercise for this unit.