IGCSE Computer Science Chapter 4 - Software PDF

Summary

This document describes software categories such as system software and application software, along with topics like software types,programming language translators, computer hierarchies, examples of utilities like backup software and device drivers. It also explains the concept and functionalities of different types of programming languages and software translators. The document also includes a section on Integrated Development Environments (IDEs).

Full Transcript

CHAPTER 4 - SOFTWARE IGCSE Computer Science 1 CONTENTS 4.1 Types of software and interrupts Types of programming language, translators and 4.2 IDEs 2 4.1 TYPE...

CHAPTER 4 - SOFTWARE IGCSE Computer Science 1 CONTENTS 4.1 Types of software and interrupts Types of programming language, translators and 4.2 IDEs 2 4.1 TYPES OF SOFTWARE AND INTERRUPTS 3 HIERARCHY OF SOFTWARE AND HARDWARE 4 SOFTWARE C ATEGORIES Software System Application Software Software 5 SOFTWARE – EXAMPLES System Software Application Software Operating System Word Processor Utility Programs Spreadsheet Device Drivers Database Compilers Internet Browser Linkers Games software Photo Editing software Video Editing software Graphics Manipulation software Control & Measuring software 6 APPLICATION SOFTWARE  Programs that provide the services that the user requires – they allow the user to do specific tasks, using the computer’s resources  It may be single program (E.g.: NotePad) or suite of programs (E.g.: Microsoft Office)  User can execute the software as and when they require. 7 SYSTEM SOFTWARE  Programs that provide the services that the computer requires – Programs that allow the hardware to run properly and allow the user to communicate with the computer set of programs to control and manage the operation of computer hardware provides a platform on which other software can run required to allow hardware and software to run without problems provides a human computer interface (HCI) controls the allocation and usage of hardware resources. 8 SYSTEM SOFTWARE : UTILITY SOFTWARE (UTILITIES)  Software that are designed to manage, maintain and control computer resources  Examples include: virus checkers defragmentation software disk contents analysis and repair Note: file compression and file management They are often initiated back-up software by the user, but some, often just run in the security background without the need for any user input. screensavers 9 UTILITIES : VIRUS CHECKERS (ANTI-VIRUS SOFTWARE)  It scans software/files before they are run or loaded on a computer for malware  It compares a possible virus against a database of known viruses  It carries out heuristic checking (= checking for types of behaviour that could indicate a possible virus)  It puts files or programs which are infected into quarantine virus is automatically deleted, or user makes the decision about  It needs to be kept up to date since new viruses are constantly being discovered  full system checks regularly, since some viruses lie dormant and would only be picked up by this full system scan. 10 UTILITIES : DEFRAGMENTATION SOFTWARE  It re-organises the disk contents  It moves split files so they are in contiguous sectors  This reduces HDD head movements and allows faster data access time  Creates a larger area of (contiguous) free space Note Due to the different operation of SSDs 11 when accessing data, this is not a problem 12 UTILITIES : BACK-UP SOFTWARE  Makes a copy of files (of the disk) on a portable storage device in case of corruption  Allows the user to decide what is backed up  Allows a schedule for backing up files to be made  May encrypt the backup files  It can restore the data, if files have been lost  It can create a restore point – restores the computer to its state at some point in the past (needed if file is deleted and cannot be recovered by any other utility)  Provides options of where to save back-up files 13 UTILITIES : DEVICE DRIVERS  Software that communicate with the operating system and translates data from the operating system into a format understood by a hardware peripheral device.  As soon as a device is plugged into a USB port (e.g.: printer), the operating system looks for the appropriate device driver Note: Without device drivers, a hardware device would be unable to work with a computer 14 (‘device not recognised’) SYSTEM SOFTWARE – OPERATING SYSTEM (EXAMPLES)  Windows  MAC OS X (Apple MACs) Versions: e.g. “Mountain Lion”, “Snow Leopard”, “Sierra”  Android OS Versions: e.g. “Jelly Bean”, “Kit Kat”  iOS (iPhone/iPad)  MS-DOS  Google Chrome OS (based on Linux)  Linux  UNIX 15 NEED FOR AN OPERATING SYSTEM  Provides the environment (software platform) in which other programs can be run  Provides a user interface between user and hardware  Provides an environment for the user to interact/communicate with the machine  It also hides complexity of hardware from user (The hardware is unusable without an OS) 16 OPERATING SYSTEM FUNCTIONS (TASKS/FEATURES) 1. It provides a user interface so that we can interact with the computer 2. It provides a platform for running applications (it loads and runs applications/software) 3. Hardware peripheral Management and drivers (Input and Output control) 4. File Management (save, copy, sort, find, delete, etc) 5. Processor Management 6. Memory Management 7. Security Management (manages log on, passwords) 8. User accounts Management 9. Handling Interrupts 10. Multitasking (/Multiprogramming) 17 11. Error Handling PREVIOUS SYLLABUS  Only questions like: List 4 operating system tasks 18 USER INTERFACE – HUMAN COMPUTER INTERFACE (HCI)  Without a user interface we would have to communicate in binary!  Therefore, the OS provides a user interface that controls the communication between user and hardware It allows navigation around the system either by graphics or by commands 19 TYPES OF USER INTERFACE CLI GUI Used by a user who doesn’t need Used by a programmer, to have any great knowledge of 20 analyst or technician how the computer works CLI (COMMAND LINE INTERFACE)  User types in commands – user needs to memorize the syntax and spelling of all the commands  No graphics Advantages  Quicker for expert users who know the commands  Takes less space on the disk and in RAM  The user is in direct communication with the computer 21 GUI (GRAPHICAL USER INTERFACE)  Previously known as WIMP – Windows, Icons, Menu and Pointing device  The user interacts with icons (pictures or symbols), through a mouse, keyboard or touchscreen  On most computers, smartphones, MP3 players, gaming devices Disadvantages  It uses up considerably more computer memory  The user is limited to the icons provided on the screen 22 MEMORY MANAGEMENT  manages the primary storage (RAM) and allows data to be moved between RAM and HDD/SSD during the execution of programs  keeps track of all the memory locations  carries out memory protection to ensure that two competing applications cannot use the same memory locations at the same time. 23 SECURITY MANAGEMENT  Ensures the integrity, confidentiality and availability of data, for example, by carrying out operating system updates ensuring that anti virus software is up to date Setting user accounts 24 HARDWARE PERIPHERAL MANAGEMENT  Involves all input and output peripheral devices Communicating with I/O devices using device drivers 25 FILE MANAGEMENT Main tasks include:  File naming conventions which can be used  Performing specific tasks (e.g.: create, open, close, delete, rename, copy, and move)  Maintaining the directory structures  ensuring memory allocation for a file 26 MULTITASKING  Allows computers to carry out more than one task (i.e. a process) at a time. Each of the processes will share the hardware resources under the control of the OS software 27 RUNNING OF APPLICATIONS  When a computer starts up, part of the OS is loaded into RAM by the bootstrap loader (also called bootloader).  The basic input/output system (BIOS) tells the computer where the storage device that holds the OS can be found; it then loads the part of the OS that is needed and executes it. The BIOS is often referred to as firmware. Firmware is defined as a program that provides low level control for devices. The bootloader The OS is Applications (firmware) is run run on the are run on on the hardware firmware the OS 28 INTERRUPTS  An interrupt is a signal sent from a device or from software to the microprocessor. This will cause the microprocessor to temporarily stop what it is doing so that it can service the Interrupt interrupt.  The computer needs to identify the interrupt type and also establish the level of interrupt Hardware Software priority. Interrupt Interrupt “Printer out of paper” “Divide by zero error” 29 INTERRUPTS Interrupts can be caused by:  an input/output process (e.g.: a disk drive or printer requiring more data)  a hardware fault (e.g.: paper jam in the printer, printer ran out of paper)  user interaction (e.g.: user presses a key(s) on a keyboard, such as Ctrl+ALT+Break, which causes the system to be interrupted)  software errors (e.g.: an attempt to divide by zero)  a timing signal. 30 INTERRUPTS, MULTITASKING, BUFFERS  Interrupts allow computers to carry out many tasks Downloading a file from the internet at the same time as listening to some music from a library.  This can be achieved by using an area in memory known as a buffer. A buffer is a memory area that stores data temporarily. Example: buffers are used are used when downloading a movie from the internet to compensate for the difference between download speeds and the data requirements of the receiving device. Without buffers, the movie would frequently ‘freeze’. 31 PRINTER BUFFER EXAMPLE  Computer Memory fills (printer) buffer with data  Whilst buffer is emptied to the hardware device, the processor carries on with other tasks  An interrupt is then sent to request more data to be sent to the printer  The current task is suspended whilst the interrupt is serviced 32 4.2 TYPES OF PROGRAMMING LANGUAGE, TRANSLATORS, AND IDES 33  Humans need the same language to communicate Need for interpreter if they speak different languages  Programmers use many Programming Languages to communicate with computers  Computers only understand their own language, the machine code So, any program needs to be translated into machine code 34 WHAT IS A COMPUTER PROGRAM?  A list of instructions that enable a computer to perform a specific task  Computer programs are written in programming languages 1. Low level languages machine code assembly code 2. High level languages E.g.: Visual Basic, Python, Java, BASIC, C, C++, Pascal, Delphi 35 HIGH LEVEL LANGUAGES  Use of words and syntax closer to English language and mathematical operators Visual Basic Example  It is independent of computer type (=portable Mark1 = Console.ReadLine() language) Mark2 = Console.ReadLine() Mark3 = Console.ReadLine()  Examples: Total = Mark1 + Mark2 + Mark3 Visual Basic, Python, Java, BASIC, C, C++, Console.WriteLine(“The result of Pascal, Delphi the addition is: ”, Total)  Programmers do not need to know how computer/hardware works 36  Programmers focus on the problem to be solved HIGH LEVEL LANGUAGES - ADVANTAGES  Easier and faster to write and read as it is closer to English language  Easier and faster to debug and modify  Independent of any hardware they run on (program can be run on any computer) – portable  No need to understand workings of a computer  Easier to maintain once in use 37 HIGH LEVEL LANGUAGES - DISADVANTAGES  Need to be compiled or interpreted before they can be run on a computer → this can be a slow process  Programs may not be able make use of special hardware  Programs can be larger 38 LOW-LEVEL LANGUAGES  Low-level languages can refer to machine code or assembly language that needs to be translated into machine code.  User need to know the specific architecture and hardware of the computer type to write code in low-level language 39 LOW-LEVEL LANGUAGE : MACHINE CODE  A machine code instruction is written in binary as a series of 1s and 0s (or shown in hexadecimal):  Difficult for most people to understand and time consuming 40 LOW-LEVEL LANGUAGE : ASSEMBLY CODE  Assigns mnemonic codes to machine instructions to make them more understandable To improve programming instructions and make machine language more readable but still difficult to understand  Example of assembly instructions: LDA First // Load the value of variable First into the accumulator ADD Second // Add the value of variable Second to the value stored // in the accumulator STO Sum // Replace the value of the variable Sum by the value stored // in the accumulator  A translator is needed to translate assembly to machine code → ASSEMBLER 41 LOW LEVEL LANGUAGES Advantages Disadvantages 1) Allows user to address computer 1) Slower to write memory/addresses directly (direct 2) More difficult to locate errors manipulation of registers) 3) Tend to be machine dependent 2) The program may execute extremely fast 3) Translated program requires less storage/RAM 4) No need for compilers/interpreters 5) The code may be very efficient, corresponding directly to the architecture of the machine 42 WHY PROGRAMMERS WRITE PROGRAMS IN ASSEMBLY LANGUAGE ?  To make use of special hardware  To make use of special machine-dependent instructions  To write code that doesn’t take up much space in primary memory  To write code that performs a task very quickly 43 USES OF ASSEMBLY CODE  Device drivers software is written in low-level language, where very close control of the processing in the CPU is needed. Drivers tell the computer how to communicate with, for example, a specific printer or scanner; graphics cards; boot code stored in ROM  Control programs in embedded systems in washing machines, modems, routers, airplanes, cars, digital watches …  Real time applications that need an instant response; network software, medical equipment 44 TRANSLATORS  Translator translates a program into the binary instructions, the Machine Code before a computer can use it  Different translators perform different tasks Compilers Interpreters Assemblers 45 HIGH LEVEL LANGUAGES TRANSLATORS  Any program written in high-level language is translated into machine code by ✓ Compiler ✓ Interpreter 46 COMPILER  A compiler is a program which translates a high level language program into machine code  An executable file of machine code is produced; no need for the compiler then  The whole of the source code is compiled in one go  A list of errors is produced at the end of the compilation process you can go back and fix them so that it will compile and run  Whilst the compilation process is quite slow, the object code (executable file) will run very quickly  Because all the code is compiled, when any changes need to be made, the whole of the source code needs to be re-compiled 47 INTERPRETER  An interpreter is a program which translates a high level language program into machine code  No executable file is produced; interpreter always needed  It translates one line at a time (line by line) if it has no syntax errors, executes it and goes on to the next statement to be executed  If a syntax error is encountered, it stops and displays an error message until the correction is made This makes it easier to develop software  Whilst interpreting is faster than the compilation process (each line is of code is translated immediately), interpreted programs take longer to run than programs 48 converted into object code COMPILER OR INTERPRETER ?  Which should you use? Interpreter Compiler Good for developing programs as you can Have to correct all the syntax errors execute parts of the program even if there before you can run the program are errors Slower execution as every line is translated Fast execution of object code before it is executed A user has to have the programming language Once the object code is produced, it and interpreter on their computer can be installed and run on any computer (no need for compiler) A user who has purchased your program can A user who has purchased your view the source code, make changes and program cannot see the source code49 sell it on ASSEMBLER  The computer cannot process assembly language instructions directly  Assembler is a program which translates assembly code into machine language One assembly code statement translates into one machine code instruction  The whole program is translated and object code is produced – executable file is produced (No need for the assembler)  A list of errors is produced at the end of the assembly process 50 PROGRAMS & ERRORS  Different types of errors: 1) Syntax Error 2) Logic Error 51 SYNTAX ERRORS  Where the program statement doesn’t obey the syntax rules of the programming language  The program can’t be translated when there are syntax errors When being compiled  A list of errors is produced → when user correct the errors, he recompiles the program When being interpreted  Once a syntax error is found, user should correct it and only then interpreter proceeds to the next statement 52 SYNTAX ERROR EXAMPLE 53 LOGIC ERRORS  When the program doesn’t do what the programmer want it to do  Found when program is being run Use trace tables with test data with expected results 54 LOGIC ERROR EXAMPLE  The interpreter/compiler will not give you any message or warning and the program will run perfectly fine without hanging. However, the program will not behave in the manner it was designed to. In other words, it will simply produce incorrect results. Python example 55 INTEGRATED DEVELOPMENT ENVIRONMENT (IDE)  An Integrated Development Environment (IDE) is used by programmers to aid the writing and development of programs.  It includes code editors a translator (compiler/interpreter) a runtime environment with a debugger Improves the error diagnostics speed of program development auto-completion auto-correction an auto-documenter and pretty printing. 56 Code Editor Translator 57 Runtime environment with a debugger 58 Error diagnostics and auto-correction 59 Auto-completion (variable names etc) 60 Auto-documenter and prettyprinting 61

Use Quizgecko on...
Browser
Browser