System Software

Operating System

  • Explain why a computer system requires an  Operating System (OS)
  • Explain the key management tasks carried out by the
    Operating System
  • Show understanding of the need for typical utility
    software provided with an Operating System
  • Show understanding of program libraries

Operating System

  • OS manages hardware and software resources on a computer
  • OS is essential to modern computer system
  • It is even more important nowadays as computer are multi-tasked, resources are shared in different process

Roles of OS

User Interface

  • OS can be referred as bridge between user and computer system
  • Common UIs:
    • Command Line Interface
    • Graphical User Interface

Program-hardware Interface and device management

  • Application developer do not need to know details about how a specific hardware works
  • OS provide mechanism for running the program on the machine
  • Device Drivers are installed to OS so that OS knows how to communicate with specific hardware

e.g. Game developer do not need to know how to work with different graphics card, instead, OS may provide some function call like: drawSphere()

instead of working with low level hardware operations. All is done by Device drivers

Resource and Memory Management

  • Modern computers are able to run multiple process (which means a running program) at the same time, which needs to share hardware resources including CPU time and memory
  • CPU can only do one task at a time, OS helps to schedule the process run by CPU
  • Memory is shared among all programs, OS make sure programs will have exclusive access of their allocated memory

File Management

  • Files operations
  • Folder structure
  • Access control mechanism

Security management

  • Backup data
  • Recovery of data
  • Prevention of intrusion
  • Ensure data privacy
  • Access control

Error detection and recovery

  • Detects abnormal behavior in a process
  • Interrupt or shutdown problematic process
  • Provide diagnostics
  • shutdown system in an organized fashion to prevent data loss
    • e.g. in case of power failure, Uninterrupted power supply (UPS, basically a large battery) will notify system to save and shutdown gracefully

Utility Programs

  • Disk formatter
  • Hard disk defragmenter
  • Disk content analysis / repair
  • Backup
  • File Compression
  • Virus Checker

Disk Format

  • Disk formatter removes all data on a disk
    • By rewriting the file system
    • Sometimes may "zero" all the data on every sector of the disk
  • Partition the disk into logical drives

HDD Defragmentation

  • Defragmentation - rearrange the files in a HDD, such that same file will keep continuous (physically) as much as possible
    • Avoid frequently jumping back and forth to locate fragments of file on disk

Library Programs

  • Sometimes called library routine or simply library
  • A set of pre-made programming functions performing certain tasks, e.g. for Python
    • Random
    • HTTP
    • OpenGL
    • Tensorflow
  • Programmer can reuse such functions

Dynamic Link Library (DLL)

  • DLL is an executable code (mainly for windows) which only loads into main memory when required
  • DLL provides a mechanism to share code and data (hence library routine), but...
    • the code is not compiled into the main program
    • upgrading the library needs no recompile, but only replace the DLL file
    • DLL can be shared by different application, saving storage space in the computer

Steps in Interpreter

  1. Interpreter program begins execution
  2. First line of code is read
  3. Analyze the line
  4. If error is found then it is reported and program halts
  5. If no error is found the line will convert to intermediate code
  6. Interpreter program will execute the intermediate code
  7. Next line of code is read (repeat 4-7)

Steps in Compiler

  1. Compiler program begins execution
  2. First line of source code is read
  3. The line is analysed
  4. If error is found then it is recorded
  5. If no error then the code will convert to intermediate code
  6. Next line of code is read and repeat 3-6
  7. After reading the whole source code:
    1. If no error is found, the intermediate code will covert to object code
    2. If any error then the list of errors will be reported and no object code is created

Computer can execute the object code (code that is created by compiler) directly without the use of compiler

More comparison on Interpreter and Compiler

Java

  • Java is platform-independent language
  • Java program can be run on any platform - without the need to recompile or modification
  • Java uses a two-step compilation process
    • Source code is compiled to bytecode by Java compiler
    • bytecode is interpreted by Java virtual machine (JVM) software or,
    • compile to native machine code using just-in-time (JIT) compiler and execute, JIT compile only happens when you run the program

IDE - Integrated Development Environment

  • Features in IDE
Made with Slides.com