Software and software development Flashcards
What is meant by the term ‘operating system’?
A collection of programs that work together to provide an interface between the computer and the user
Give examples of mobile phone operating systems
Android
iOS
Give examples of desktop operating systems
Windows
MacOS
Name the features that an operating system can provide for a computer system
- File management (moving, editing, deleting files and folders, sorting files into directories)
- Memory management (paging, segmentation, virtual memory)
- Resource management (schedulling)
- User Interface
- Security (firewalls
- Interrupt management
- Utility software (disk defragmentation, antivirus, backup…)
- Input/Output management (using device drivers)
What is meant by paging?
MEMORY MANAGEMENT OS
Memory is split into equally sized sections known as pages
-Programs are made up of a certain number of pages
-These pages can be swapped between main memory and the hard disk as they are needed
Explain memory management by the OS
Computer memory has to be shared fairly between the multiple programs and applications being used
-Often MM is not large enough
-So one of the roles of the OS is to make sure that main memory is shared efficiently through paging, segmentation and virtual memory
What is meant by segmentation?
MEMORY MANAGEMENT OS
Splitting up of memory into variable sized divisions known as segments (which vary in size)
-Segments are representative of structure and logical flow of program as each is allocated to blocks of code (eg. conditional statements or loops)
Segmentation is the process of splitting up memory into equally sized divisions called segments?
TRUE OR FALSE
FALSE
They dont necessarily have to be equal they are ‘logically sized’, which means that they are split depending on the logical structure of the program as each segment is allocated to a section of code
What is meant by virtual memory?
Refers to a memory management technique used by OSs to extend the apparent amount of available memory by using both the computer’s RAM (main memory) and a portion of secondary storage (such as a hard disk or SSD).
VM uses a section of the hard drive to act as RAM when there isnt enough space in MM.
So:
Sections of programs not being used currently are temporarily moved to VM through paging which frees up memory in RAM
Give a disadvantage of paging
Disk thrashing
When the disk freezes as a result of pages being swapped too frequently between main memory and the hard disk
-So more time is spent swapping rather than actually running the program
-This gets worst as virtual memory is filled up as:
In general the system has to swap pages in and out more frequently
VM must continually decide which pages to swap out to make space for others, this adds to overhead
Disk operations are slower than RAM operation
What is meant by RAM?
RANDOM ACCESS MEMORY
Type of computer memory that is used to temporarily store data that is being actively used or processed by the computer
-Volatile memory = it loses its contents when power is turned off
MAIN MEMORY
Split into 2 parts:
RAM= Random Access Memory
ROM = Read only Memory
What is meant by volatile memory?
Requires power in order to retain its contents
What is meant by the term ‘Random Access’ in RAM?
Data in RAM can be accessed in any order without the need to go through other data sequentially.
MEANS THAT it doesn’t need to start from the beginning and go through all previous data to reach a particular piece of data
-Allows for quick and efficient information retrieval
What is meant by the term interrupts?
Signals generated by software or hardware indicating to the processor that a process needs attention
What is taken into account before servicing interrupts?
Their priority / how urgent they are
Interrupts are ordered in a priority queue in a special register known as an interrupt register
Explain the role of the OS in Interrupts
The job of the OS is to ensure that interrupts are serviced fairly (taking into account their priority) by the processor through the Interrupt service routine (ISR)
Explain the Interrupt service routine
1.Processor checks contents of interrupt register at the end of each FDE cycle
- If interrupt exists of higher priority than the process being executed, current contents of the Special purpose registers in the CPU are temporarily transfered into a stack
3.Processor responds to interrupt by loading appropriate Interrupt Service Routine (ISR) into RAM
- A flag is set to signal the ISR has begun
- One ISR is serviced flag is reset, interrupt queue is checked again for interrupts of higher priority than one being executed.
- No more/ lower priority interrupts then contents of stack are placed back into Special PRs and the FDE cycle is resumed
What is disk thrashing?
The excessive swapping of pages between RAM (main memory) and hard disk (secondary storage)
Schedulling algorithms can be:….
Preempt = interrupt
Pre-emptive: If a new job arrives with a shorter remaining time than the currently running job, the CPU will preempt (interrupt) the current process and switch to the new, shorter task.
Non pre-emptive: Once a job starts executing, it cannot be interrupted by other processes. The CPU remains committed to that process until it completes.
What is meant by schedulling?
One of the roles of the OS is to ensure that all sections of program being run (jobs) receive a fair amount of processing time
-This is done by implementing schedulling algorithms (which can be preemtive or non preemptive)
Give examples of pre-emptive schedulling algorithms
-Round Robin
-Shortest Remaining Time
-Multilevel Feedback Queues
Give examples of non pre-emptive schedulling algorithms
-First come first served
-Shortest Job first
Give disadvantages of Round Robin
-Doesnt take into account job priority
-Longer jobs will take much longer to complete as their execution is inefficiently split into multiple cycles