Chapter5_SystemSoftware

Syllabus

Operating system

  • The need for an Operating System (OS)
    • Communicate with hardware
    • Provides an interface between software/hardware and users
    • Platform to run codes/program
  • Management tasks
    • Memory management
      • Allocate RAM to programs/tasks/processes (Organization)
      • Keeps track of allocated and free memory locations (Optimization)
      • Swaps data to and from the hard drive
      • Handles virtual memory (when there is insufficient RAM)
      • Paging/segmentations
      • Ensure fair usage of memory
      • Memory protection (ensure that 2 applications cannot use the same memory location at the same time)
      • Release memory when a process stops
    • File management
      • Storage space is divided into file allocation units
      • Space is allocated to particular files
      • Maintains a file directory
      • Provides file naming conventions
      • Implement access rights
      • Specifies tasks that can be performed on a file (e.g. open, close, delete, copy, create, move etc.)
    • Security management
      • Sets up user account
      • Check username and password
      • Implement access rights
      • Automatic backup
      • System restore / roll back
      • Prevent unauthorized access
      • Ensure privacy of data
      • Provision for recovery when data is lost
      • Firewall
      • Anti-virus software
      • Carrying out operating system update
    • Hardware management
      • Installation of appropriate driver software
      • Manage interrupts
      • Sending control signals to the device
      • Control of buffers
      • Management of queues
      • Control access to data being sent to/from hardware
      • Control access to hardware/peripherals
      • Manages communication between devices / hardware and software
    • Process management
      • Allocation of processor time
      • Scheduling of processes or tasks
      • Ensure fair access
      • Handles priority
      • Allow multitasking
      • Resolution of conflict when two or more processes require the same resource
      • Manages the resources the processes need
      • Enables processes to share information
  • Utility softwares
    • Disk formatter
      • Make existing data inaccessible
      • Partitions the disk into logical drives
      • Sets up the file system
      • Prepares the disk for initial use
      • To configure the disc for use
      • To initialize a file system
      • To install a boot sector
      • To check for all the sectors and mark bad sectors
    • Virus checker
      • Scans files stored on a computer system for malicious code
      • Scans files when they enter the system / memory stick inserted
      • Compare possible virus against a database of known virus
      • Carries out heuristic checking
      • Sets up schedule for virus-checking
      • Isolates/quarantine/deletes viruses
    • Defragmentation software
      • Reorganizes the disk contents
      • Moves split files so they are contiguous
      • Creates a larger area of free space
      • To reduce head movement
    • Disk repair software
      • Check for any errors on the disk
      • Resolves any errors on the disk
      • Retrieves data from a damages disk / recovers disk when the data corrupt
      • Marks bad sectors on the disk as unusable
    • File compression
      • Compresses data before writing it to the hard disk
      • Decompresses it again when reading this data
      • Increase the capacity
    • Back-up software
      • Creates a copy of the contents of a disk. Can be set up to automatically backup
      • Allows the user to decide what is backed up
      • Allows the user to set up an off-site backup
      • May encrypt the backup files
      • restores the data if necessary
  • Program libraries
    • Pre-compiled
    • Collection of functions/routines
    • Each function/routine performs a specific task/purpose
    • The program library can be referenced/imported
    • The functions/routines can be called in the original program
    • Use Dynamic Link Library (DLL) files
    • Benefits
      • Code is already tested, so it is more likely to work
      • Saves programming time, because codes do not have to be rewritten from scratch
      • Can be written in a different programming language, so special features of that language can be used
      • The programmer can use functions that they may not know how to code
      • If there’s an improvement in the library routine, the program updates automatically
      • Simplifies the program, since just the name of the function is included in the source code

Syllabus

Language translators

  • Assembler
    • Translates assembly program into machine code
    • Either store the translated program directly in main memory for execution
    • Or store the translated program on a storage medium to be used later
    • Every different type of computer/chip has its own machine code and assembly language
  • Compiler
    • Used when development complete (ready for distribution)
    • Reads the source code and reports all errors
    • Run/test the program multiple times without recompilation
    • The compiled file executed faster
    • Produce an executable file (which is no longer compiler dependent)
    • Cross-compilation, the program can be compiled to run on different platforms
    • Executable file runs faster than interpreter
  • Interpreter
    • Used during development
    • Test/run incomplete program
    • Debugging is easier
    • Because errors are reported and can be corrected as they are found
    • Can run partially complete program
    • Change the program and see the effect in real-time
    • Translates an statement and executes it immediately
    • Parts of the program is tested, without all the program code available

High level language may be partially compiled and partially interpreted, such as java

  • IDE
    • Coding
      • Context-sensitive prompts
    • Initial error detection
      • Dynamic syntax checks
    • Presentation
      • Pretty-print
      • Expand and collapse code blocks
    • Debugging
      • Single stepping
      • Breakpoints