System Software Flashcards
How can the operating system maximise the use of resources in primary memory?
-Moving frequently accessed instructions to cache
…for faster recall
… as SRAM is used rather than DRAM for cache.
-Making use of virtual memory
…with paging or segmentation
…to swap memory to and from disk.
-Partition memory
… dividing main memory into static partitions
… to allow more than one task to be available
-Removing unused item/tasks from RAM
… by marking a partition as available
… as soon as the process using it has terminated.
How can the operating system maximise the use of resources in the disk?
-Disk cache
… a disk cache holds data that is frequently transferred to/from the disk
… the cache can be held in disk or RAM.
-Compression utility
…decreasing the size of file stored on the disk
… in order to fit larger files on the disk
-Defragmentation utility
… files are rearranged to occupy contiguous disk space
… this reduces the time taken to access files/decreases latency.
How can the operating system maximise the use of resources in the CPU?
-Scheduling
…better utilisation of CPU time and resources.
How can the operating system maximise the use of resources in the input item system? (bastante extra)
-IO operation initiated by the computer user.
-IO operation which occurs while software is being run and resources such as printers and disk drivers are requested.
- A DMA (Direct memory access) controller is needed to allow hardware to access the main memory independently of the CPU.
-DMA initiates the data transfer
-CPU carries out other tasks while data transfer operation takes place.
-Once the data transfer is complete, an interrupt signal is sent from the DMA to CPU.
How can the OS hide the complexity of harware?
-Using graphical interface rather than command line interface.
-Using device drivers simplifies the complexity of the hardware interface.
-Simplifying the saving and retrieving of data from memory and storage devices.
-Carrying out background utilities, such as a virus scanner which the user can “leave it to its own device”.
Define a program
The written code.
Define a process
A program that has started to be executed (dynamic).
What is the PCB (Process control block)
A data structure which contains all of the data needed for a process to run; this can be created in memory when data needs to be received during execution time.
What does the PCB store? ( 2 marks)
-Current process state
-Process privileges
-Register values
-Process priority and any scheduling information.
-The amount of CPU time the process will need to complete.
-A process ID which allows it to be uniquely identified.
-I/O status information.
Define multitasking
Allow computers to carry out more than one task at a time. Each of these processes will share common hardware resources. To ensure multitasking operates correctly, scheduling is used to decide which process is carried out first.
Describe the process state new
Process is being created.
Describe the process state ready.
-The process is not being executed.
-The process is in the queue
… waiting for the processor’s attention/CPU time.
Describe the process state blocked
-The process is waiting for an event.
-So it can’t be executed by the moment.
-e.g. Input/Output
describe the process state running
-Process is being executed by the CPU.
-Process is currently using its allocated time slice.
descrribe the process state terminated.
-Process has finished executing
what are the conditions for a state to go from ready to running
-Current process is no longer running// processor is available.
-Process was at the head of the queue.
what are the conditions for a state to go from blocked to ready
-The only required resource become available// resource/event/IO operation is complete.
What are the conditions for a state to go from running to ready
-When a process is executing it is allocated a time slice.
-When the time slice is completed, the process can no longer use the processor even if it is capable of further processing.
What are the conditions for a state to go from running to blocked
-Process is executed when it needs to perform IO operation.
-Placed in a blocked state until the IO operation is complete.
Explain how the processes are affected when the following events takes place.
-The running process needs to read a file from the disk.
-The running process using up its time slice.
1.
-Running process is halted.
-Process moved to a blocked state
2.
-Running process is halted.
-Process moves to ready state
… until the next time slice is allocated.
Explain why a process cannot be moved from the blocked state to the running state
-When IO operation is completed for the process in a blocked state.
-Process put into the ready queue.
-OS determines which process get next use of the processor from the ready queue.
Explain why a process cannot be moved from the ready state to the blocked state.
-To be in a blocked state, the process must initiate some IO operation.
-To initiate operation, the process must be executing.
-If the process is in ready state, it cannot be executing; hence must be in running state.