Systems Software Operating systems Computer Languages Programming languages

















































- Slides: 49
Systems Software & Operating systems
Computer Languages
Programming languages o All software is written in special programming languages. o The CPU of the computer can only understand it’s own language – zeros and ones.
Programming languages o Programming languages are broken down into: n n Low Level Language High Level Language
Low Level Language Machine Code o o o All instructions in every program must be translated into the computers own language called Machine Code uses commands that we do not necessarily understand as humans It uses binary numbers to represent commands
Machine Code Example 111111111111 000000000000 1010101010101
Machine Code - Advantages: o Because this is the computers own language: programs do not need to be translated n therefore, programs run very fast n
Machine Code - Disadvantages o Difficult for humans to program in Machine Code o Difficult to locate errors (DEBUG)
High Level Language o. A computer language that uses commands similar to the English Language True Basic n Comal n Pascal n Fortran n Prolog n
Advantages: HLL o Easier to read, understand write programs o Easier to locate errors (Debug)
Portability: n A Program is portable if it can run on different Operating Systems or Platforms
Disadvantages: HLL o Instructions written in a HLL must be TRANSLATED into machine code before the CPU understands the instruction o This takes time making the program slower to run
Translator Programs o Programs which will translate the instructions of a program into Machine code. o There are 2 types of translator: n n Interpreter Compiler
Source and Object Code o Source code is the list of instructions written in a High Level Language o Object Code is the translated version of the instructions written in Machine Code
Interpreter o Translates the instructions of a program written in a HLL into Machine code one instruction at a time. LET TOTAL = 0 FOR COUNTER = 1 TO 10 PRINT “PLEASE ENTER NUMBER” INPUT NUMBER LET TOTAL = TOTAL+NUMBER NEXT COUNTER PRINT “THE TOTAL IS “; TOTAL END 00000111101010000110101011
Note: Interpreter o o o 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
Compiler o Translates the instructions of a program written in a HLL into Machine code in a single operation. LET TOTAL = 0 FOR COUNTER = 1 TO 10 PRINT “PLEASE ENTER NUMBER” INPUT NUMBER LET TOTAL = TOTAL+NUMBER NEXT COUNTER PRINT “THE TOTAL IS “; TOTAL END SOURCE CODE 000001111010100001101010111 101010101010101 0001110001110010 111111111110000000000 111111000001111100000001 111100001110001110001 OBJECT CODE
Note: Compiler o Changes are not easily made. n o o 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
Classwork Questions 1. 2. 3. 4. 5. 6. 7. 8. 9. Why do HLL's need translation? How do translators help programmers? State two common features of all HLL's. Name two types of translator. Describe how an interpreter works Describe how a compiler works. What are object and source code? 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) By considering a compiler and interpreter, which type is more efficient? (Give two reasons to justify your answer)
Revision - Types of Files Program files - software is another name for a program file n Program files are made up of instructions which the computer follows (Microsoft Office, Windows XP)
Revision - Types of Files Data files - The files you create using the software on the computer n These are files containing data which a computer user has created (Personal Profile, Dental Check up Database, Olympic Pentathlon Spreadsheet)
Software A computer cannot work without software o All the jobs that a computer can do are controlled by a program o Different computers can have different software installed but all computers must have: o
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 o The OS runs from the minute the computer is switched on until it is switched off o
Types of Operating System o Windows XP n 98 n 95 n o MAC OS
Functions of the Operating System 1. 2. 3. 4. Memory Management File Management Error Reporting Human Computer Interface
Memory Management This program in the Operating System controls where data and programs are placed in Main Memory
File Management This program in the Operating System deals with storing and retrieving files from backing store
Error Reporting This program in the Operating System deals with Letting the user know if any mistakes have occurred
Human Computer Interface This program in the Operating System provides a human computer interface for the user
ROM and RAM o 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
Directory / Folder o This is an area on backing storage where files are stored
Filing system
Filing Systems o There are 2 main types of filing system n n Flat Hierarchical
Flat Filing System o This system presents all file information in one level 1 2 3 4 Text File 1 Excel File 1 Word Processing File 2 5 6 7 8 Spreadsheet File 1 Text File 2 Database SS Spreadsheet File 2
Flat (Disadvantages) o Not user friendly o Poorly organised o Difficult to find files if the user forgets the name of it o Groups of files can’t be protected from unauthorised users o All files might not be able to be seen on the monitor screen
Hierarchical Filing System o This system allows different levels to be set up and presented o Files can be grouped together o Files are organised into Directories n Sub-directories n
Root Directory HARD DISK Sub-directories PROGRAM FILES Claris. Works SS Claris. Works WP TEXT FILES Text File 1 DATA FILES Text File 2 SS FILES SS File 1 SS File 2 WP FILES WP File 1 WP File 2
Hierarchical (Advantages) o o o 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? )
Sequential Access to Data o The data has to be accessed in the order it is stored. Access is slow
Random Access to Data o The data has to be accessed in the any order. Access is fast as we can go directly to the data required.
Interactive Systems o In an Interactive System the user and the computer communicate, they interact, and the computer program responds directly to commands
Interactive systems
Real-Time system o o 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
Background Job Capability This is when the operating system carries out a task in the foreground another task in the background. The processor is so quick the user thinks that the tasks are happening at the same time
Background Job Capability Example 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.
Device Drivers A 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
Printer Drivers A 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
Classwork Questions 2 1. 2. 3. 4. 5. 6. 7. 8. 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) Which type of filing system do you use for storing your computer files and why? Draw a hierarchical representation of how you store your files on your computer system. What is the purpose of system software? Name two examples of system software. Why might an operating system be thought of as the most important piece of software a computer uses? Name the four functions of an OS. Describe four functions of an OS
End of Unit Check Up o You can now try the Interactive Revision exercise for this unit.