1.2.1 Flashcards
need for operating system
OS provides an interface between the user and hardware and is responsible for managing computer resources including input/output/storage devices, memory management and all other software’s running on the computer system. When computer boots up, main part of OS is loaded onto RAM which is responsible for process and hardware management and other low-level tasks(kernel). Once loaded, user interface is loaded alongside key utility software.
similarities between paging and segmentation
- divide up memory
- Both use indexes
- assigned to memory when needed
- allow programs to run without sufficient memory (virtual memory)
virtual memory
when main memory sees pages haven’t been used frequently, it must move these pages to vm to allow new programs.
used to extend memory so more programs can run even when there isn’t enough physical memory.
advantages and disadvantages of virtual memory
ADV: can run more than one programs at once, run larger programs with less real RAM.
DIS: applications run slower and it takes more time to switch, if more time spent switching pages from memory to disk (thrashing) than processing instructions = slower.
softwares
User doesn’t interact directly with hardware but uses application software (word/spreadsheet). OS provides platform for AS to run, usually involves a common user interface so the user can interact with the hardware in a friendly and familiar way. OS will also provide its own user interface along AS.
There are a number of these, and some are built into OS to help maintain the computer (compression/encryption software.)
Responsible for splitting RAM into chunks and locating them to different processes depending on their needs. Also responsible for handling virtual memory.
Responsible for managing processes, dealing with multitasking and deciding what order processes should go in.
Responsible for management the file system of secondary storage devices, OS had to decide where to store devices and where they’ll be loaded from again.
scheduling
Pre-emptive: When jobs are actively made to start and stop by the os
RR: when each job gets a fixed time slice.
- ADV: each jobs gets equal amounts of the CPU, its cyclic in nature so no starvation. DIS: if quantum is set too short, increases overhead and decreases efficiency.
- DIS: Setting the quantum too short, increases the overhead and lowers the CPU efficiency, but setting it too long may cause poor response to short processes.
STR: when jobs quickest to complete are done first but when a new job comes it stops and revaluates
- ADV: makes the processing of the jobs faster than SJN algorithm, given its overhead charges are not counted.
- DIS: swapping context is done more often taking up CPUs valuable processing time, increases process time making it slower.
MLFQ: when jobs are put in different queues depending on their importance.
- ADV: low scheduling overhead, allows aging so no starvation.
- DIS: Not flexible and more complex
Non pre-emptive: once a job has started, it’s left alone until its completed
FCFS: jobs are executed in the order they arrive in, first job that comes gets executed first
- ADV: its simple and easy to understand as well as implement.
- DIS: there could be short processes at the end of the queue so they have to wait for long processes to finish, throughput isn’t efficient.
SJF: quickest job to complete is done first.
- ADV: favours short processes and could be most optimal with the shortest amount of waiting time for each job.
- DIS: could cause starvation if short jobs keep coming.
BIOS
Basic Input Output System is the first program that runs when a computer system is switched on.
The PC register points to the location of the BIOS upon each start-up of the computer as the BIOS is responsible for running various key tests before the OS is loaded into memory.
It initialises and tests the hardware in a computer system so that it is ready for use by other software on the computer. This process is often referred to as a Power-On Self-Test (POST). The BIOS also loads the bootloader program from secondary storage, which starts the initialisation of the operating system.
BIOS tests
POST (Power-on self test) which ensures that all hardware (keyboards, disk drives) is correctly connected and functional.
Checking the CPU clock, memory and processor is operational.
Testing for external memory devices connected to the computer.
The BIOS is critical to the computer system as it is only after these checks are completed that the operating system can be loaded into RAM from the hard disk.
where is BIOS stored?
ROM contains the BIOS which is the firmware for the motherboard.
Initial start-up instructions are stored on ROM.
BIOS settings are stored in flash memory so they can be changed and are retained when the power is switched off.
Without the BIOS, nothing could be loaded, as the main memory does not contain any instructions that could start the boot process.
device driver
computer programs which are provided by the operating system and allow the operating system to interact with hardware.
- software that tells the operating system how to communicate with a device.
how are device drivers used?
When a piece of hardware is used, such as a keyboard, it’s the device driver that communicates this request to the operating system which can then produce the relevant output - which in this case is displaying a letter on the screen.
Device driver translates the OS instructions to print the document into a series of instructions that a specific piece of hardware will understand.
are device drivers specific?
Device drivers are specific to the computer’s architecture, so different drivers must be used for different device types such as smartphones, games consoles and desktop PCs.
As drivers interact with the operating system, they are also specific to the operating system installed on the device.
virtual machine
A host system might run software that allows other software to behave as if it were running on a hardware system: this is called a virtual machine.
they can be configured to replicate any combination of hardware so that the software running on it works as if it were accessing certain devices, even if they don’t exist.
how do VM work?
Rather than compiling program code into machine code that can only be run on similar platforms, some languages use virtual machines to act as an intermediary between the system and the source code.
At run-time, the original program is translated into intermediate code, which is then passed to a virtual machine.
The VM then runs this code and determines how to control the host computer so that it can carry out the relevant instructions.
advantages and disadvantages of VM