1.2 Software and software development Flashcards

1
Q

What is meant by the term multitasking?

A
  • When you have more than one program open and running at the same time
  • The processor allocates a small amount of time to each process and cycles between them
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is file management?

A
  • Data is stored in files
  • An extension to the filename tells the OS which application to load the file into
  • The OS may present a logical structure of files in folders and allow the user to rename, delete, copy and move files
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is user management?

A
  • Allows multiple users to log into the same computer.
  • The OS will retain settings for each user such as icons, desktop, backgrounds etc.
  • Each user may have different access rights to files and programs
  • A client-server network may impose a fixed or roaming profile for a user and manage login requests to the network
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the 2 methods of dividing memory into smaller sections?

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

Describe paging

A
  • Pages are fixed size
  • Pages are made to fit sections of memory
  • Pages are physical divisions
  • Programs are split to fit into a given number of pages
  • Paging takes no account of how it splits the program, only that it splits it into fixed-sized pages
  • It could separate the instructions inside a looping condition so they are in different pages, but that wouldn’t be efficient
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Describe segmentation

A
  • Segments are different sizes
  • Segments are complete sections of programs
  • Segments are logical divisions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is Virtual memory?

A
  • Using parts of the HDD to store programs that can’t be stored in primary memory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is an interrupt?

A
  • While the processor does the FDE cycle other devices and applications may require the processor’s attention.
  • They need a way to signal to the processor that they require attention - this is what’s called an interrupt
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the ISR?

A
  • Interrupt Service Routine
  • A program with a set of instructions that need to be fetched, decoded and executed to carry out the operations of the interrupt
  • That means that the contents of the PC need to be changed to point to the address for the first instruction of the interrupt
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What happens when an interrupt is received?

A
  • The values held in the registers are copied into a data structure in memory known as the stack
  • These values are pushed onto the stack in a stack frame, effectively saving them for later retrieval
  • The interrupt can now be executed
  • Once the interrupt is complete, we pop the frame off the top of the stack.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does popping the frame of the stack allow us to do?

A
  • Retrieve the previous values for the original program
  • Load them back into the processor registers
  • Carry on executing the original program where we left off
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What happens when a high-priority interrupt comes along while an interrupt is being executed?

A
  • The stack system handles it by:
    • Suspending ISR A
    • Pushes register contents onto the top of the stack
    • Starts executing ISR B
    • Once ISR B has completed executing, we pop the frame off the top of the stack to retrieve the value for ISR A, load them back into the processor registers and carry on executing ISR A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are some examples of hardware interrupts?

A
  • Power supply failure
  • Power/reset button pressed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are some examples of user interrupts?

A
  • Moving the mouse
  • Keyboard presses
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are some examples of software interrupts?

A
  • Illegal instructions encountered
  • Arithmetic overflow
  • New log on request
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are some examples of timer interrupts?

A
  • Screen recording application
  • Data-logging program reading an input-sensor every second
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What are some examples of I/O devices interrupts?

A
  • Buffer nearly empty
  • Printer ink supply notification
  • Signal the completion of a data transfer to/from a device
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What does a scheduler do?

A
  • Manages which process to execute next
  • Manages the length of time the next process can execute for
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Explain the process of scheduling using Process A as an example

A
  • Process A is a new process
  • The number indicates the length of time before it finishes
  • It enters the ready queue
  • When the currently executing process finishes or is blocked or suspended, process A can move into a running state
  • From here it will either:
    • Finishing executing completely and leave the system
    • Get blocked as it requires an input or output commands, meaning it can’t continue until more data is received
    • Run out of time - each process is allocated a certain amount of time after which it is suspended and moved to the back of the ready queue
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is an FCFS algorithm?

A
  • First come First Served
  • Processes are executed in the order they arrive
  • If a process takes a long time, the others behind it have to wait
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is a SJF algorithm?

A
  • Shortest Job First
  • Picks the processes that take the shortest amount of time and runs them until they finish
  • The scheduler needs to know how long each process will take
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is a RR algorithm?

A
  • Round Robin
  • Each process is allocated a fixed amount of time, known as a time slice or quantum
  • If the process isn’t complete by the end of its time slice, it returns to the back of the ready queue
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is a SRT algorithm?

A
  • Shortest Remaining Time
  • Similar to SJF
  • Pre-emptive algorithm, meaning processes can be suspended if a higher priority process joins the queue
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What is a MLFQ algorithm?

A
  • Multi Level Feedback Queue
  • This algorithm builds upon these standard algorithms with the following design principles:
    • Separates processes into multiple ready queues based on their processing needs.
    • Gives preference to processes with high I/O bursts
    • I/O bound processes will sleep in a wait queue to give other processes CPU time
  • This algorithm allows for processes to be shifted between queues
  • If a process has too much CPU time, it will be moved to a lower priority queue
  • If a process is I/O bound or an interactive process, it will be moved to a higher priority queue
  • If a process is waiting too long in a low-priority queue, it will be moved to a higher priority queue
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What are the 5 types of OS?
- Distributed - Multi-User - Real-Time - Embedded - Multi-tasking
26
What is a multi-tasking OS?
- An OS that handles many processes at the same time
27
What is a multi-user OS?
- An OS that allows more than one person to access a single computer at the same time - The computer will manage the user's various permissions and access rights when they log on - Server operating system software will handle the requests of multiple people using different computers on a network at the same time
28
What is a distributed OS?
- An OS which can combine the processing power of multiple computers across a network for a single task
29
What happens in distributed computing?
- The operating system controls and coordinates system controls and coordinates the computers, presenting them to the user as if they were a single system
30
What are embedded OS?
- They run on dedicated hardware so they run with maximum efficiency, using low powered processor and very little memory
31
What is a real-time OS?
- An OS that executes processes within a known time frame - Plenty of redundancy is built into these systems so they can handle sudden increases in input - As such, processors in real-time OS rarely run at capacity
32
What is the BIOS responsible for?
- Responsible for loading the OS when the computer first turns on - It first checks that the hardware it needs is connected and working using a POST
33
What is a bootloader used for?
- Used to load the OS kernel into memory
34
Where are BIOS settings stored and why?
- Stored in flash memory - So that they can be changed and retained when the power if switched off
35
What is a device driver?
- Software that tells the OS how to communicate with a peripheral device
36
What does a device driver do?
- The device driver translates the OS' instructions into a series of instructions that a specific piece of hardware will understand
37
What is a virtual machine?
- A program that has the same functionality as a physical computer
38
What do emulators do?
-Trick a program into thinking it's running on its native hardware when it's running on an entirely different machine
39
What is an advantage of virtual servers?
- If one server stops working, the others can pick up the load and continue working as if nothing happened
40
Give one example of intermediate code running on a virtual machine.
- Java
41
Why is Java good for running on virtual machines?
- Because other programming languages would either have to use a specific language of each device or use a suitable compiler. - Java gets around this by compiling its code into a half-way code known as bytecode or intermediate code - This code is then translated by a Java Virtual Machine (JVM) running on a target device which then translates it into specific machine code
42
Why is one advantage of the JVM process?
- Makes the code highly portable between devices.
43
What are the 2 types of software?
- System software - Application software
44
What are the 2 types of system software?
- Operating Systems - Utility software
45
What are some examples of Operating Systems?
- Windows - Linux - Windows - macOS - iOS
46
What are some examples of utility software?
- Antivirus - Defragmentation - Backup - Compression - Firewalls
47
What are some examples of application software?
- Presentation - Word processor - Web browser - Games - Email
48
What is a generic application?
- A word processor is an example of one. It does not have a specific or narrow purpose - You can use it to carry out different tasks and meet multiple needs
49
What is a specific application?
- Database software is an example of one. - Being highly specific and bespoke, however, makes it almost essential for creating serious database application
50
Where does specific application software tend to be installed?
- On systems where there is a direct need
51
What is utility software?
- Software designed to: - Keep your computer safe - Keep it running efficiently - Provide you with useful tools to manage your files and applications
52
Utility software: What is file repair used for?
- Files can become corrupt or damaged for a number of reasons - File repair attempts to correct these issues and restore the file to its original working state
53
Utility software: What is backup software used for?
- Backups can be set up to be manual, automatic or scheduled - There are 2 types: Full backups or incremental backup - Backup software often comes with your OS but an also be purchased separately
54
Utility software: What is compression software used for?
- To reduce the size of a file so it takes up less space and downloads faster over the internet - Compressed files must be extracted before they can be read - Depending on the algorithm used data is either lost, reducing the quality of an image or audio file, or represented in a different way using binary, retaining the original data in a new, compressed format (e.g. ZIP)
55
What is defragmentation software used for?
- To re-organise files on a hard disk, putting fragments of files and free space back together - The process reduces the movement of the read/write head across the surface of the disk, which speeds up file access
56
Why shouldn't SDDs be defragmented?
- Unnecessary as it has no moving parts - Reduces the drive's lifespan
57
What is anti-malware software used for?
- Helps keep your computer and files safe from many types of malware including: - Viruses - Trojans - Worms
58
What are some characteristics of Open-Source software?
- Users can modify and distribute the software - Can be installed on any number of computers - Support provided by the community - Users have access to the source code - May not be fully tested
59
Open source: What are some benefits and drawbacks for the user?
Benefits: - Software is free - Wide community modification Drawbacks: - Can be poorly supported - Some features might not be well tested
60
Open source: What are some benefits and drawbacks for the creators?
Benefits: - Gets their software out there to a wider community Drawbacks: - Little-to-no financial gain
61
What are some characteristics of Closed-Source software?
- Protected by the Copyright Design and Patents Act - Users cannot modify the software - Usually paid for and licensed per user or per computer - Supported by developers who do not release source code - Tested by developer prior to release, although it may run beta programs
62
Closed source: What are some benefits and drawbacks for the users?
Benefits: - Well supported, tested and professional built product Drawbacks: - Cost or ongoing subscription fee
63
Closed source: What are some benefits and drawbacks for the creators?
Benefits: - They receive an income for their product Drawbacks: - Constant demand from community for more features and improvements - Piracy issues
64
What is meant by translation?
- The process of converting source code to machine code
65
What are the 3 types of translators?
- Assemblers - Interpreters - Compilers
66
What does an assembler do?
- Translates assembly code into machine code - Takes basic commands and operations from assembly code and converts them into binary code that can be recognised by a specific type of processor
67
What does an interpreter do?
- Translates source code into machine code - Takes one line, translates it, then executes it - Once it discovers an error, it will output it, but it will keep running
68
What does a compiler do?
- Translates source code into object code and then machine code - Takes the whole source code and converts it into machine code - Won't run unless all errors are corrected first
69
What are some advantages and disadvantages of assemblers
Advantages: - Memory efficient - Speed of execution is faster - Hardware-oriented Disadvantages: - Long programs written in such languages cannot be executed on small computers - Difficult to remember the syntax
70
What are some advantages and disadvantages of compilers?
Advantages: - No need for translation at run-time - Speed of execution is faster - Code is usually optimised Disadvantages: - Code needs to be re- compiled when the code is changed. - Designed for a specific type of processor
71
What are some advantages and disadvantages of interpreters?
Advantages: - Easy to write source code, as the programs will always run, stopping when it finds a syntax error - Code does not need to be recompiled when code is changed Disadvantages: - Translation software is required at run-time - Speed of execution is slower - Code is not optimised - Source code is required
72
What happens during a compilation process?
- A compiler runs through a series of parses - With each parse, the compiler performs different actions on the source code - Each parse is designed to carry out set tasks and prepare the code for the next stage of compilation
73
What is an algorithm?
- A sequence of steps designed to perform a task
74
What is assembly language?
Assembly language is a programming language where mnemonics are used to represent instructions
75
What are the 2 methods of dividing memory into smaller sections?
- Paging - Segmentation
76
Describe paging
- Pages are fixed size - Pages are made to fit sections of memory - Pages are physical divisions - Programs are split to fit into a given number of pages - Paging takes no account of how it splits the program, only that it splits it into fixed-sized pages - It could separate the instructions inside a looping condition so they are in different pages, but that wouldn't be efficient
77
Describe segmentation
- Segments are different sizes - Segments are complete sections of programs - Segments are logical divisions
78
What is Virtual memory?
- Using parts of the HDD to store programs that can't be stored in primary memory
79
What is an interrupt?
- While the processor does the FDE cycle other devices and applications may require the processor's attention. - They need a way to signal to the processor that they require attention - this is what's called an interrupt
80
What is the ISR?
- Interrupt Service Routine - A program with a set of instructions that need to be fetched, decoded and executed to carry out the operations of the interrupt - That means that the contents of the PC need to be changed to point to the address for the first instruction of the interrupt
81
What happens when an interrupt is received?
- The values held in the registers are copied into a data structure in memory known as the stack - These values are pushed onto the stack in a stack frame, effectively saving them for later retrieval - The interrupt can now be executed - Once the interrupt is complete, we pop the frame off the top of the stack.
82
What does popping the frame of the stack allow us to do?
- Retrieve the previous values for the original program - Load them back into the processor registers - Carry on executing the original program where we left off
83
What happens when a high-priority interrupt comes along while an interrupt is being executed?
- The stack system handles it by: - Suspending ISR A - Pushes register contents onto the top of the stack - Starts executing ISR B - Once ISR B has completed executing, we pop the frame off the top of the stack to retrieve the value for ISR A, load them back into the processor registers and carry on executing ISR A
84
What are some examples of hardware interrupts?
- Power supply failure - Power/reset button pressed
85
What are some examples of user interrupts?
- Moving the mouse - Keyboard presses
86
What are some examples of software interrupts?
- Illegal instructions encountered - Arithmetic overflow - New log on request
87
What are some examples of timer interrupts?
- Screen recording application - Data-logging program reading an input-sensor every second
88
What are some examples of I/O devices interrupts?
- Buffer nearly empty - Printer ink supply notification - Signal the completion of a data transfer to/from a device
89
What does a scheduler do?
- Manages which process to execute next - Manages the length of time the next process can execute for
90
Explain the process of scheduling using Process A as an example
- Process A is a new process - The number indicates the length of time before it finishes - It enters the ready queue - When the currently executing process finishes or is blocked or suspended, process A can move into a running state - From here it will either: - Finishing executing completely and leave the system - Get blocked as it requires an input or output commands, meaning it can't continue until more data is received - Run out of time - each process is allocated a certain amount of time after which it is suspended and moved to the back of the ready queue
91
What is an FCFS algorithm?
- First come First Served - Processes are executed in the order they arrive - If a process takes a long time, the others behind it have to wait
92
What is a SJF algorithm?
- Shortest Job First - Picks the processes that take the shortest amount of time and runs them until they finish - The scheduler needs to know how long each process will take
93
What is a RR algorithm?
- Round Robin - Each process is allocated a fixed amount of time, known as a time slice or quantum - If the process isn't complete by the end of its time slice, it returns to the back of the ready queue
94
What is a SRT algorithm?
- Shortest Remaining Time - Similar to SJF - Pre-emptive algorithm, meaning processes can be suspended if a higher priority process joins the queue
95
What is a MLFQ algorithm?
- Multi Level Feedback Queue - This algorithm builds upon these standard algorithms with the following design principles: - Separates processes into multiple ready queues based on their processing needs. - Gives preference to processes with high I/O bursts - I/O bound processes will sleep in a wait queue to give other processes CPU time - This algorithm allows for processes to be shifted between queues - If a process has too much CPU time, it will be moved to a lower priority queue - If a process is I/O bound or an interactive process, it will be moved to a higher priority queue - If a process is waiting too long in a low-priority queue, it will be moved to a higher priority queue
96
What are the 5 types of OS?
- Distributed - Multi-User - Real-Time - Embedded - Multi-tasking
97
What is a multi-tasking OS?
- An OS that handles many processes at the same time
98
What is a multi-user OS?
- An OS that allows more than one person to access a single computer at the same time - The computer will manage the user's various permissions and access rights when they log on - Server operating system software will handle the requests of multiple people using different computers on a network at the same time
99
What is a distributed OS?
- An OS which can combine the processing power of multiple computers across a network for a single task
100
What happens in distributed computing?
- The operating system controls and coordinates system controls and coordinates the computers, presenting them to the user as if they were a single system
101
What are embedded OS?
- They run on dedicated hardware so they run with maximum efficiency, using low powered processor and very little memory
102
What is a real-time OS?
- An OS that executes processes within a known time frame - Plenty of redundancy is built into these systems so they can handle sudden increases in input - As such, processors in real-time OS rarely run at capacity
103
What is the BIOS responsible for?
- Responsible for loading the OS when the computer first turns on - It first checks that the hardware it needs is connected and working using a POST
104
What is a procedural language? How is it laid out?
- A language that focuses on telling a computer exactly what to do by way of step-by-step instructions - It's laid out as a series of statements such as: Iteration, Sequence and Selection
105
What are the 3 programming constructs?
- Sequence - Selection - Iteration
106
What is sequence?
- Executing one instruction after another
107
What is selection?
- Allows a program to branch and follow a different direction depending on the outcome of a condition
108
What is iteration?
- Repeating sections of code
109
What is nesting?
- The process of putting one statement inside another - which can be achieved through both iteration and selection statements
110
What is a variable?
- A pointer to a memory address that we are able to give a user-friendly label/name
111
What is a constant?
- A value which remains fixed and doesn't change while the program is running, it must be set when the program is first written
112
What is casting?
- Converting one data type to another
113
What is a subroutine?
- A block of code given an unique identifiable name within a program
114
Why do we use subroutines?
- To break down a larger problem into a series of smaller, more manageable problems, making them easier to code, debug and reuse.
115
What are the 2 types of subroutines?
- Procedures - Functions
116
What is a procedure?
- Blocks of code that carry out a set task
117
What is a function?
- Blocks of code that carry out a set task and return a value
118
What are the advantages of using subroutines?
- Programs are easier to write - Programs are easier to debug - Creates reusable components - Functions can be grouped in a library for easy reuse across multiple programs
119
What is the pseudocode for a procedure?
procedure Game(Value1, Value 2) Statements... endprocedure
120
What is the pseudocode for a function?
function Game(Value1, Value2) Statements return Value3 endfunction
121
What is the difference between a DIV operator and a / operator?
- The / operator will return a float value (e.g. 7/2 = 3.5) - The DIV operator will return a whole number (e.g 7 // 2 = 3)
122
What are the 3 ways that 'not equal to' could be represented?
!= <> ~=
123
What is string manipulation?
- The act of manipulating, extracting or changing the characters in a string variable
124
How can you get the length of a string?
- By using the .length function
125
How can you separate characters within a string?
By using the substring function
126
Consider the line text = 'water' print(text.substring(1,2)) What will the output be?
at
127
How do you change a string from lower case to upper case?
print(variablename.upper())
128
How do you converts a string from upper case to lower case?
print(variablename.lower())
129
How do you check if a string is upper case/lower case?
print(variable.isupper()) print(variable.islower())
130
How do you return an ASCII value for a character?
ascii = ord('character')
131
How do you return a character from an ASCII value?
char = chr(charactervalue)
132
What is the process of writing data to a file?
- Open the file for creating/overwriting or appending - Write the data to a file - Close the file
133
What is the process of reading/searching data from a file?
- Open the file for reading data - Assign a Boolean variable to false to indicate the end of file is not reached. - While the end of file is false and the search item is not found - Read the data from the file - If the data matches what is being searched for, assign the data to variables or output - Check if the end of file has been reached and assign the Boolean variable to true - Close the file
134
What is data dependency?
- When the program requires the items from the text file to be in a specific order
135
How do you open a file?
f = open('filename.txt', 'r') r stands for what e want to do with the file (e.g. r = read)
136
How do you read a line from a text file?
variablename = f.readLine().strip()
137
How do you close a file?
f.close()
138
How do you write to a text file?
f.write(variablename)
139
What is the LMC mnemonic for the instruction add?
ADD
140
What is the LMC mnemonic for the instruction subtract
SUB
141
What is the LMC mnemonic for the instruction store?
STA
142
What is the LMC mnemonic for the instruction load?
LDA
143
What is the LMC mnemonic for the instruction branch always?
BRA
144
What is the LMC mnemonic for the instruction branch if zero?
BRZ
145
What is the LMC mnemonic for the instruction branch if positive?
BRP
146
What is the LMC mnemonic for the instruction input?
INP
147
What is the LMC mnemonic for the instruction output?
OUT
148
What is the LMC mnemonic for the instruction halt?
HLT
149
What is the LMC mnemonic for the instruction data location?
DAT