![]() |
Created by Malachy Moran-Tun
over 2 years ago
|
|
![]() |
Copied by Malachy Moran-Tun
over 2 years ago
|
|
![]() |
Copied by Malachy Moran-Tun
over 2 years ago
|
|
Question | Answer |
What is an Operating System? | > (Set of) programs that manages the operations of the computer for the user > Bridge between the user and the computer's hardware (since a user cannot directly communicate with hardware) |
What Functions does an Operating System Perform? | > Bridge between the user (through a CLI or GUI) > Memory management > Interrupt service routines > Processor scheduling > Backing store management > Management of I/O > System security (e.g., administrator and root access) |
Where is the OS Stored? | > When computer is off: permanent storage, e.g., HDD, SSD > When computer is on: RAM |
What happens to the OS when the Computer is Switched On? | > Small program, called a loader, is held in ROM > The loader sends instructions to load the OS by copying it from the permanent storage into RAM |
Generally, what is Memory Management and the Two Types? | > Allocates different parts of memory to each program, open file, etc. > Each of these parts may change in size whilst being used, thus the amount of memory they take up must be managed > This is done through paging or segmentation, which split the parts into smaller sections |
What is Virtual Memory? | > Used when RAM is becoming full > Pages of inactive items in RAM are temporarily swapped to permanent storage to make room for active items > Due to the much slower speed of permanent storage, and the physical division, this can dramatically slow down the computer |
What is Paging? | > Splits RAM into small, physical sections (4Kb on 64-bit architecture) known as pages > Items in RAM are allocated a set number of pages to run in > Crucially, these items CAN be split across lots of pages that are non-contiguous (not all together) > Addresses of pages are stored in a page table > Each page is managed by a table map to keep track of which page belongs to which item |
How does Paging affect Performance? | > Performance is not affected by having non-contiguous pages for items in RAM > Unused / inactive pages can be sent to virtual memory to free up pages for other tasks > Using virtual memory can lead to disk thrashing |
What is Segmentation? | > No physical split, unlike paging > Splits RAM into a logical division of segments with varying lengths > Items in RAM are given enough memory for parts they initially load > The remaining part of the item is kept in storage until needed, but the logical division will need to be made bigger when the rest of the item is loaded |
How does Segmentation affect Performance? | > Items split across non-contiguous, logical splits severely impact performance > Segmentation can still utilise virtual memory to store unused parts of programs |
What is a Device Manager? | > Part of the OS that keeps track of which devices are connected to which ports > Allows / disallows applications to read or write to each device |
What are Device Drivers? | > Special system software that is required for use of connected devices > Tells the OS how to understand the data from the device, what format to expect the data to be in, and how to interface with said device |
Why can't Device Drivers work on different OSs? | > Each driver uses OS specific code, meaning the architecture must be exactly as intended > For example, Windows 10 64-bit drivers do not work on 32-bit Windows, or 64-bit Linux etc. |
Generally, what is an Interrupt and the Two Main Types? | > Signal from a piece of software, hardware, or internal clock to the CPU > Efficiently tells the computer that a job needs to be completed > Allows for multi-tasking to take place > Software and Hardware interrupts |
What is a Software Interrupt? | > Interrupts from a piece of software that needs to terminate or request services from the OS to continue running > For example, opening a file has to request read access |
What is a Hardware Interrupt? | > Interrupts from a piece of hardware that occurs when an I/O operation completes, or encounters an error > For example, when a printer runs out of paper, the CPU must display that error to the user, and stop any more files from being sent |
What is an Alternative to Interrupts? | > Polling > CPU polls (asks) every piece of software and hardware if anything needs doing every cycle > Very inefficient |
What is an Interrupt Service Routine (ISR)? | > Set of instructions that needs to be completed as part of the interrupt (i.e., the reason why the CPU was interrupted in the first place) > The CPU returns to the previous instructions once the ISR is completed |
How is an ISR Executed? | > Interrupt arrives at the CPU with a flag indicating its priority > The priority is checked at the end of each fetch, decode, execute cycle > If the interrupt's priority is higher than the current set of instructions, all registers are pushed to the system stack, and the ISR begins to be executed |
What is Scheduling? | > Part of the OS that allows for multitasking of complex tasks > Queues up the next process required by another application to make the most efficient use of the CPU |
What are the Scheduling Algorithms? | > Round robin > First come, first served > Multi-level feedback queues > Shortest job first > Shortest remaining time |
What is Round Robin Scheduling? | > Processes are put in a (circular) queue > Each process is given an arbitrary amount of equal CPU time to be completed in > If the job is completed in this time, the next is loaded, otherwise, it goes to the end of the queue > This is done by the OS using an interval timer to interrupt the CPU at the correct time |
What are the Pros and Cons of Round Robin Scheduling? | > Guarantees a reasonable response time to all users of the system > Simple and works if all jobs are similar in size and priority > Ignores the priority of any job > Inefficient if each job takes different amounts of time / priority |
What is First Come, First Served Scheduling? | > Jobs are added to a queue > Jobs are completed in this order, disregarded time and priority (wow, so complex) |
What are the Pros and Cons of First Come, First Served Scheduling? | > Easy to set up and manage > Can cause a long delay in getting jobs done > Disregards priority > Generates bad performance |
What is Multi-Level Feedback Queues Scheduling? | > Maintains many queues of jobs, usually grouped by priority and similarity (majority of the time, there is a separate queue for slow I/O jobs) > CPU switches between queues to complete jobs > If a job is waiting too long in a low priority queue, it is moved to a high priority one to complete the job quicker > Each queue has its own scheduler |
What are the Pros and Cons of Multi-Level Queues Scheduling? | > Prevents bottlenecks in slow jobs, e.g., I/O > Offers the best results by maximising processor use > CPU intensive |
What is Shortest Job First Scheduling? | > Selects the shortest job in the queue to complete first > It's that simple |
What are the Pros and Cons of Shortest Job First Scheduling? | > Shortest waiting time of all the schedulers > Reduces the number of small jobs waiting behind big jobs > Larger processes can face starvation and not get completed > The OS rarely knows the amount of time a job will take, thus can only estimate the time required |
What is Shortest Remaining Time Scheduling? | > Selects the job that will take the least amount of time (as you would expect) > As a job arrives, it is compared to the currently running job, then added to the queue > Shortest job is run first each time a job completes (i.e., this comparison only happens when a job arrives of when a job completes) |
What are the Pros and Cons of Shortest Time Remaining Scheduling? | > Little CPU usage > Starvation |
What is a Distributed Operating System? | > Runs across lots of individual computers, but appears as one computer to the end user > OS synchronises what each computer is doing > Each computer works towards one single task |
What is an Embedded Operating System? | > Usually found on an embedded system, i.e., a piece of hardware that serves a single purpose > Usually stored in ROM, so it cannot be changed > Accepts data from a variety of sensors to control what is happening > Limited interaction from the user |
What is a Multitasking Operating System? | > Designed to allow the user to do multiple things at one time > Windows, MacOS, Linux, Android, iOS all have multitasking, e.g., listening to music whilst browsing the Internet > System slows down as more tasks are introduced > Utilises scheduling algorithms to accomplish this |
What is a Multi-User Operating System? | > Usually found on supercomputers or mainframe computers, since they are too large and powerful to only allow one person to access it at a time (or it would be impractical) > Multiple users can login to the system via multiple terminals and work on the computer, sharing the power |
What is a Real-Time Operating System? | > Reacts to inputs in a close to real time as possible > Necessary for situations where something needs to be monitored constantly, e.g., in medicine > OS usually stored in ROM > OS accepts data from sensors and makes adjustments in real time |
What is the BIOS? | > Basic Input Output System > Contains instructions used to initialise the computer > Usually stored in ROM |
How is the BIOS used to Boot the Computer? | > Performs a Power-On Self-Test (POST), which ensures all essential components are working properly > Bootstraps the initial part of the OS in memory (i.e., the bootloader, which loads the kernel) > The computer then completes booting up |
What is a Virtual Machine? | > Software recreation of some form of computer > Includes virtualisation (e.g., running Linux on Windows), or emulation (e.g., running a SNES game, which requires additional interpreters) |
What are the Advantages and Disadvantages of Virtual Machines? | > Allows testing of features and software without the need for actual hardware > Saves money as new revisions do not have to be made > Require a lot of system resources to run > May not run as efficiently as the actual hardware |
There are no comments, be the first and leave one below:
Want to create your own Flashcards for free with GoConqr? Learn more.