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