4.6 Fundamentals of computer systems Flashcards
What is a computer?
A machine that processes data by following instructions
What is application software?
Application software is designed to perform tasks that a user wants to complete, such as playing a game, writing a letter, or sending an email.
What is system software?
System software controls the hardware of a computer system.
What is a library?
A collection of prewritten instructions that can be repurposed for use in other programs
Describe at least 3 roles of an operating system
Hiding the complexity of hardware from the user
Provides a platform for applications for run on
User Interfaces
Processor scheduling — determining the order in which processes will be executed, which allows for multi-tasking
Handling interrupts — dealing with requests that disrupt the processor’s work
Memory management — recording how memory in the computer is divided and identified so that memory is allocated efficiently between processes that are running
Secondary storage management — tracking where files and programs are stored and which parts are available for storage, and managing files and folders based on user permissions
Input/output device management — ensuring efficient communication with devices and managing functionality issues
What is a low-level language?
Low-level languages use the specific instruction set of a processor.
What is machine code?
Binary instructions written directly to the processor (the only language that can do so)
What does each low-level instruction consist of?
Each low-level instruction consists of two parts: an opcode and an operand.
OPCODE,OPERAND
eg.
001100 0010110100
What is an opcode?
An opcode is the part of the instruction that specifies which operation the processor should perform.
What is an operand?
The operand contains a value, or set of values, relevant to the opcode. The operand can be an actual piece of data, or it can be a reference to the memory location of the data for the opcode to act on.
What is the addressing mode?
The addressing mode specifies the way in which the operand will be interpreted
What does the opcode consist of?to
The opcode consists of the instruction to perform and the addressing mode.
How do you work out the number of addressing modes from the bits allocated ?
2^bits allocated
eg. 2 bits, 2^2 = 4
What is an assembly language?
A language that uses mnemonics that represent the binary equivalent machine code
What is a high-level language?
High-level languages use command words and Syntax that reflect everyday language. They are designed to allow humans to interact with a computer system with no technical knowledge of the hardware.
What is an imperative language?
Language/Paradigm where programmers solve a problem by writing a set of instructions that state how a problem should be solved.
What is procedural programming?
Paradigm where the program can be split into procedures (or subroutines).
What is a declarative language?
Declarative languages define what should be achieved by the program, not how to solve it.
Using a declarative language, the programmer specifies (or “declares”) the problem to be solved, without having to know how the solution is actually executed.
What is an object oriented language?
A language that uses classes to define objects in order to model the problem to be solved.
How does a compiler work?
Compilers translate code into a form that can be executed. The output from a compiler is an executable file .
How does an interpreter work?
Interpreters translate and execute each line of source code one by one.
Interpreter Vs. Compiler
Compiler pros:
Faster running time as no translation is required at run time.
The executable code cannot be reverse engineered back to its source code so is secure.
Compiler cons:
If you want to change something in the program you have to recompile it into a new file.
You only receive the errors in the code after the whole program is compiled.
Interpreter pros:
Translates line by line so errors are reported straight away. They are easier to find and fix making it better for debugging.
Interpreter cons:
Slower running time.
Interpreter must be downloaded o every machine code will run on taking up space in memory.