1.2 Software and software development Flashcards
What is an operating system?
a collection of programs that provide an interface between the user and the computer
What are some features of OS/operating systems? (5)
-memory management
-file management
-security/authentication
-utility software
-user management/interface
What are the forms of memory management used by the OS? (3) Why are these used instead of RAM?
-paging
-segmentation
-virtual memory
when RAM isn’t large enough to store all the programs being used, these are techniques to ensure that requests/programs are still handled
What is paging?
-form of memory management used by the OS
-memory split into equal sizes
-physical divisions of memory
-pages are swapped between main memory and the hard disk as needed
What is segmentation?
-form of memory management used by the OS
-memory split into logical sized divisions (segments)
-unequal sizes
-segments represent the structure and logical flow of the program
What is virtual memory?
-form of memory management used by the OS
-section of the hard drive acts as RAM when space to store programs is low
-sections of programs not currently being used are temporarily moved into virtual memory through paging
What is an issue when using the memory management techniques?
disk thrashing
-the computer ‘freezes’ due to pages being swapped too frequently between the hard disk and main memory
What are interrupts?
signals generated by software or hardware to indicate to the processor that a process needs attention
What is needed to be considered when allocating processor time to interrupts?
the level of priority it has
How are interrupts stored?
stored within a priority queue in an interrupt register
How can we check for interrupts and service them?
through the interrupt service routine (ISR)
What does the ISR do to check for interrupts?
checks the interrupt register at the end of each FDE cycle
What does the ISR do if an interrupt exists?
if there is an interrupt which exists with a higher priority to the current process:
-current contents of the registers in the CPU are transferred to a stack
-a relevant ISR is loaded into RAM
-a flag is sent to signal the ISR has begun
-the flag is reset once the ISR has finished
-process is repeated
What happens after the ISR has serviced an interrupt?
-f there are no interrupts with a higher priority to the current process:
-contents of the stack are popped back into the registers
-FDE cycle resumes
What is scheduling?
allocating processing time to sections of programs being run (jobs)
What do we mean if something is pre-emptive?
jobs are actively made to start and stop by the OS
What do we mean if something is non pre-emptive?
once a job has been started, it is left alone until completed
What are the types of scheduling algorithms? (5) List if they are pre-emptive or not
Pre-emptive:
round robin
shortest remaining time (SRT)
multilevel feedback queues (MLFQ)
Non pre-emptive
first come first serve (FCFS)
shortest job first (SJF)
What is round robin?
scheduling algorithm
-each job given a section of processor time (time slice) where it runs
-once the job has used its first time slice, they are given another slice of processor time until the job is completed
-once completed, the job is removed from the queue
What are +/- of round robin?
+all jobs will eventually be attended to
-longer jobs will take a much longer time for completion
-doesn’t take into account priorities/urgencies of jobs
What is FCFS?
scheduling algorithm (first come first served)
-jobs are processed in chronological order by which they entered the queue
What are some +/- of FCFS?
+straightforward to implement
-doesn’t take into account priorities/urgencies of jobs
What is MLFQ?
scheduling algorithm (multilevel feedback queues)
-makes use of multiple queues, ordered based on priorities
What are +/- of MLFQ?
+takes into consideration of different job priorities
-difficult to implement