4.6 Operating System Flashcards
(9 cards)
Batch OS
A batch OS processes a collection of jobs sequentially without user interaction. It groups similaR jobs together for efficiency which reduces idle time and optimise resourse use. However with no user real time, delays may occur and interaction issues only appear after the batch is done which makes debugging challenging. Its currently used in financial transactions like payroll systems, a large scale data process.
Single User
Singler user are designed for one person at a time. Commonly found on personal computers with direct user interaction (e.g Linux, macOS). These systems are user-friendly and simple but lack support for multiple concurrent users* (cant handle multiple people accessing it)*
Multi User
Multi user are systems designed allow multiple user to access a single system simutaneously. Each user is assigned a time slice through a schedling algorithm ensuring that the system resources such as the CPU and storage and distrubted evenly across users and to prevent one user from monoplisign the system. Examples include UNIX, Windows Server. These sytems enables collabs and remote access but require more security measures.
Multi Tasking
A multi tasking OS allows a single user to perform multiple tasks simutaneosuly. The CPU rapidly switches between task to create the illusion of paraellel execution. Running too many tasks at once can lead to performance issues.
Multi Programming
The idea is that multiple programs reside (loaded into) in memory and execute in turn (programs take turns to execute) to maximise CPU usage (always keeping CPU busy!). The system swicthes between programs, executing one that is ready while others wait. Doesnt involve user interacton, early UNIX systems used this to increase efficinecy but management is complex
Allocating Processing Time
Why is the standard method bad?
The OS divides processing time between the tasks that are running. Its divided based on time of request, its importance and its length. The standard methods of allocation doesn’t work well for immediate tasks (e.g typing a key, if this processes couldtn run until the prior tasks are processed then there will be a frustrating delay). This is fixed by interrupts.
Interrupts
Interrupts are signal sent to the processer to request immediate attention. When the processor receives this interrupt, it suspends what its doing and runs the process associated with the interrupt. Not all interrupted are treated equally are are assigned different priority levels
High-Priority Interrupts (Require Immediate Attention)
- A hardware failure has occurred and needs to be addresses
- A hardware device has signalled it has critical data to process
- An emergency stop command
Lower-Priority Interrupts* (Can be Deferred Temporarily)*
- A hardware device has completed a task that it was asked to do
- A software process needs a service to be provided
- An allotted amount of time has expired and an action needs to be performed
The processors using an interrupt priority system where high priority interrupts temporarily pause the lower priority ones allowing more urgents tasks to be completed first and allow less critical to be handled when processing power is available
Interrupt Service Routine
The OS will have interrupt service routines (ISR’s) designed to process each interrupt. An ISR is a mini program that has been designed to respond to an interrupts request. (E.g if a key is pressed then the ISR will determine the key by polling the keyboard and tells the system what to do with the input)