CHAPTER : SYSTEM SOFTWARE Flashcards

1
Q

Purpose of an Operating System

A
  • OS provides an environment on which application software can be executed
  • allows software to communicate with the hardware
  • required to manage the computer system
  • manages memory usage
  • provides filing system
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Key Manageemnt Tasks of the OS

A
  • provides means of communication (UI) between the user and the computer
  • manages the physical resources like processors, HDD,input/output etc.
  • provides a platform where the applications can run
  • controls access, allows to making passwords to restrict and control access rights
  • provides utility software like diskformatter, automatic updates etc. that carry out tasks that are necessary for the computer to run
  • file management: allows user files to be managed using folders
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a benefit of the User Interface

A
  • it hides the complexities of the computer’s OS from the user
  • complex commands involving memory locations are avoided
    eg: clicking on icons directly as oppose to writing the code to open a software
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Process Control Block

A

complex data structure containing all relevant data to execute process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Process State: READY

A
  • new process has arrived at the memory, PCB created capable of using processor but has to wait
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Process State: RUNNING

A
  • process currently usin the Processor (has CPU access)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Process State: Blocked/Suspended

A

cannot progress to use the processor as:
- doesn’t have enough resources to execute the instruction
- waiting from some signal from another process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Running state –> Ready state

A
  • when time slice of the current running process expires and another process of higher priority os on the ready queue, running process is pre-empted
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Multitasking

A
  • managing the execution of many programs that appear to be running simultaneously
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Why does the OS needs to schedule

A
  • it allows for multitasking
  • ensures there is fair usage of the processors, peripherals and memory
  • ensure the higher priority tasks are executed sooner
  • ensure all processors have a chance to finish the process they are on
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Low - Level Scheduling : Pre-Emptive

A
  • will stop the process that would have otherwise continued to execute
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Low - Level Scheduling : First Come First Served

A
  • non preemptive
  • FIFO
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Low - Level Scheduling : Round Robin

A
  • allocates time slice to each process
  • preemptive and can be FIFO
  • doesn’t prioritse
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Low - Level Scheduling : Priority Based

A
  • most complex
  • priority reevaluated on queue change
  • priority calculation requires computation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Low - Level Scheduling : Shortest Job First
Low - Level Scheduling : Shortest Remaining Time

A
  • process with the shortest run time
  • shortest estimate run time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a Kernel

A
  • acts as a low level interrupt handler
17
Q

Tasks of Kernel

A
  • load/unload applicaiton from memory
  • schedule tasks for efficient run on CPU
  • memory management
  • file storage to and from secondary storage
  • file management
  • data security
18
Q

Interrupt

A
  • signal seeking CPU attention and causes OS Kernel to invoke ISR
19
Q

Interrupt Handling

A
  • transferring control to another routine when service is required
20
Q

Memory Allocation: Segmentation

A
  • application divided into fixed size elements when program compiled
  • loader calculates the number of segments the program requires
  • programmers code a code to minimise the segments required
21
Q

Memory Allocation: Paging
How paging is used to manage virtual memory

A
  • the memory is split into frames
  • the virtual memory is divided into blocks of the same size that are fixed
  • and the page table is set up to translate between the logical and physical addresses
  • swap pages into memory with new pages from disk when required
  • keep track of all free frames
22
Q

Page:

A

virtual memory divided into blocks of fixed sizeP

23
Q

Page Frame

A

main memory divided into page frames (same size as pages)

24
Q

Page Table

A

shows mapping of page to page frames
translates the logical addresses to physical addresses

25
Q

Virtual Memory

A
  • uses secondary storage to simulate additional main memory
26
Q

What is Virtual Memory

A
  • it is the secondary storage that is used to extend the RAM
  • so that the CPU can access more memory than available
  • only data in use needs to be in RAM
  • therefore data is swapped between the disk and the RAM
27
Q

Why OS uses Virtual Memory

A
  • VM is used when RAM is running low
  • When computer is running many processes at once
  • VM allows for efficient use of the RAM
28
Q

Benefits of Virtual Memory

A
  • not the entire program needs to be in the RAM
  • large programs can run with/without the physical memory space being available
29
Q

Disk Thrashing

A
  • a disadvantage of using virtual memory
  • it happens when the pages in RAM and virtual memory are interdependent
  • pages are required back in RAM as soon as they are moved into the VM
  • no useful processing gets done as the same pages are being swaped back and forth
30
Q

Lexical Analysis

A
  • it converts sequence of characters in a sequence of tokens
  • creates keyword and symbol table
  • removes white spaces and comments
  • identifies source code errors like invalid variables and incorrectly spelt keywords
31
Q

Syntax Analysis

A
  • it double checks code for grammar (syntax errors)
  • makes use of tree data structures (parse tree)
  • produces an error report
32
Q

Code Generation

A
  • intermediare code genweration
  • produces object code (after compilation of source code)
33
Q

Code Optimisation

A
  • code edited to improve efficiency
  • to decrease the time taken to execute by reducing instructions and occupy less memory space
34
Q

How contents of keyword and symbol table used to translate source code program

A
  • keywords looked up and represented by tokens
  • identifiers looked up and then converted to location
  • the used to create sequence of tokens
35
Q

Explain how interpreter executes without full translation

A
  • Interpreter examines source code one statement at a time
  • Checks if there are any errors
  • If not it executes the line of code
  • Else it produces an error report and the interpreter stops
  • interpretation is repeated for each iteration
36
Q

Reverse Polish Notation

A
  • provides an unambigious way of representing expression without brackets
37
Q

Main Steps of RPN

A
  • works from left to right
  • if element is a number it is pushed onto the stack
  • if element operator, the first two numbers are popped and calucation is performed
  • and answer is pushed back on stack
  • ends after last item in expression is done