Units 1 & 2 Flashcards

1
Q

One central processing unit

A

can only do one thing at a time until the operating system has loaded

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

Embedded systems

A

form part of a larger system

typically have to control and monitor many devices at once

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

Real-time systems

A

must guarantee to respond correctly to inputs within a specified time

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

Sequential system

A

one activity must finish before the next can begin

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

Parallel system

A

several activities can be executing at the same time

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

Pseudo parallel system

A

processor is allocated to each activity in turn for a short period of time

each activity can make some progress without waiting for others to complete

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

Uniprocessor

A

number of activities share a single processor

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

Multiprocessor

A

each activity has its own processor on a centralised system

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

One processor, three activities

A

Concurrent but not parallel

the activities can share one processor in a pseudo parallel fashion

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

Three processors, two activies

A

Parallel and therefore concurrent

each activity can progress simultaneously on one processor, with one idle

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

Three processors, five activities

A

A mixture of parallel and pseudo parallel

some processors must share one or more processors

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

Two processors, one activity

A

No concurrency or parallelism is possible as there is only one activity

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

Distributed system

A

contains a number of distinct components at different locations

each component is considered a computer system itself

components can communicate with one another via some form of network

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

Transparency

A

distributed system should appear to its users as a single coherent system

users may not know, or need to know, that the system is distributed

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

Benefits of concurrent systems

A

efficient use of hardware

increased responsiveness to the user

increased speed of computation

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

Drawbacks of concurrent systems

A

increased complexity

new ways for systems to fail

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

Deadlock

A

whole system stops because tow or more components are waiting for each other to continue (so they never do)

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

Benefits of distributed systems

A

sharing of resources

scalable

fault tolerant

interoperability

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

Drawbacks of distributed systems

A

new ways for the system to fail

security

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

Ubiquitous computing

A

small, highly portable computing devices are everywhere in our environment and integrated into everyday life

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

Benefits of mobile systems

A

can communicate and access the other parts of the distributed system from a wider variety of locations

can be wireless

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

Drawbacks of mobile systems

A

increased security risk

more easily stolen or lost

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

Enterprise systems

A

systems needed for enterprise organisations that typically have many employees and located at many different sites

will require many different types of application such as accountancy and ecommerce

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

Characteristics of enterprise systems

A

Availability - accessible from many locations at all times

Scalability - capability to deal with high fluctuating loads

Reliability - maintaining correctness of operations and data even when a fault occurs

Security = controlling access to the system and its data to prevent possible attacks

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

Task

A

a sequence of instructions treated as an element of work

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

Process

A

the ability to execute tasks concurrently

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

Platfrom

A

a particular combination of hardware and operating system

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

Multitasking

A

the execution of more than one task at the same time

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

Requirements of multitasking systems

A

to keep hardware busy (maximise their use)

to keep users productive (system responsive and ‘fair’ to each user)

to mediate access to shared resources (ensure that users see a consistent view of the data)

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

Cooperative multitasking

A

applications have to be coded so that they allow other programs to run from time to time

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

Pre-emptive multitasking

A

operating system can require one process to give way to another to allow sharing of resources

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

Translation of machine code using compilation

A

all the source code is translated to machine code before any instructions are executed

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

Translation of machine code is interpreted

A

the translation is done in steps

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

Registers

A

processors makes use of a small amount of high-speed memory known as registers

registers have a capacity known as their data width

registers hold data that is required immediately or that is frequently required

35
Q

Cache

A

used to hold recently accessed data or recently computed results which are likely to be needed again soon

36
Q

Volatile storage

A

main memory, caches and registers are said to be volatile - they do not retain data when a power supply in not available

37
Q

Persistent storage

A

eg disk storage

retains information when power has been turned off

38
Q

Fetch-execute cycle

A

fetch the next instruction from main memory and place it in the instruction register

execute the instruction to completion (without interruption) using registers for storage

the program counter is then updated

39
Q

The speed at which a processor can carry out its work depends on what?

A

the size of the data

the data width of the bus

CPU clock speed

speeds + sizes of the various kinds of memory the system uses

40
Q

Why is compiled code typically not portable from one platform to another?

A

compilation creates platform-dependent machine code, targeted at a particular processor, therefore it is not portable

41
Q

what is the purpose of a system bus?

A

allows the processing unit to communicate with devices through their device controllers

42
Q

What is a machine code instruction?

A

the fundamental instruction that a CPU works with and executes without interruption

43
Q

What is a device controller and what is its purpose?

A

has its own simple processor, memory and registers so that it can execute in parallel with the CPU and provide two way communication with a hardware device

44
Q

Polling

A

determines whether an event has occurred

involves repeatedly checking for the event

each check involves some work on part of the processor - so also known as busy-waiting

45
Q

Interrupt

A

a signal to a processor that an event has occurred

46
Q

Context switch

A

pausing + resuming processes through the use of privileged instructions

47
Q

Interrupt handler

A

interrupts may have associated priorities which can be used by the interrupt handler to determine what to do next

may involve disabling the interrupt mechanism for a time to allow a high priority task to be completed

48
Q

Program interrupts

A

generated by exceptions

49
Q

Timer interrupts

A

allow operating system to perform tasks t regular intervals

50
Q

I/O interrupts

A

generated by hardware controllers of input and output devices

51
Q

Buffer

A

area of memory or storage for temporary use

a device controller typically has an input buffer and an output buffer

when input from a device is needed - the device place data into its output buffer + signals to the processor(using an interrupt) that the data is available to be copied to main memory

when processor needs to output data - it places data in the device’s input buffer + signals to the device that the data is available

52
Q

What actions must an operating system take when an interrupt occurs?

A

if interrupt in high enough priority, the processor must perform a context switch

the processor must then execute a routine to deal with the interrupt (e.g. transfer data to a device) before resuming the original process

53
Q

Advantage of polling scheme

A

every device is guaranteed to be served within a specified time

54
Q

Disadvantage of polling scheme

A

prioritisation is difficult

55
Q

Advantages of interrupt-driven approach

A

urgent requests can be dealt with very quickly by assigning priorities to types of requests

preferable in interactive systems + real-time systems, which require immediate responses to critical events

56
Q

Disadvantages of interrupt-driven approach

A

non-urgent requests may have to wait a long time while more urgent requests are dealt with

57
Q

Context

A

present condition of a process

58
Q

Context switching

A

needed to handle multiple processes

involves storing the context of the currently running process so that it can be restarted later

loading the context of another process so that it can be run

59
Q

Process descriptor

A

data structure for storing information about the context of a process in a form that allows the process to be paused and restarted

60
Q

Process schedulers

A

used to determine which process is run next on a particular processor

61
Q

Two-state model

A

adequate provided that processes are always ready to run when called upon

running and not running

62
Q

Five-state model

A

to distinguish between processes that can/cannot proceed

new, runnable, running, blocked, exiting

63
Q

Seven-state model

A

swapping a process out of main memory - all or part of the process context is saved to external storage - i.e. the process is suspended

frees resources previously occupied by the suspended process

new, runnable, running, blocked, blocked suspended (waiting for an event) , runnable suspended (runnable if readmitted - no longer waiting for an event), exiting

64
Q

Priority

A

a number indicting the importance of a process

may change over time (increase when a relevant event occurs, increase to ensure a process is not ignored indefinitely)

65
Q

Short-term scheduler (dispatcher)

A

decides what runnable process should run next

may be called into lay when:

- priorities change
- at every quantum
- when an interrupt occurs
- when a process state changes
66
Q

Medium-term scheduler

A

used by systems to make use of virtual memory to swap processes in and out of storage

67
Q

Long-term scheduler

A

decides which programs are admitted to the system for execution from the New state

68
Q

Characteristics of scheduling policies

A

responsiveness - indicates whether a system is acceptably fast in response to a request for action or information

turnaround - time a user waits for a process to complete

throughput - achieving the maximum number of processes per unit of time

69
Q

Performance metrics calculations

A

arrival time (a)

service time (s)

finish time (f) - sum of all s values

turnaround (q) - (f - a)

normalised turnaround (n) - (q/s)

70
Q

FIFO (first in, first out) policy

A

process has to wait its turn in a queue of runnable processes

runs to completion when it reaches the front of the queue

71
Q

SJF (shortest job first) policy

A

queue is established from a list of runnable processes in a way that the job requiring the least time goes to the head of the queue

72
Q

Round robin policy

A

each process is assigned a quantum during which it is allowed to run before giving way and returning to the end of the queue

to avoid excessive overhead of context switching the quantum must be large enough with respect to the time required to context switch

73
Q

Pre-emptive multithreaded systems

A

the operating system can determine when a context switch between threads need to occur

74
Q

Cooperative multithreaded systems

A

relies on threads giving up control of a processor to allow other threads time to run

75
Q

Stack + heap

A

two kinds of memory allocated by runtime systems

stack - an area of memory that is last in, first out (LIFO)

heap - a ‘pile of memory’ in that parts of it can be allocated + deallocated without reference to an particular structure or order

76
Q

What is the difference between a thread and a process?

A

threads (lightweight processes) are a unit of dispatching but not of resource management

processes are a unit of both dispatching and resource management

threads share an address space (memory) - when there is a context switch it is unnecessary to change resource information which reduces time taken to switch

77
Q

What is a multithreaded operating system?

A

one that supports the execution of lightweight processes

78
Q

2 ways to program threads are…

A
  1. inheriting from the Thread class

2. implementing the Java Runnable interface

79
Q

Daemon thread

A

used to execute a background job

indicates to the JVM that it does not have to wait for this thread to terminate before it exits

use the setDaemon method passing the value true as the argument (must be done before the thread is started)

80
Q

Thread states

A
NEW
RUNNABLE
BLOCKED
WAITING
TIMED_WAITING
TERMINATED
81
Q

Thread priorities

A

values between 1 and 10

static constants:
MIN_PRIORITY (1)
MAX_PRIORITY (10)
NORM_PRIORITY (5)

can be dynamically changed - setPriority method

82
Q

Thread behaviour methods

A

sleep (enter TIMED_WAITING state from RUNNABLE for n milliseconds)

yield (current thread allow other threads a chance to run)

join (current thread to wait until the thread on which join is invoked on has terminated)

currentThread (returns reference to current thread, used to obtain info about it)

83
Q

InterruptedException

A

caused by the interrupt method being invoked on the thread when it is paused for some reason

checked exception so compiler requires you deal with it