1.2.1 System Software Development Flashcards
What does System Software allow control over
- The hardware and the software of the computer essential for even basic tasks.
What are the 2 most common types of systems software
- The Operating System
- The Start-up software
What is Application Software
- Is software that allows a user to carry out a specific task.
- For example Microsoft Outlook allows a user to send an e-mail
What is the OS responsible for
- Memory Management of computer resources (paging,segementation,virtual memory)
- Resource Management (scheduling)
- File Management (moving,editing,deleting files)
- Input/Output management (device drivers)
- Interrupt Management
- Utility Software (disk defragmenter, backup)
- Security (firewall)
- User interface
What part of the OS is responsible for process managemnt, hardware management and other key low level tasks known as
Kernel
What are the key modules of the OS
- Memory Manager - responsible for splitting RAM into chunks called segments and assigning them to different processes based on need. Also responsible for handling virtual memory
- Process Manager - Responsible for managing processes, dealing with multitasking and deciding the order in which processes run
- File Manager - Responsible for managing the file systems of secondary storage devices
What are the key design goals for the Memory Manager
- Allocate enough memory so that each process can run
- Split memory up so it can be allocated for processing (paging,segmentation)
- Ensure security so that other processes cant access each other’s data
- Allow efficient sharing of memory
- Extend memory by using virtual memory
What must the Memory Manager ensure and why is it a difficult process
- That RAM doesn’t get overloaded
- It is a difficult task
- Processes start and stop at different times and have different memory demands, keeping track of what memory is free becomes a challenge
- Security is also an issue - If processes could inspect or change each other’s memory- easily manipulate what you see on screen
What is Memory Addressing
- How the individual byte of data can be found in RAM
- Instructions and data are stored in the same memory space
- Each byte in memory is numbered starting 0 - referred to as an address
What is paging
- When the memory manager uses paging it allocates fixed-size blocks of memory to processes. - Blocks = Pages
- Each memory access is made of 2 parts: page number and offset.
- Unactive pages are sent to virtual memory
What is Segmentation
- Segmentation is an alternative method of allocating memory to processes where segments are variable sized rather than fixed
- logically split RAM in exact size.
- In order to allow variable-sized segments, the memory manager must store the length of each segment in the segmentation table
How does a Paging Table work
- All processes have access to a virtual memory space and arent aware of their location in physical memory
- It is the job of the memory management unit to translate between physical addresses of pages in RAM and logical addresses of pages in virtual memory
- The page table will translate the virtual page number to the physical page frame held in memory
What is an advantage of Segmentation
- Memory can be shared between processes, especially when combined with library software
- If a block of code is needed by 2 processes, it can be loaded into a segment
- When a process needs to access code from that segment all it needs to do is supply the segment ID and the offset
What is Virtual Memory
- When the memory manager sees that some pages haven’t been used recently
- It can move these to VM
- Simply pages identified will be placed into a special file on the hard drive (page file)
- Memory Manager keeps note of which pages are in Virtual Memory and the page numbers where the page has relocated
Why use Virtual Memory and how to reduce the use and what can happen when pages are constantly swapped?
- Commonly used to extend memory and allow programs to run, even though there isnt enough memory physically available.
- Can update the OS or get more RAM
- Until page is loaded into RAM - it is blocked (suspended).
- Poor choices - lots of pages are continually swapped (unresponsive processes) = thrashing.
How do you implement virtual memory
- Page entries in the page table hold a flag that specifies whether that page is located in RAM or saved in a page table
- When a page located in the page file is accessed, the memory unit will raise a page fault to the OS
- The OS must load that page into RAM to update the page table
- There is no guarantee where in RAM the OS can place the page so it must update page table and the frame number into which the page has been loaded
What are the similarities between paging and segmentation
- Both allow programs to run despite insufficient memory
- Pages and segments are stored on disk
- Pages and Segments are transferred into memory when needed
What are the differences between Paging and Segmentation
- Pages are fixed sizes, Segments are different sizes
- Pages are made to fit sections of memory, segments are complete sections of programs
- Pages are physical divisions. Segments are logical divisions
Why is a GPU more sutiable than a CPU for 3D graphics
- GPUs are specifically designed for graphics whilst CPU are general purpose processors
- Therfore they are likey to have built in instructions for common graphics operations
- GPUs can perform an instruction on multiple pieces of data at 1 time
Exam Question: What are Interrupts?
A signal to the processor indicating a device/process needs attention
List some common interrupts
- Hardware :
- Power/reset button is pressed
- Hard drive has retrieved requested data
- Software
- Arithmetic overflow
- New log-on request
- Signal the completion of a data transfer to/from device
How are interrupts recorded
- An interrupt occurs when a signal is sent through the control bus
- A special register known as an Interrupt Register is then updated by flipping a bit to 1
- Each bit in the Interrupt Register represents a different interrupt and is referred to as a flag
- If more than 1 of the same interrupt is sent, the subsequent are ignored
- Each interrupt is assigned a priority depending how critical they are to the system
Exam Question: Describe what happens in the CPU when it receives an interrupt
- If the interrupt is of a lower/equal priority to the current process then the current process continues.
- If it is of a higher priority the CPU finishes its current Fetch-Decode–Execute cycle.
- The contents of the CPU’s registers are copied to a stack
- in memory.
- The location of the appropriate interrupt service routine is loaded into the program counter.
- When the ISR is complete, the previous contents are popped from the stack and loaded back into the registers.
What is a buffer and what happens if the buffer overflows
- Is a small block of memory inside hardware devices such as printers, keyboards and hard drives where work currently being handled by that device is stored
- More keys have been pressed and buffer overflows : motherboard beeps to user
Interrupts and Buffer Example
Hard drives contain a buffer - CPU sent data to be saved without waiting - increases system performance CPU can do other tasks
- A chunk of data is sent by the CPU to a HDD and stored in a buffer
- The HDD will slowly save the data whilst the CPU is free to complete other tasks
- When the buffer is empty, the HDD will sent an interrupt to the CPU.
- At the start of the next FDE cycle the interrupt is processed by informing the OS
- More data is sent to the device and the cycle repeats
What is ISR
- Set of instructions that need to be done as part of an interrupt (Interrupt Service Routine)
- When an interrupt comes the CPU will put its contents into a stack and carry out the ISR and load contents back into CPU
What is multi-tasking
- Is the process of swapping applications in and out of the CPU, giving the illusion that they are running in parallel
- Most modern OSs have the ability to run more than 1 program at once
- The OS ensures that each process is swapped in and out of the CPU efficiently.
What is Scheduling
- The term the OS uses to define how and when a process is swapped in and out of CPU (enabling multitasking)
- A process is a piece of software that is currently being managed by the scheduler inside the OS