SLR 4 Flashcards
Define interrupt
when devices and applications require processor attention during the FDE cycle
Define multitasking of a processor
allowing more than one program to be open and running at the same time
define Paging and Segmentation in computer memory
Pages: dividing a process into chunks of a fixed size, made to fit sections of memory, physical divisions
Segmentations: dividing a process into chunks of different sizes, and are complete sections of a program. logical divisions
Define virtual memory
when the hard disk is used to store least-used programs when RAM is full.
What are the four kinds of scheduling for operating systems
First come first served (FCFS)
Shortest job first (SJF)
Round robin (RR)
Shortest remaining time (SRT)
Define First come first served in terms of scheduling
like a supermarket queue, processes are executed in the order they arrive, the time they each take is irrelevant.
define shortest job first in terms of OS scheduling
The scheduler picks the processes that will take the shortest amount of time to complete and runs them first. It needs to know how long each will take before hand.
Define round robin in terms of OS scheduling
Each process is allocated a specific amount of time, and if the process is not completed in that time, it is moved to the back of the queue.
Define shortest remaining time in terms of OS scheduling
The processes with the shortest amount of time remaining are ran first. it is pre-emptive, processes can be suspended if high priority tasks (with shorter completion times) enter the queue
Define Multi-level feedback queue in terms of OS scheduling
Separates processes based on their processing needs, gives preferences to processes with short CPU bursts
Name the 5 kinds of operating system
Multitasking OS, Multiuser OS, Distributed OS, Embedded OS, Real-time OS.
What is a multitasking operating system
more than one application can be open at any one time, and each program is given a small slice of time to run in quick succession to give the illusion of them running in parallel.
What is a multiuser OS
Most operating systems, more than one person is allowed to use it, and the OS manages the user’s permissions and access rights when they log in.
What is a distributed OS
An operating system that can combine the precessions power of multiple computers on a network working together for one task
The OS controls and coordinates the computers, acting like a single system.
What is an embedded OS
they tend to run on dedicated hardware, with maximum efficiency, using a low-powered processor with very little memory, such as the computer inside a washing machine or traffic light.
what is a real-time OS
in safety critical environments, e.g. an aircraft autopilot system, processes have to execute within a known timeframe. Lots of redundancy is built into these systems, so can handle sudden increases in input. They rarely run in parallel.
What is a BIOS
Basic input-output system, it is responsible for loading the Operating System when the computer is turned on
What is a device driver
software that tells the operating system how to communicate with a device
What is a virtual machine
A program that has the same functionality as a physical computer, e.g. emulators.
Define hardware
Physical parts of a computer, RAM, CPU, keyboard etc
Define Software
computer programs, applications, system software, utility software
What are some examples of operating systems
Windows, Linux, macOS, iOS
What are some examples of utility software
antivirus, defragmentation, backup, compression, firewalls
What are some examples of applications software you are expected to have knowledge on
word processor, database, web browser, graphics manipulation
What is a generic applications
A software that does not have a specific or narrow purpose, used for multiple tasks with different needs
Generally most installed and used products by the populations.
What is a specific application
Limited use beyond what it is built for. Almost essential for the specific task. Tends to only be installed on systems where there’s a direct need
What is utility software
Software designed to:
* keep a computer safe
* keep it running efficiently
* Provide tools for managing files+applications
* bit like an MOT or service for a car
What is compression
Reduces the size of a file, must be extracted before they can be read. Data is often lost or represented in a different way
What is defragmentation
Reorganises files on a hard disk, putting fragments of files and free space together. It reduces the movement of the read-write head across the surface of the disk, speeding up file access.
What is anti malware
Keeps the computer and files safe from malware, comes included with virtually all operating systems.
What are some pros and cons of open-source software
Users can modify and distribute it, it can be installed on any number of computers, there is ample support from the community, and users have access to the source code. However, it may not be fully tested.
what are some pros and cons of closed source (proprietary) software
Protected by copyright, designs and patents act. supported and tested thoroughly by devs.
However users cannot modify software, and it is paid for and licensed per user/computer.
what are the three kinds of source code translator
Interpreter, Compiler, Assembler.
Describe an assembler
- translates assembly language into machine code
- takes basic commands and operations from assembly code and converts to binary code.
- translation process is typically a one-to-one process from assembly to machine code.
What are advantages of assemblers
Memory efficient, faster execution, hardware oriented, fewer instructions to accomplish same task.
What are disadvantages of assemblers
Long programs cannot be executed on small computers. takes a lot of time to code, as more complex. difficult to remember syntax. lack of portability between computers of different makes
Describe compilers.
Translates source code form high-level languages into object code and then machine code. whole programs translated into machine code before it is run.
What are some advantages of compilers
No need for translation at run-time. faster execution speed. code usually optimised. source code kept secret.
What are some disadvantages of compilers
source code easier to write in high level languages, but program will not run with syntax errors, which make it more difficult to write code. Entire file needs to be recompiled when code is changed. Designed for a specific processor type
Describe interpreters
Translates source code from high level languages into machine code, ready to be processed by the CPU. Program is translated one line at a time as the program is running.
What are some advantages of interpreters.
Easy to write source code, as program will always run, stopping when it find a syntax error. Code does not need to be recompiled when code is changed. Easy to for beginner programmers to learn to write code.
What are some disadvantages of using interpreters.
Translation software is required at run-time. speed of execution is slower. code is not optimised. source code is required.
What are the 4 stages of compilation
1) Lexical Analysis
2) Syntax Analysis
3) Code Generation
4) Code Optimisation
Describe the first stage of compilation, lexical analysis
- Lexer starts by converting lexemes in source code into a series of tokens, scanning code letter by letter
- When is comes across white space, special characters, or operators, it forms a lexeme(word)
- Then checks if lexeme is valid, using predefined rule set that allows every lexeme to be identified as a valid token
- Token streams are created from lexemes, inputted into a symbol table
Describe the second phase of compilation, Syntax Analysis
Analyse the syntactical structure of the input, checking if it is in the correct syntax of the programming language, by checking the token stream against set of rules.
As syntax tree is created, it strictly follows the syntax diagrams to ensure correctness.
Describe the 3rd & 4th stages of compilation, code generation and optimisation
Machine code is generated. Optimisation tries to reduce execution time of the program by:
* spotting redundant instructions and producing code that does the same thing by different means
* removing uncalled subroutines
* removing unreferenced variables and constants
This can greatly increase compilation time.
Define libraries.
Ready-compiled and tested programs that can be run when needed, Typically grouped together into software libraries.
What are some benefits and drawbacks of using libraries to produce code
Pros:
* quick and easy to use and hook into code
* Pre-tested, so error free
* Pre-compiled, so runs quickly
Cons:
* Adding functionality can be difficult
* Sometimes “black-boxed” from actual implementation