1.2 Software and Software Development Flashcards
How is the operating system loaded to RAM
The boot loader in ROM loads the Operating System into RAM
What does the operating system do?
communicates between the hardware and (the user and the software)
Provides an interface for the users
What are the functions of the operating system
User interface
Memory management
Interrupt handling
Processor scheduling
What is the purpose of the user interface
Gives user an intuitive way of interacting with computer that more people can understand
What is the purpose of memory management
Allows for the managing of the space in RAM so that all desired programs can be loaded to RAM at once
How does paging work?
Available memory is divided into fixed chunks called pages, each with an address. When a process is loaded into RAM is allocated sufficient pages that are necessarily contiguous
How does segmentation work?
Available memory is divided into chunks of variable length called segments. Segments often relate to part of a program, e.g. a function is stored in one segment
What is virtual memory?
The process of allocating space on the hard drive to hold some of the pages of a current process until they are needed to free up space in memory
What is disk thrashing?
Slow down of a computer caused by very frequent transfers of pages between RAM and virtual memory.
What are interrupts
Temporary halts in the fetch - execute cycle to deal with a problem that has appeared to do with the running of the computer.
What is the need for interrupts
To deal with problems or things that need attention that have arisen in the computer
What are some examples of interrupts
An I/O device sends an interrupt signal
The printer runs out of paper
An error occurs in a program
A scheduled interrupt from the internal clock
Power failure
When does the CPU acknowledge an interrupt?
At the end of each fetch-execute cycle
What happens when an interrupt is acknowledged
Control is handed over to the ISR (Interrupt Service Routine)
What happens when control is handed to the ISR
Current process is pushed to stack.
What is interrupt priority
The ability of one interrupt to interrupt another if it is more important
What happens when a higher order interrupt is received by the ISR
Current interrupt is pushed to stack
What is processor scheduling?
The process of the CPU scheduling how much processor time is dedicated to different task
What is the purpose of processor scheduling
To provide an acceptable response time to all users
To maximise the time the CPU is usefully engaged
To ensure fairness on a multi-user system
How does Round Robin scheduling work
Run each process for its time slice, After each time slice, move the running process to the back of the queue
How does first come first served scheduling work
The first job to arrive is executed until it completes
How does shortest remaining time scheduling work
The time to completion is estimated as each new
job arrives
The job with the shortest remaining time to completion is executed, meaning that a shorter new job can take over from the current process
How does shortest job first scheduling work
As with shortest remaining time, the total execution time of each job is estimated by the user
The waiting job with the smallest total execution time is executed when the current job completes
How does multi level feedback queues scheduling work
Multiple queues are created with different
priority levels
If a job uses too much CPU time it is moved to a lower priority queue
Processes can also be moved to a higher priority queue if they have waited a long time