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
Task
a sequence of instructions treated as an element of work
26
Process
the ability to execute tasks concurrently
27
Platfrom
a particular combination of hardware and operating system
28
Multitasking
the execution of more than one task at the same time
29
Requirements of multitasking systems
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)
30
Cooperative multitasking
applications have to be coded so that they allow other programs to run from time to time
31
Pre-emptive multitasking
operating system can require one process to give way to another to allow sharing of resources
32
Translation of machine code using compilation
all the source code is translated to machine code before any instructions are executed
33
Translation of machine code is interpreted
the translation is done in steps
34
Registers
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
Cache
used to hold recently accessed data or recently computed results which are likely to be needed again soon
36
Volatile storage
main memory, caches and registers are said to be volatile - they do not retain data when a power supply in not available
37
Persistent storage
eg disk storage retains information when power has been turned off
38
Fetch-execute cycle
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
The speed at which a processor can carry out its work depends on what?
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
Why is compiled code typically not portable from one platform to another?
compilation creates platform-dependent machine code, targeted at a particular processor, therefore it is not portable
41
what is the purpose of a system bus?
allows the processing unit to communicate with devices through their device controllers
42
What is a machine code instruction?
the fundamental instruction that a CPU works with and executes without interruption
43
What is a device controller and what is its purpose?
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
Polling
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
Interrupt
a signal to a processor that an event has occurred
46
Context switch
pausing + resuming processes through the use of privileged instructions
47
Interrupt handler
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
Program interrupts
generated by exceptions
49
Timer interrupts
allow operating system to perform tasks t regular intervals
50
I/O interrupts
generated by hardware controllers of input and output devices
51
Buffer
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
What actions must an operating system take when an interrupt occurs?
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
Advantage of polling scheme
every device is guaranteed to be served within a specified time
54
Disadvantage of polling scheme
prioritisation is difficult
55
Advantages of interrupt-driven approach
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
Disadvantages of interrupt-driven approach
non-urgent requests may have to wait a long time while more urgent requests are dealt with
57
Context
present condition of a process
58
Context switching
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
Process descriptor
data structure for storing information about the context of a process in a form that allows the process to be paused and restarted
60
Process schedulers
used to determine which process is run next on a particular processor
61
Two-state model
adequate provided that processes are always ready to run when called upon running and not running
62
Five-state model
to distinguish between processes that can/cannot proceed new, runnable, running, blocked, exiting
63
Seven-state model
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
Priority
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
Short-term scheduler (dispatcher)
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
Medium-term scheduler
used by systems to make use of virtual memory to swap processes in and out of storage
67
Long-term scheduler
decides which programs are admitted to the system for execution from the New state
68
Characteristics of scheduling policies
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
Performance metrics calculations
arrival time (a) service time (s) finish time (f) - sum of all s values turnaround (q) - (f - a) normalised turnaround (n) - (q/s)
70
FIFO (first in, first out) policy
process has to wait its turn in a queue of runnable processes runs to completion when it reaches the front of the queue
71
SJF (shortest job first) policy
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
Round robin policy
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
Pre-emptive multithreaded systems
the operating system can determine when a context switch between threads need to occur
74
Cooperative multithreaded systems
relies on threads giving up control of a processor to allow other threads time to run
75
Stack + heap
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
What is the difference between a thread and a process?
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
What is a multithreaded operating system?
one that supports the execution of lightweight processes
78
2 ways to program threads are...
1. inheriting from the Thread class | 2. implementing the Java Runnable interface
79
Daemon thread
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
Thread states
``` NEW RUNNABLE BLOCKED WAITING TIMED_WAITING TERMINATED ```
81
Thread priorities
values between 1 and 10 static constants: MIN_PRIORITY (1) MAX_PRIORITY (10) NORM_PRIORITY (5) can be dynamically changed - setPriority method
82
Thread behaviour methods
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
InterruptedException
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