3.6 Fundamentals of computer systems Flashcards
hardware definition
physical components of the computer system, internal and external
software definition
sequences of instructions which are executed in order to perform a task
application software
performs user-oriented tasks such as word processors
system software
management of computer system, includes utility, library programs and translators
operating system
allows user to control computer with ease as it provides user with a virtual machine (hiding true complexity of the computer from the user), resource management
resource management OS
memory management, processor scheduling, handling interrupts
utility programs
performs tasks that help manage a computer, examples: data backup, encryption
library programs
contain frequently used functions, simplifies process of making program
translators
translate between different types of language, three types include compilers, assemblers, interpreters
low level languages
machine code and assembly language
machine code
uses binary digits to represent instructions, no need to translate, useful for real-time applications due to its speed of execution
assembly language
uses mnemonics so its more compact and less error prone
high level languages
not platform specific, needs to be translated before executing, built-in functions, includes imperative high-level languages formed from instructions that specify how a computer should complete a task
portability of low vs high level languages
low level: machine code - not portable, assembly language - processor specific,
high level: portable, programs not specific to certain processors
ease of use of low vs high level languages
low level: machine code - difficult to understand, assembly language - mnemonics so slightly easier,
high level: uses english so it is easy
ease of debugging of low vs high level languages
low level: machine code - errors are very difficult to spot and correct,
assembly language - easier than machine code,
high level: named variables and indentation and commenting make debugging easy
ease of execution of low vs high level languages
low level: machine code - directly executed,
assembly language - assembler must be used before program is executed but quick translation,
high level: compiler or interpreter must be used to translate source code into object code before execution
assembler
translates assembly language into machine code, each instruction has 1-1 relationship to machine code so translation is quick, platform specific
compilers
translates high-level language into machine code,
takes program as source code and checks for errors before translating entire program at once,
any error in source code and it will not be translated, platform specific,
once translated it does not need any other software
interpreter
translates high level language into machine code line by line, checks for errors as it goes, program can be partially translated until the error is reached, source code and interpreter must be present for execution
compiler vs interpreter
comp: checks source code line for errors line by line, entire source code translated at once, no need for source code or compiler to be present for execution, protects source code from extraction,
inter: translation begins immediately, each line is checked and translated sequentially, both source code and interpreter must be present for execution, offers little protection of source code
compilers with intermediate languages
compilers can code into an intermediate language instead of machine code, allowing for platform independence, intermediate language can be used with a virtual machine to execute bytecode on different processors, allows interpreter to translate source code once
source code definition
input to a translator (assembly language for assembler, high level language for compilers and interpreters)
object code
output of translator, produced from source code