1.2.1 System Software Development Flashcards

1
Q

What does System Software allow control over

A
  • The hardware and the software of the computer essential for even basic tasks.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the 2 most common types of systems software

A
  • The Operating System
  • The Start-up software
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is Application Software

A
  • Is software that allows a user to carry out a specific task.
  • For example Microsoft Outlook allows a user to send an e-mail
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the OS responsible for

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What part of the OS is responsible for process managemnt, hardware management and other key low level tasks known as

A

Kernel

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

What are the key modules of the OS

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the key design goals for the Memory Manager

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What must the Memory Manager ensure and why is it a difficult process

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is Memory Addressing

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is paging

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is Segmentation

A
  • 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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How does a Paging Table work

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is an advantage of Segmentation

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is Virtual Memory

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Why use Virtual Memory and how to reduce the use and what can happen when pages are constantly swapped?

A
  • 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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How do you implement virtual memory

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What are the similarities between paging and segmentation

A
  • Both allow programs to run despite insufficient memory
  • Pages and segments are stored on disk
  • Pages and Segments are transferred into memory when needed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What are the differences between Paging and Segmentation

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Why is a GPU more sutiable than a CPU for 3D graphics

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Exam Question: What are Interrupts?

A

A signal to the processor indicating a device/process needs attention

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

List some common interrupts

A
  • 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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

How are interrupts recorded

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Exam Question: Describe what happens in the CPU when it receives an interrupt

A
  • 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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What is a buffer and what happens if the buffer overflows

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Interrupts and Buffer Example

A

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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

What is ISR

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

What is multi-tasking

A
  • 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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

What is Scheduling

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

What are the different process states

A
  • Running : when the process has control of the CPU
  • Ready to run: when the process is in a queue waiting for the CPU
  • Blocked: A process is waiting for an I/O operation/ a device/ external operation such as hard drives
30
Q

What are the different options a process in the running process stage can do

A
  • Complete the task and (close) - removes this process from scheduling completely
  • Be interrupted by the scheduler - has decided has had enough CPU time and will swap for another process goes to ready-to run queue
  • Become blocked - goes to blocked queue - prevent wasting CPU time
  • Give up CPU time - voluntarily give up CPU time
31
Q

What is Deadlocking

A
  • Is when a process is waiting for a system resource that is held by another process.
  • This process in turn is waiting for another resource held by another process before it can complete
  • Each process has a locked resource and neither can complete - they need something held by something else
32
Q

What is Starvation

A
  • When a process never gets the chance to run or not enough CPU time to complete in a timely manner owing to high priority processes gaining an advantage
  • Happens due to poor scheduling
33
Q

What are the main design goals of the scheduler

A
  • Minimise Starvation
  • Eliminate Deadlock
  • Ensure high throughput of processes (Processes can be completed as quick as possible)
  • Ensure fairness for all processes
  • Ensure reasonable response time (user experience)
34
Q

What is execution Time

A
  • Each process in the schedule requires a certain amount of time in the CPU to complete the task
  • There are 2 types of tasks bounded and unbounded
    • Bounded - fixed execution time
    • Unbounded - task that will continue needing CPU time until the user stops the application (playing music) uses bursts of CPU time
35
Q

What are the different scheduling algorithms

A
  • First come, first serve
  • Shortest job first
  • Round Robin
  • Shortest Remaining Time
  • Multi-level Feedback queues
36
Q

What does a scheduler manage

A
  • Which process to execute next
  • The length of time for the next process can execute for
37
Q

What is the scheduling algorithm for Round Robin

A
  • Each job is given a section of processor-time known as a time slice.
  • Once each job in the queue has used its time slice, it goes to the back of the ready-run queue (if not completed) the OS again grants each job an equal slice of processor time
  • This continues until a job has been completed
38
Q

What is the scheduling algorithm for First Come First Serve

A
  • Jobs are processed in chronological order by which they entered the queue
  • This is straighforward to implememnt, FCFS doesnt allocate processor time based on priority
39
Q

What is the scheduling algorithm for Shortest Remaining Time

A
  • The queue storing jobs to be processed according to the time left for completion - jobs with the least completing time first
  • Again risk of processor starvation for longer jobs as shorter jobs are added to the queue
40
Q

What is the scheduling algorithm for Shortest job first

A
  • Jobs are processes in order according to the time required for completion.
  • This type of scheduling is most suited to batch systems, where shorter jobs are given preference to minimise waiting time
  • However it requires the processor to know or calculate how long each job will take + risk of starvation is shorter jobs are continually added
41
Q

How does the multi-level feedback scheduling algorithm work

A
  • This one uses 3 of varying priority
  • Each queue works on a FCFS basis level 0 high priority to level 2 least priority
  • To prevent starvation, MFQ implements a promotion and demotion system:
    • New process is always added at the tail of level 0
    • If a process gives up the CPU of its own accord it will be added back to the same level
    • If a process is pre-empted (stopped by a scheduler) it will be demoted to a lower queue
    • If a process blocks for I/O it will be promoted 1 level
42
Q

How do multilevel feedback queues decide what is promoted and demoted

A
  • Each process is given a fixed amount of time.
  • If a process uses its time, it will be stopped by the scheduler - known as pre-emptive scheduling, and will result in being demoted
  • Blocked processes waiting for I/O will always promoted:
    • They have already waited to be unblocked
    • To ensure I/O devices are used to maximise efficiency
43
Q

What are Hardware Drivers (Device Drivers)

A
  • They are simply software that understands how to directly talk to a piece of hardware
  • As all devices are different the OS needs to have a generic way of talking to devices of the same type
  • Most OS installations will detect what hardware the user has and tries to install the required drivers when the OS is installed
44
Q

How are drivers installed

A
  • The functionality works by each device having 2 codes, a vendor ID (VID) and a product ID (PID)
  • When a device is connected, the OS queries the device for these 2 code
  • It then checks the database of known vendors and products to see if a sutiable device driver can be found
    • Sometimes the OS will install generic drivers that will not be able to use the full range of features of the device
45
Q

What are the different types of OS

A
  • Single User
  • Multi-Tasking and Multiuser
  • Real Time
  • Distributed
  • Embedded
46
Q

What is a single user Operating System

A
  • A user has sole access to the system and resources
  • While the system can have multiple log-ins, they can only be accessed 1 at a time
  • The OS will create home directories for each user therefore allowing them to use the system without compromising the security of the other users
47
Q

What is a multi-user Operating System

A
  • More powerful computers or servers can provide time-sharing of resources by multiple users simultaneously
  • Multi-user OS allows users to log-in remotely
  • Each user has their own VDU, peripherals and basic computer but share the internal hardware of the server or computer - Terminals
  • School network = example of multiuser
48
Q

What is SSH - how users log in to 1 machine

A
  • Secure Shell
  • Makes use of a client to connect to a server through a command line interface and is a popular method of communicating and running software on servers for network or website admins
  • Communication is encrypted.
49
Q

What is VDI

A
  • Virtual Desktop Infrastructure
  • Enables users to connect to the server via remote desktop.
  • When applications are run under VDI - all processing takes place on the server. A live video stream is sent.
50
Q

What is an embedded OS

A
  • Built to perform a small range of specific tasks, this OS is catered towards a specific device.
  • They are limited in their functionality and hard to update
  • Restricted resources means they can’t run a full OS example wash clothes (washing machine), play DVD
51
Q

What is a real time OS

A
  • Real-Time Operating Systems must respond to system inputs within a short amount of time (used in time critical computer systems)
  • Must be focused on specific tasks/applications
  • Examples : Aircraft Systems, self-driving cars
52
Q

What is a Distributed OS

A
  • Run across multiple devices, allowing the load to be spread across multiple computer processors.
  • Projects that require high scalability and powerful systems.
  • Computers connect to a network and each node shares part of the workload
  • The distributed OS manages this workload
  • Each node in the distributed OS has a small set of key features so it can access hardware of node
53
Q

What is BIOS

A
  • There is a small program called the BIOS (basic,input,output,system) stored on non-volatile memory (ROM) on the motherboard
  • It contains the start-up sequence of the computer and also configures hardware devices such as the printer, monitor
  • It comes with setup utility - allows basic configuration of boot process
54
Q

What tasks does the BIOS perform

A
  • Initialises and tests hardware by running POST
  • Selects the first boot device based on information collected in POST
  • Tries the boot loader of that device and if sucessful it runs the OS
  • Moves on to the next boot device if unsuccessful. Repeats until all boot devices have been tried
  • If no boot devices have sutiable boot loader, the system will stop
55
Q

What does the BIOS (POST) check

A
  • System memory is ok
  • System clock/timer is running
  • Processor is ok
  • Keyboard is present
  • BIOS is not corrupted

When BIOS is started it runs POST. This sends an initialisation signal to every device and instructs each to run internal tests. They return their current state

56
Q

What are virtual machines

A

A theoretical computer which provides… …an environment in which a translator is available Uses an interpreter to run the intermediate code

57
Q

What are the 2 different categories of Virtual machines

A
  • System Virtual Machines - Represents an entire OS
  • Process Virtual Machines - Represents a single process only
    • Process Virtual Machines act as interpreters for generic machine code for intermediate code that has been compiled
    • PVM run intermediate code that has previously been compiled
    • Source code is compiled into intermediate code to prevent incompatibilities
58
Q

Process Virtual Machines + what is intermediate code

A
  • Act as interpreters for intermediate code that has been compiled
  • Source code is compiled into intermediate code to prevent incompatibilities with different CPU architectures
  • However CPU, cant run intermediate code directly. A process VM must be used to translate intermediate code to machine code
  • Intermediate code is half way code known as byte code
59
Q

Name an example of a programming language which is both compiled and interpreted and what are the advantages

A
  • Java - both compiled and interpreted
  • First the source code is compiled into intermediate code (byte code) and interpreted by a Java VM
  • Advantages are:
    • code can be run on many different host OS’s without the need to recompile
    • Intellectual Property is protected as source code isnt released
    • Code can be optimised by both compiler and interpreter
60
Q

What are the different layers of the OS

A

Top layer:

  • Memory Manager
  • Process Manager
  • File System Manager
  • Network Services

3rd layer

  • Security Manager

2nd layer

  • Hardware Drivers

1st layer

  • Hardware
61
Q

What does the RAM hold

A
  • The OS
  • Currently running programs
  • Current files and data being worked on
62
Q

When would Round Robin be sutiable/not

A
  1. Not sutiable for applications that have interactive interfaces. Lag time would be noticeable. Suited for few simple processes.
63
Q

What is the major disadvantage of Distributed OS and advantage

A
  • Owing to the requirement for synchronisation across the network, which impacts on performance
  • Nodes can offer greater modularity and flexibility without impacting the core services provided by kernel
  • User processes can be split across the nodes and managed by distributed OS without specifying which node the process should run on.
64
Q

What is a Multi-tasking OS?

A
  • Manages a computer’s resources to give illusion that it is possible to switch between tasks.
  • Single core computer can only do 1 task at a time - but a CPU can switch between these quickly
65
Q

Exam Question: A gaming company decides to release a new video games console. The console will use a modified version of an operating system called Linux. Describe two functions an operating system might be expected to carry out on the console

A
  • Provide a user interface
    • For the user to load games.
  • Control hardware
    • Such as graphics card, games controllers etc.
  • Act as a platform from which software can be run
    • Such as games and apps
  • Control access
    • So that different users can access the system and have their own data such as scores and achievements
66
Q

Exam Question: It is important that enough RAM is left for the operating system to use. Describe a technique that allows operating systems to overcome a lack of available RAM.

A
  • Memory contents are divided into pages
  • Pages not needed get moved to virtual memory
  • Which is an area on a secondary storage device
  • When required the pages are moved from virtual memory back into RAM.
67
Q

Exam Question: List three functions, other than memory management, of an operating system

A
  • Provide a (user) interface
  • Manage hardware/peripherals
  • Manage CPU usage / handles interrupts
  • Provide security
  • Provide platform to run other software
  • Provide utilities for system maintenance
68
Q

Exam Question: Define what is meant by the term ‘device driver’, giving one example of a device driver that a home user would need.

A

Software/program …that allows the operating system to communicate with hardware

  • Printer driver
  • Webcam driver
  • Sound card driver
  • Graphics card driver
69
Q

Exam Question: Give two examples of utility software, explaining the purpose of both.

A
  • Encryption …scrambles meaning of data files with a key
  • Defragmentation …organises file segments on secondary storage
  • Compression … reduces size of files
  • Backup …makes regular copies of files in case of loss
70
Q

Exam Question: State the name of and describe two methods that the operating system can use to divide the contents of RAM

A
  • Paging…(1) …Memory is divided into fixed / physical units
  • Segmentation… (1) …Memory is divided logically / variable size according to its contents.
71
Q

What is intermediate code and why is it good?

A
  • Is simplified code that… …is between high level & machine code …is produced by compiler …runs on any computer …allows portability between machines
  • Allows sections of code to be written in different languages… …by different programmers …suitable for specific tasks
  • Error free