Software applications Flashcards
What is the purpose of the operating system
Provides an interface between the user/ software and the hardware
Why would it be bad for a computer system to not have an OS
Without an OS, the computer would have less flexibility to run a variety of applications as each piece of software would have to be designed for the specific hardware it was run on
What is a user interface
The means by which a user of the computer interacts with the computer and receive the information that is processed
How the OS provide security
Ensures that resources are protected from unauthorised access through the use of permissions and passwords
Describe paging
During paging, logical address space is physically divided into units called pages, which are fixed size and can be stored non-contigously
Describe segmentation
Memory is split using Logical divisions which can be different sizes and can be stored non-contigously
Give 2 difference between paging and segmentation
Fixed size vs Different sizes
Pages made to fit sections of memory, segments are complete sections of programs
Physical divisions vs logical divisions
What is virtual memory
Where the OS swaps parts of the process that are not in use from main memory into allocated space on the hard disk and bring it back when needed
Give 1 pro and con of using virtual memory
Pro: Increases the potential memory storage capacity available
Con: Accessing data from virtual memory is slow and negatively effects performance
Describe multitasking
Where an OS allocates processing time to different tasks and switches between them giving the illusion that multiple things are occurring at once
What is an interrupt
A signal that is sent to the processor to request immediate attention
Give 2 reasons why a processor might be interrupted
Any 2:
Hardware device signaled it has data to process
Hardware device has completed a task
Software process needs OS to perform a function
An allocated amount of time has expired and an action needs to be performed
Hardware failure needs addressing
Describe the steps of an ISR
- Processor checks the interrupt queue to see of there is a high priority interrupt
- If there is, the processor moves the current contents of the registers into a stack
- The processor then loads the appropriate ISR into the RAM and sets a flag to show the ISR has begun
- The processor services the interrupt then checks if there is another.
- If not the flag is removed and the stack loaded back
If the current process is higher priority than an interrupt what happens
The interrupt must wait in a queue for the process before the ISR occurs
Describe round Robin scheduling
Processor time is split into equal time slices. If a process isn’t completed within a time slice is suspended and will only continue at its next time slice
Describe first come first served scheduling
The first process has as much processing time it needs to finish. Other processes must wait their turn.
Like a queue at the shop
Give 1 Pro and con of round Robin scheduling
Pro: ensures that every task is allocated processor time without waiting to long
Con: Does not scale well, as the more processes run the less time slices each has
Give one pro and con of first come first serve
Pro: Once a job starts it is guaranteed to be completed, no starvation
Con: Long queues may cause long waits for some processes
What is starvation
When a process cannot complete its execution because it has been constantly denied processor time
Describe shortest job first scheduling
The process than needs the shortest time to complete goes first
Give 1 Pro and con of shortest job first
Pro: shortest processes removed quickly which saves time for longer jobs
Cons: Longer jobs may face starvation is shorter jobs keep getting added
Describe shortest time first scheduling
The process with the shortest time to completion goes first until a different task is added with a shorter time to completion, which takes priority
Give 1 Pro and con of shortest time first
Pro: shortest time processes completed quickly so more time for longer processes
Cons: Longer processes face starvation if shorter time processes keep getting added
Give 1 Pro and con of shortest time first
Pro: shortest time processes completed quickly so more time for longer processes
Cons: Longer processes face starvation if shorter time processes keep getting added
Describe Multi-level feedback queue scheduling
Queues of tasks have different priorities, where processes are chosen based on the priority their queue and how much processing time it has already had
What is the advantage of multi level feedback queues
All tasks are given processor time, but more important jobs are dealt with sooner. No signal high priority task dominates the processor time
What does distributed OS do
Coordinates the communication between separate systems and essentially makes each node component parts that are joined together as a whole
When are distributed OSs useful
When processor intensive tasks need to be completed and a single processor cannot provide enough computational power on its own so needs multiple nodes to help
What does an embedded OS do
Provides a reliable platform for specific applications to carry out their processes at the cost of the flexibility of the system
When would an embedded OS be used
Used for systems that only serve specific purposes such as a washing machine
When would an embedded OS be used
Used for systems that only serve specific purposes such as a washing machine
What does an multitasking OS do
Manages the computers resources to provide the illusion that it can seamlessly switch between tasks, by quickly switching between them
When would a multitasking OS be useful
For systems that run multiple things simultaneously, like a laptop with multiple apps open
What does a multi user OS do
Provides the facilities for multiple users to access the same system by controlling the resources that users can access without affecting other users
When would a multi user OS be used
A place where multiple users may use the same computers but have different log in details, like a school
What does a real time OS do
Supports applications that need to process data to produce particular outputs as fast as possible by ensuring a consistent response to inputs within a given time
Not very flexible
When might a real time OS be used
Self-driving cars which needs fast response time to react to inputs so it can avoid danger quickly
What does the BIOS do
Initializes and tests the hardware in a computer system so that it is ready from use
Uses the POST
What does POST stand for
Power on self test
What does the bootstrap do
Starts the initialization of the OS
What does the POST do
Ensures that all hardware are correctly connected and functional
What is a device driver
A program that controls the operation of a specific device (keyboard, mouse etc) that is part of the computer system
What do device drivers do
Provide an interface that allows the OS and other software to interact with the device, without having to deal with the particular hardware implementation of the device
What is a virtual machine
Where a host system runs software that allows other software to behave as if it were running on a hardware system
Explain 1 potential use of a virtual machine
Supporting incompatible software:
Older software may not be able to run on newer systems so a VM can emulate an older system so the older software can run
Give two examples of general purpose software
Presentation software
Word processor
What is special purpose software
Software that is only used for a specific task
Give an example of special purpose software
Scientific calculator
What is bespoke software
Software that is developed to meet the user’s specific requirements
Give 3 examples of utility software
3 from:
Compression
Defragmentation
Antivirus
Automatic updating
Backups
What is the purpose of utility software
Utility software is used maintain the OS, ensuring it to be consistent and high performing
What is closed source software
Where the source code is not freely available and users who gain access to use the code cannot make changes to the source code itself
When an end user purchases closed source software what are they actually buying
A license to use the software
What is open source code
Where the source code is freely available to download, where users can contribute to improving it
Give one pro and con of closed source software
Pro: Development for user requirements
Con: Usually not free
Give one pro and con of open source code
Pro: Usually free
Con: Quality varies, may contain bugs or be outdated
What is a translator
A program that converts high level language into low level object code which can be executed by the computer
How does a compiler work
After carrying out a number of checks, it translates high level code into machine code all at once
How does a compiler work
After carrying out a number of checks, it translates high level code into machine code all at once
Give 1 drawback of using a compiler
The compilation process is long compared to other translators and if changes are made the whole program must be recompiled again
Give one benefit of using a compiler
One the program is compiled the code can be run on different devices without the translator, assuming the code is compatible with the new processor and OS
How does an interpreter work
Translates code line by line and stop if an error is found
Give one drawback of an interpreter
The code must be translated every time it is executed
Give one benefit of interpreters
Good for testing code and pinpointing errors as time isn’t wasted compiling the whole program
What does an assembler do
Translates assembly code into machine code
What are the stages of compilation in order
Lexical analysis
Syntax analysis
Code generation
Code optimisation
What happens during lexical analysis
- All white space is removed
- Creates tokens out of keywords and operators (lexemes)
- All comments are ignored
- Tokens are assembled into a symbol table
What is a token
A string that the computer recognises , e.g. the number 8 may be assigned a token ‘number.8’
What happens during syntax analysis
- Tokenised code is compared to the rules of the programming language
- If a section is found to not fit these rules an error occurs stat what and where the error I
- The user will get a full error report on all the errors that occurred
What happens during code generation
Machine code is generated, which is what the CPU will work with to run the program
What happens during optimisation
Machine code is optimised for efficiency, by removing procedures and variables that are written into the code but never used
What is a library
Pre-written, compiled, tested and checked pieces of code that developers can rely on to help shorten code
Give 1 Pro and con of libraries
Pro: Give developers shortcuts to achieve what they want without having to repeat code
Con: May not contain a function the developer requires
What does a linker do
Links software responsible for linking libraries to code that uses them
What is a loader
A type of program that loads the program you’re trying to run