06 Fundamentals of Computer Systems Flashcards
define hardware
The physical components that make up a computer system
define software
Software comes in the form of programs which are sets of instructions that allow the computer to carry out a wide range of tasks.
define system software
software required to run and manage the computer’s hardware and applications e.g.
define application software
software which allows the user to carry out specific tasks e.g. word processor, spreadsheet software
what are the types of system software?
- operating system
- utility programs
- libraries
- translators
Define operating system
a collection of programs that control the operation of computer hardware
Define utility programs
software used to support the efficient running of the computer by analysing, configuring, optimising and maintaining the computer system
Define libraries
collections of pre-compiled routines that can be repurposed for use in other programs.
This is helpful as common tasks can be written as libraries for repeated use and this saves time e.g. math, random, turtle in Python
Define translators
software tools that are used to convert program code from one format into another, without adjusting the logical operation of the original program code
What are the roles of the OS?
- hide the complexities of the hardware
- Process scheduling
- Memory management
- I/O Device management
- handling interrupts
How does the OS carry out process scheduling?
- An OS schedules processes and switches between them by maintaining a process control block (a list organised by priority)
- Instructions from multiple operations are queued for the processor
- the processor executes a small part of each operation in turn so multiple programs appear to be running at the same time
- the OS allows us to multi-task e.g. music and word processor
- there are different types of scheduling algorithms e.g. Round Robin, shortest job next, priority system
How is memory management done by the OS?
- The OS allows you to run many processes at once
- The OS allocates memory for each process
- If there is not enough space in main memory, the OS creates virtual memory which will hold items in the RAM which are not currently being used
- Instructions and data are swapped in and out of virtual memory by the OS
How is device management done by the OS?
- the operating system makes devices accessible to the computer system through device drivers
- Communicates with I/O devices through the I/O controllers which are part of the CPU
- Checks if the output data is on and ready to receive data
- deals with processor interrupts e.g. out of paper
What are low level languages?
Languages that use the specific instruction set of the processor.
What are high level languages?
High-level languages are programming languages that are designed to allow humans to write computer programs and interact with a computer system without having to have specific knowledge of the processor or hardware that the program will run on.
- syntax reflects language used in everyday life
Describe machine code.
Binary instructions that can be interpretted by the processor directly
Describe assembly language.
assembly language that allows programmers to write machine code using a set of ‘mnemonics’ which have a 1 to 1 correspondence to machine code
What are the advantages of low level languages compared to high level languages?
- They allow a programmer to create optimised programs
- When a computer system has limited resources (processing power and memory) low-level languages allow a programmer to more directly control how the resources are used
What are the disadvantages of low-level languages?
- more difficult to write programs in low-level languages than in high-level languages; programmers need to have a very good understanding of the hardware being used.
- Low-level languages are not portable, because they are specific to a particular instruction set. In contrast, a high-level language program can be compiled or translated for different processors.
- do not have libraries of functions that can be imported and used by the programmer. This means the programmer has to write every process required for a program themselves.
What is a use of low-level languages?
- An embedded system is a complete computer system that has a dedicated function e.g. traffic lights, washing machines
- programs that run on embedded systems need to be efficient and make the best use of the processing power and memory available
- Low-level languages allow a programmer to create optimised programs for embedded systems.
Explain the term ‘imperative high level languages’ and its relationship to low-level languages.
- imperative high level languages consist of a list of commands that dictate exactly what a computer needs to carry out
- declarative languages simply focus on what the program needs to do rather than the steps
What are the roles of the three translators?
- assemblers convert assembly language into machine code
- compilers convert source code into an executable form (object code) that cannot be easily reverse-engineered
- interpreters translate and execute each line one by one
What are the differences between compilers and interpreters? and situations when each is appropriate.
- compilation errors are reported at the end of compiling
- interpreters report errors for each line as it is being translated
- allows devs to quickly identify and fix errors
- interpreted source code is slower to run than compiled object code (compiled useful where performance and speed is important e.g. fast moving games)
- interpreter needs be installed for the user to run the source code
- Compiled code needs to be re-compiled on different processors but as long as the interpreter is installed, interpreted code can be run on any platform
Explain why an intermediate language such as bytecode is produced as the final output by some compilers and how it is subsequently used.
- Some compilers like the java compiler compile the source code into an intermediate form - bytecode
- bytecode is portable
- each computer that can run Java has a Java Virtual Machine
- This understands the bytecode and converts it into machine code required for that specific computer
What is a half-adder?
A half-adder is a logic gate circuit which performs the addition of two bits
Takes input of two bits A and B and outputs the result S and the carry C
S = A XOR B
C = A AND B
What are the limitations of half-adders?
- Only takes in two inputs so you can’t use carry as third input for subsequent addition
- Only adds two single-bit numbers
What is a full adder?
S = (A ⊕ B) ⊕ Cin
Cout = (A * B) + (Cin * (A ⊕ B))
What is a edge-triggered d-type flip flop?
It is a elemental sequential logic circuit that can store the value of a single binary digit
What are the uses of an edge-triggered d-type flip-flop?
- Used to created registers and counters
- Used for immediate storage needed during arithmetic calculations
- Used to create Static RAM: faster and more expensive than dynamic RAM which has to be periodically refreshed so its used for cache memory while DRAM is used for main memory