1.2 Software and software development Part 1 Flashcards

1
Q

1.2.1 (a) Functions of Operating Systems

A

Provides the Interface between the user and the hardware
Operating system provides a platform that the application software can run and communicate with the hardware
A user interface is provided by the operating system
Used alongside Utility Programs
Memory Management
File Management
Device Drivers
Interrupt Handling

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

1.2.1 (a) How does a User interact with the computer

A

The operating system provides the interface between the user and the hardware
The user communicates with the computer via the application software
The operating system provides a platform that the application software can run an communicate with the hardware
Application software usually involves a user interface which allows an interaction with software in a familiar and friendly way
The User Interface is also provided by the operating system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

1.2.1 (a) Multitasking

A

When more than one program is open at the same time
The processor allocates a small amount of time (time slice) to each process and cycles between them
Happens so quickly it appears they are executing simultaneously

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

1.2.1 (a) File Management

A

Data is stored in files with extensions
Extensions tells the operating system which application to load the file into e.g. .pptx
Operating system presents a logical structure of files in folders
Allows the user to rename, delete, copy and move files
Files become fragmented and needs defragmentation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

1.2.1 (a) User Management

A

Allows multiple users to log onto the same computer
Their preferences and settings are retained
They may have different access levels to files
Client Server network imposes a fixed or roaming profile, which has the same customised settings for all users on every device
Also manages login requests

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

1.2.1 (a) User Interface

A

The way in which humans can interact with the computer
WIMP: Windows, Icons, Menus, Pointers (Graphical User Interface: GUI)
Visual, Interactive, Intuitive, optimised for beginners and mouth and touch gestures

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

1.2.1 (b) Memory Management

A

When a new program arrives it is put into a slot, or split up and put into multiple spots - If there is enough total space

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

1.2.1 (b) Paging

A

Memory is divided into fixed sizes (equal)
Pages are made to fit sections of memory
Pages are physical divisions
Programs are split up into a given number of pages
Does not account for how memory is split up: Could separate a loop across multiple pages which makes it not very efficient

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

1.2.1 (b) Segmentation

A

Different sized divisions
Complete sections of programs
Logical divisions
Splits programs logically into parts, to fit into memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

1.2.1 (b) Similarities between Paging and Segmentation

A

Allows programs with insufficient memory to run
Both are stored on disk
Both are transferred into memory when needed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

1.2.1 (b) Differences between Paging and Segmentation

A

Pages are fixed size, Segments are variable size
Pages are made to fit memory sections, Segments are complete sections of programs
Pages are physical divisions, Segments are logical divisions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

1.2.1 (b) Virtual Memory

A

When RAM is gull
Fetched and Executed programs are stored in RAM
Store significantly more programs in the hard disk than RAM
Instructions that are not being used currently are moved to a space on the hard disk (Virtual Memory)
When they are needed a different program can be swapped out of RAM
If more time is spent moving between RAM and virtual memory (disk thrashing) then the computer will be slow
Impression of more memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

1.2.1 (c) Interrupts

A

Computers process data using the FDE cycle
While this occurs, other devices may need the processors attention
To do this they signal to the processor via an Interrupt
The Computer Fetches, Decodes and Executes the last instruction, then checks for new interrupts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

1.2.1 (c) ISR

A

Interrupt Service Routine
The program to carry out the interrupt
The PC is changes to the interrupts address
The values of the registers are pushed onto the stack data structure for later retrieval as a stack frame
The interrupt is now executed
When the interrupt is complete, the stack frame is popped off the top of the stack
The previous values for the original program
Load them back into the processor registers
Continue executing the original program from where was left off

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

1.2.1 (c) Interrupting an Interrupt

A

While the ISR is executing interrupt A, a higher priority interrupt comes along, A is suspended
Registers contents are pushed onto the top of the stack
ISR handles B
WE pop the stack frame off the top of the stack
Load the Interrupt back into the registers
Continue executing ISR A
When ISR A is complete, we pop the stack frame off the top of the stack
Carry on executing with the original program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

1.2.1 (c) Interrupt Priority

A

Interrupts are higher priority than normal programs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

1.2.1 (c) Interrupt Examples

A

Hardware: Power Failure, Power Button Pressed
User: Clicking / Typing, Moving mouse
Software: Overflows, Log on requests
Timer: Data logging programs
I/O Devices: Signal complete data transfer, insufficient printer ink

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

1.2.1 (d) Scheduling

A

Multitasking operating systems, give the appearance of multiple tasks executing at the same time
Multiple threads may be executing in one program
Multi-User Environments, user need servicing at the same time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

1.2.1 (d) Scheduler

A

Manages which process to execute next and how long the processes can execute for
Process enters the ready queue, when the previous process is executed, the process moves into a running state

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

1.2.1 (d) Ending a process

A

Either the process finishes completely and leaves the system
May get blocked if it requires an input or output command, it cannot continue until more data is received
May be suspended as it runs out of allotted time and moves to the back of the ready queue
If there are multiple processes, it requires a scheduling algorithm to decide which process to execute next

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

1.2.1 (d) First Come First Serve (FCFS)

A

One Queue Only
Processes are executed in the order they arrive in
If a process takes a while, the others have to wait for it to leave the CPU - Maybe be starved of processor time
Time to complete is not considered

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

1.2.1 (d) Shortest Job First (SJF)

A

One Queue Only
Picks the process that takes the shortest amount of time and runs them until they finish
Scheduler need to know how long each process will take
Scheduler orders based on shortest time
They execute as before, until completion allowing the next process in the ready queue to enter the running state

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

1.2.1 (d) Round Robin (RR)

A

Pre-Emptive Algorithm
One Queue Only
Each process is allocated a fixed time slice / quantum
If the process is not completed after the time slice, it is suspended and returns to the back of the ready queue

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

1.2.1 (d) Shortest Time Remaining

A

Pre-Emptive Algorithm
One Queue Only
Processes can be suspended if a higher priority process joins the queue, whilst executing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
1.2.1 (d) Process Blocking
If a process required additional data, it is blocked until this input is serviced When serviced, it uses an interrupt to join the queue
26
1.2.1 (d) Multi-Level Feedback queues
Pre-Emptive Algorithm Uses Multiple Queues Separates process into multiple ready queues based on their need for the processor Preferences to processes with short CPU bursts Preferences to processes with high I/O bursts I/O-bound processes will sleep in a wait queue to give other processes CPU time Queues themselves can use scheduling
27
1.2.1 (d) Queue Shifting
Processes can be shifted between different priority queues: If it is waiting for too long, (starved) it moves to a higher priority queue If it takes too much CPU time, it is moved into a lower priority queue If it is I/O bound or interactive, it is moved to a higher priority queue
28
1.2.1 (d) Pre-Emptive Definition
A process can be interrupted if a higher priority process enters the queue
29
1.2.1 (e) Types of Operating System
Multi-Tasking Multi-User Distributed Embedded Real-Time Or a Combination of classes
30
1.2.1 (e) Multi-Tasking Operating Systems
Allows multiple applications to be open at the same time In single-processor systems, each active program is scheduled to receive a time slice Or makes use of multiple cores / processors
31
1.2.1 (e) Multi-User Operating Systems
Most Systems allow more than one person to use a computer at the same time The computer manages users permissions / access rights when they log on The server's OS software will handle the requests of multiple people using different computers on a network simultaneously
32
1.2.1 (e) Distributed Operating Systems
Combine the processing power of multiple computers across a network for a single task Operating system coordinates and controls the computers, presenting as one to the user E.g. Online Shopping If the system becomes busy, additional servers may automatically join the system
33
1.2.1 (e) Embedded Operating Systems
Run on dedicated hardware, and are maximum efficiency Low powered processors and little memory Built into a larger device E.g. Washing Machines, Traffic Lights Highly Specialised
34
1.2.1 (e) Real-Time
Safety Critical Environments E.g. Hospitals and Aircraft Processes are guaranteed to execute in a know time frame Rarely run at full capacity Built with redundancy to handle sudden increases in inputs
35
1.2.1 (f) BIOS
Basic Input Output System Responsible for loading the operating system when the computer turns on Check the hardware is connected and working - Power On Self Test (POST) Different Settings can be configured via the BIOS, e.g. The order of drives the computer loads the operating system from A boot loader program (Bootstrap), loads operating system kernel into memory, then the operating system takes over, boots the rest of the system Start-up instructions are stored on ROM BIOS settings are stored in flash memory, can be changed and are retained without power.
36
1.2.1 (g) Device Driver
Software that tells the operating system how to communicate with many different devices - Which all need to have a similar looking output Device Driver translates the operating system's instructions to print the document into a series of instructions that a specific hardware understands
36
1.2.1 (h) Virtual Machines
A program that has the same functionality as a physical computer E.g. Arcade Games Developing games on a PC, but testing on a different machine
37
1.2.1 (h) Emulators
Trick a program into thinking it is run on native hardware when its running on a different machine
38
1.2.1 (h) Virtual Servers
Many virtual servers can be run on a smaller number of physical servers If demand for resources increases, more virtual servers can be made If one server fails, others can take on the extra work
39
1.2.1 (h) Java Virtual Machine
Java runs on many platforms Using traditional programming, it would require specific programming for each device or by using a suitable compiler Java compiles into byte/intermediate code Translated by a Java Virtual Machine, running on a target device, translates into specific machine code Makes the code highly portable between devices
40
1.2.2 (a) Hardware / Software
Hardware: Physical Parts of a computer system Related devices Internal/External Software: Computer Programs
41
1.2.2 (a) System Software
A type of computer program designed to run a computer's hardware and application programs Split into Operating Systems and Utility Software
42
1.2.2 (a) Operating System Software
The essential program that, after being initially loaded into the computer by a boot program, manages all the other application programs in a computer. E.g. Windows, Linux, I/MacOS
43
1.2.2 (a) Utility Software
A non-essential program specifically designed to help manage and tune system or application software E.g. Antivirus / Firewall, Defragmentation, Backup, Compression, Encryption
44
1.2.2 (a) Application Software
A type of computer program that performs a specific personal, educational, and business function E.g. Word Processors, Database, Web browser Graphics
45
1.2.2 (a) Generic Applications
Application that does not have a specific purpose, can be used to meet multiple needs Can be used for tasks that may be better served for a more bespoke application Don't use brand names
46
1.2.2 (a) Specific Applications
E.g. Database Software Highly Specific, bespoke Only preforms a specific task Don't use brand names
47
1.2.2 (b) Utility Software
Keeps the Computer Safe Keeps the Computer Running Efficiently Provides you with useful tools to manage your files and apps
48
1.2.2 (b) Types of Utility Software
Backup Compression Defragmentation Encryption Anti-Malware File Management Device Drivers File Repair
49
1.2.2 (b) File Repair
Files may become corrupt or damaged Software returns the file to it's original working state Often built into certain applications
50
1.2.2 (b) Backup
Data can be lost when stored digitally Manual, Automatic or Scheduled Full or Incremental Backups Back up to different media or a cloud system Often with operating system or can be purchased separately
51
1.2.2 (b) Compression
Reduces the size of a file so that it takes up less space and downloads faster over the internet Need extracting before they can be read
52
1.2.2 (b) Lossy Compression
Unnecessary data is removed from a file Reduces the quality e.g. JPEG / MP3
53
1.2.2 (b) Lossless Compression
Data is represented in a different way, which takes up less space All data is retained in a new format Patters are spotted E.g. Zip
54
1.2.2 (b) Defragmentation
Reorganises files on a hard disk, putting fragments of files and free space back together Reduces the movement of the read / write head across the disk, speeding up file access Solid State Drives should not be defragmented (No moving parts) - Reduces the Drive's lifespan
55
1.2.2 (b) Anti-Malware
Keeps your computer and files safe from many types of malware Types: Viruses, Trojans, Worms, Spyware Operating systems come with malware protection built in Companies specialise in anti-malware programs
56
1.2.2 (c) Open Source Software
Linux Users can modify and distribute the software (as source code) Can be installed on any number of computers Support provided by the community Users have access to the source code May not be full tested
57
1.2.2 (c) Open Source Pros and Cons
User: Pros: Free, Wide community modification Cons: Poorly supported, may not be well tested Creator: Pros: Software reaches a wider community faster Cons: Little / No financial profit
58
1.2.2 (c) Closed Source Software
Protected by the copyright design and patents act User cannot modify the software Usually paid for and licensed per user/device Supported by developers (No source code is released) Tested by developers
59
1.2.2 (c) Closed Source Pros and Cons
User: Pros: Well supported, tested, professionally built Cons: Cost / Subscription fee Creators: Pros: Income Cons: Demand for features and improvement, piracy issues
60
1.2.2 (d) Translators
Source code is descriptive, easy to understand, read, maintain and debug Machines need pure binary (machine) code Source Code -> Translation -> Machine Code - Specific processor architecture
61
1.2.2 (d) Assembly Code
Assembler takes the mnemonics of the code and translates in a 1-to-1 relationship into machine code, to be executed on specific processor architecture
62
1.2.2 (d) Interpretation and Compilation
High Level Source Code is translated in two ways Interpreted: Take 1 line, translates then execute and move onto the next line Compilation: Takes all of the source code and converts it into object code - Linker pulls in additional code Either the finished code is produced immediately Or Intermediate code could be generated and then interpreted
63
1.2.2 (d) Differences between Compilation and Interpretation
Compilers will not run with syntax errors Interpreters will run (partially execute) until the error
64
1.2.2 (d) Assembler
Takes basic commands and operations and converts them into binary
65
1.2.2 (d) Assembler Pros
Programs in machine language can be replaced with mnemonics which are easier to remember Memory efficient Speed of execution is faster (code is optimised) Hardware oriented Fewer instructions accomplish the same result
66
1.2.2 (d) Assembler Cons
Long programs cannot be executed on small computers in assembly It takes a lot of time to write the program as it is complex Difficult syntax to remember Specific to computers
67
1.2.2 (d) Compiler
High level into object code into machine code The whole program is translated into machine code before execution
68
1.2.2 (d) Compiler Pros
No need for translation at run time Execution speed is faster Code is usually optimised Source code is kept secret
69
1.2.2 (d) Compiler Cons
The program will not run with syntax errors, which can make it difficult to write code Needs recompiling when changed Designed for specific processors
70
1.2.2 (d) Interpreters
High-Level machine code ready to be processed by the CPU Program is translated line by line as the program is running
71
1.2.2 (d) Interpreter Pros
Easy to write source code as it will always run - Stopping when a syntax error is found Does not need to be recompiled when the code is changed Easy to try out commands when the program has paused after an error Easy to learn to write code
72
1.2.2 (d) Interpreter Cons
Translation software is required at run-time Speed of execution is slower Code is not optimised Source code is required
73
1.2.2 (e) Stages of Compilation
Lexical Analysis Syntax Analysis Code Generation Code Optimisation
74
1.2.2 (e) Compilation and Source Code
Source Code: Close to English Easy to read, modify and interpret by humans Compilation: Compiler runs through a series of parses Parse: An Action are preformed on the source code for the next stage
75
1.2.2 (e) Lexical Analysis
The Lexer converts lexemes in the source code into tokens Spans code letter by letter When a space or symbol it looks at the previous work Checks if the lexeme is valid - Predefined set of rules Turned into tokens with a class and keyword Whitespace and comments are removed as a by product Token stream is produced Tokens turned into a symbol table which tracks variables and subroutines
76
1.2.2 (e) Syntax Analysis
Preformed by a Syntax Analyser Tokens are inputted Syntactical structure of input is analysed Checks the token stream against production rules to detect errors in code -> Errors may be generated Produces an abstract syntax / Parse tree Could suggest corrections
77
1.2.2 (e) Abstract Syntax Tree
Created from an input token stream Checks for errors Data type of Identifiers is updated to table
78
1.2.2 (e) Code Generation
Object code is generated without a linker Comes from the abstract code tree
79
1.2.2 (e) Code Optimisation
Reduces Execution Time Spots redundant instructions and replaces them with more efficient object code Removes subroutines are not called Removing variables or constants which are not referenced Optimisation Increases Compilation Time Removes unreachable code - E.g. Code after a return command inside a subroutine (It will never be executed) Flow / Control Optimisation - Unnecessary Jumps can be removed The resultant code runs quickly using the least amount of memory
80
1.2.2 (f) Libraries
Ready-Compiled and tested programs - Run when needed Grouped into software libraries Languages usually have pre-built functions e.g. Windows Dynamic Link Libraries - Subroutines to carry out common tasks on the windows operating system Appropriate sub-routine is called with the correct parameters
81
1.2.2 (f) Benefits of Libraries
Quick and Easy to Use Hook unto own code Pre-Tested (Usually Free from errors) Pre-Compiled -> Optimised
82
1.2.2 (f) Drawbacks of Libraries
Cannot alter the subroutine Cannot understand how the code works or have access to the code Trust that the developer will maintain the library Trust that it is fully tested
83
1.2.2 (f) Linkers
Responsible for putting the appropriate machine addresses in all the external call and return instructions, so all modules and external library routines are linked together correctly Also links separately compiled subroutines into the object code
84
1.2.2 (f) Uses of Linkers (Static)
All the required code from the libraries is included directly in the finished machine code, producing large executable program files
85
1.2.2 (f) Uses of Linkers (Dynamic)
Compiled versions of the required libraries are stored on the host computer The OS links the required code from the library as the program is running Cuts down on the size of the machine code If the dynamic libraries change, the program may stop, because it tries to call a subroutine in the wrong way
86
1.2.2 (f) Loaders
Part of the operating system that loads the executable program file (machine code) into memory to be run Dynamic Linking: Responsible for loading the required libraries into memory