Software and Software development 1.2 Flashcards
What is an operating system?
A collection of programs that provide an interface between the user and computer
Operating systems enable the user to communicate with the computer and perform tasks involving the management of computer memory and resources.
Give three functions of an operating system
- Memory management
- Security
- Resource management
- User interface
- Utility software
What are the similarities and differences between paging and segmentation
Both are used when RAM space is insufficient
Paging uses equal-sized sections called pages
Segmentation uses variable-sized logical sections called segments
What are the stages of compilation?
- Lexical analysis
- Syntax analysis
- Code generation
- Optimisation
What happens during lexical analysis?
- Whitespaces and comments are removed from the code
- The code is scanned for keywords, these are replaced with tokens and information about the token
Each keyword is stored in a symbol table
What happens during synax analysis
Tokens are analysed against the rules of the language, and if they break the rules they are flagged as a syntax error
What happens during code optimistaion?
The abstract syntax tree produced in the syntax analysis stage is used to produce
machine code
What happens during code optimisation?
Insigificant, redundant parts of the code are removed. the aim of it is to make the code faster to exceute, however this can increase compilation time.
Describe how virtual memory is used when there is not enough RAM
A section of the hard drive is used to act as RAM
Sections of programs not currently being used are temporarily moved into virtual memory through paging
This frees up memory for other programs in RAM
What is an Interrupt?
An interrupt is a signal that is sent to the processor to request attention
Explain the stages of the interrupt service routine ISR
- Interrupt register checked at the end of each F-D-E cycle
- If there is an interrupt with a higher priority the current contents of the register in the CPU are transferred into a stack.
- The relevant ISR is loaded into RAM
- A flag is set to signal the ISR has begun
- Flag is reset when ISR has finished
- The F-D-E cycle renews as before
Give three advantages of using libraries
- Error-free
- Saves time
- Reusable
- Designed by experts
What is a dynamic linker?
This is when the addresses of the libraries are added to the file
What is a static linker?
This is when the library code is copied directly into the file
What is the function of the loader?
The loader is responsible for loading the machine code into memory
What is round-robin scheduling?
Each task is given a small time slice of the processor’s time
-once the time is finished it stops running and goes to the next task
what is a multi-level feedback Queue?
A multi-level feedback queue deal with the most important job first
State a disadvantage of a multi-level feedback queue
Hard to implement
Define a real-time operating system (RTOS) and when it may be used
A RTOS performs a task within a given time frame.
They are used where a response within a given time frame is critical.
e.g self-driving cars, life support systems
Describe 2 functions of the BIOS
- POST (Power-on self-test) which ensures that all the hardware is functioning
- Checking the CPU clock, memory and processor