1.2.1 Software and software development Flashcards
What is an operating system?
An operating system is a program or set of programs that manages the operations of the computer for the user.
Why do we need an operating system?
To act as a bridge between the user and the computer’s hardware, since a user cannot communicate with hardware directly.
Give three functions of an operating system?
Memory management
Resource management
Interrupt management
Security
User interface
Utility software
What 3 process does memory management entail?
Tracking the status of memory allocation
Determining storage requirements
Controlling memory usage
How does the OS Track the status of memory allocation?
Memory is divided up into physical address spaces
The OS initially marks each space as free
When required, the OS loads data into these spaces and marks them as allocated
When the data or instructions are no longer needed, the OS marks the spaces as free again, which allows the data that is stored in these spaces to be overwritten
How does the OS determine storage requirements?
The OS reserves blocks of addresses for each process to use
How does the OS control memory usage?
The OS manages swapping between processes and their memory space in order to provide memory access as required.
Name 2 methods of partitioning memory?
Paging
Segmentation
Name 3 features unique to paging?
Pages are fixed size.
Pages are stored discontinuously.
Pages are physical divisions.
Name 3 features unique to segmentation?
Segments are variable sizes.
Segments are stored contiguously.
Segments are logical divisions.
What are 2 similarities between paging and segmentation?
Both allow programs to be stored non-contiguously
Both use virtual memory
How does a multi-level feedback queue work?
Initially, processes are added to a queue with a certain level of priority.
If a process uses too much CPU time, it is moved to a lower priority queue and if a process has been idle for a long time, it is moved to a higher priority queue. This helps avoid starvation.
Processes that depend on input/output devices require a lot of processing time, so they are kept in high priority queues, and processes that are quick to complete are served first.
How is virtual memory 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/segmentation
This frees up memory for other programs in RAM
What is an interrupt?
An interrupt is a signal from a software program, hardware device or internal clock to the CPU.
In-between what steps in the FDE cycle does the interrupt occur?
Execute & Fetch