1.2.1 Flashcards
OS
operating system
the need for an OS
allows the user to interact with hardware using a user interface
the function of an OS
Device driver
User
Application software
Memory/resource management
User interface
Hardware
Utility programs
File management
Interrupt handling
Multitasking
When you have more than one program open and running at the same time.
rge processor flits between them all so quickly it seems like it is happening at the same time
file management
allows you to: copy, delete, move files
user management
Allows multiple users to log into the same computer
each user can have different access levels
memory management
moving the location of a program in memory so the free space is together.
it is not desirable in practice.
takes a lot of time to move a program in memory or on disk, as addresses and free space references all need updating
paging
Pages are fixed size physical divisions.
Programs are split up to fit into a given number of pages.
Paging takes no account of how it splits the program, only that it splits it into fixed-sized pages.
It could separate the instructions inside a looping condition so they are in different pages, (isn’t efficient).
segmentation
Segments are different sized logical divisions.
Based on logical divisions, segmentation splits the program into multiple parts and places them in the available free space, leaving smaller areas of free space.
virtual memory
when there are too many open files and the computer can not keep all of them open at once because there is not enough space in RAM.
The least recently used file is put into secondary storage temporarily. If the user keeps trying to use all the files then they will have to keep swapping from the current memory to secondary storage which may cause disc thrashing.
interupts
when a program or other device needs immediate attention and needs to signal to the processor
(Interrupts always have a higher priority than normal programs)
the role of interupts and ISRs
interrupt service routine is simply a program with a set of instructions that need to be FDEed to carry out the operations of the interrupt
the contents of the program counter need to be changed to point to the address for the first instruction of the interrupt
the values held in the registers are copied into a data structure in memory known as the stack
interupts and ISRs within the FDE cycle
Fetch
Decode
Execute
Check for new interrupts
round robin sheduling
ecah process is allocated a fixed amount of run time (time slice)
executes a FCFS but if the process is not finished in the time slice it is moved to the back of the queue
first come first serve sheduling
the processes are executed in the order they arrive
multi-level feedback queues sheduling
Several ready queues are used, each with a different scheduling algorithm.
Jobs can move between queues as their priorities change.
only if a computer system has more than one processor or processor core
shortest job first sheduling
needs to know how long each process takes (orders the current list)
the shortest run time is executed first
shortest remaining time sheduling
similar to SJF but its pre-emptive
if a new item is added that is shorter it will be moved to the front of the queue
distributed OSs
the operating system controls and coordinates many computers, presenting them to the user like a single system
embedded OSs
tend to run on dedicated hardware so they run with maximum efficiency, using low-powered processors and very little memory.
multi-tasking OSs
multiple process seemingly taking place at the same time
multi-user OSs
multiple users using a system
real time OSs
processes have to execute within a known time frame
lots of redundancy is built into these systems so they can handle sudden increases in input
(rarely run at ful capacity)
redundancy - backup components/systems to ensure uninteruptted running
BIOS
Basic Input Output System
responsible for loading the operating system when the computer first turns on
bootstrap
A boot loader program is used to load the operating system kernel into memory
device drivers
Software that tells the operating system how to communicate with a device
virtual machines
trick a program into thinking it’s running on its native hardware when, in fact, it’s running on an entirely different machine
virtual machines - executing immediate code
java code is an example of intermediate code running on a virtual machine (designed to run on many different platforms)
it compilies its code into a half-way code known as bytecode or intermediate code
the code is translated by a Java Virtual Machine running on a target device, which then translates it into specific machine code
virtual machines - running an OS within another
you can run nearly any OS of your choosing in a virtual machine