1.2 Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is an instruction set

A

A group of commands for a CPU in machine language.

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

What does CISC stand for

A

Complex instruction set

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

What is CISC

A

Use a full instruction set on the CPU, any instruction they need to be converted to machine code will be there.
Fewer registers

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

What does RISC stand for

A

Reduced instruction set

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

What is RISC

A

Small instruction set with only the most frequently used instructions are available

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

Adv of RISC

A

Less heat
Lower cost
Physically smaller
Lower power consumption
Pipelining works better as independent instructions can be carried out at the same time
Each instruction only needs one clock cycle
Simpler hardware

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

Disadv of RISC

A

More instructions to be carried out for one process
Runs at a lower clock speed
More programming code is needed
Compiler needs to do more work to translate from high level code to machine language

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

What uses CISC

A

Desktop computers
Laptop computers

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

What uses RISC

A

Smartphone
Tablets

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

Adv of CISC

A

More intensive tasks will do better with CISC
Less programming code
Compiler has to do little work to translate from high level code to machine language

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

Issues with CISC

A

Only 20% of instructions will be used, they all still need to be stored
Transistors use power and generate heat in turn, this needs additional cooling, this also takes up more space
A complex instruction takes more clock cycles to complete, this takes more time to process
Complex hardware making it more expensive than RISC
Cant support pipelining

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

What are the 4 segments the OS divides the RAM into

A

Stack segment, free memory, data segment, code segment

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

What does the stack segment store

A

Functions stored, changes size frequently, the stack segment can grow into free memory

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

What does the data segment store

A

Stores all variables used

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

What does the code segment store

A

Application code

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

What is an OS

A

A program which manages all of the software and hardware on the computer

17
Q

Memory management

A

When the OS controls and coordinates a computers main memory

18
Q

What is paging

A

A fixed, physical sized division of main memory, pages are numbered, if a page hasn’t been used for a while it is moved to virtual memory, if a segment spans multiple pages, all pages are moved to virtual memory

19
Q

What is scheduling

A

The task of allocating CPU processor time amongst all running programs.

20
Q

What is the purpose of scheduling

A

Processes as many tasks as possible in a given time
Makes maximum use of CPU time
It will try to minimise the delay between when the user requests something to be done and when that task is completed.
Makes maximum use of resources such as input-output devices
Is able to prioritise jobs
It will ensure that no task is left uncompleted for too long, even if they are low priority
Is able to alter priorities according to need

21
Q

What are the types of scheduling algorithms

A

Round robin
First come first served
Shortest time remaining
Multi-level feedback queues

22
Q

What is round robin

A

Each program in a queue is given a set amount of processing time, the first processes is loaded into main memory, if the process is completed in the allocated time then the next processes is loaded immediately, however, if the process is not finished before the time runs out, it is put at the back of the queue.

23
Q

What are the advantages of round robin

A

It is simple to implement. Round Robin is a good algorithm if all the processes are more or less of similar priority and size.

24
Q

What are the disadvantages of round robin

A

It does not take priority into account
It does not consider some processes are short and some are long

25
Q

What is first come first served

A

The first process loaded into main memory is allowed to run to completion before the next process begins, processes are loaded into memory whenever space is available

26
Q

What are the advantages of first come first served

A

Simple algorithm to implement

27
Q

What are the disadvantages of first come first served

A

Once a job starts it prevents other jobs from being processed until it is completed
A job that needs to access a slow resource e.g. a printer, wastes processor time whilst it is waiting for that resource
It does not take into account the priority of a process.
It does not consider that some processes are short and others long.

28
Q

What is shortest job first

A

The shortest job in main memory is processed first, if the new process is shorter than the currently running process then the currently running process will be interrupted and the shorter one runs immediately

29
Q

What are the advantages of shortest job first

A

It ensures the maximum number of jobs are completed
It ensures that short jobs aren’t kept waiting while long processes tie up CPU resources.
It minimises the average time a process takes to complete.

30
Q

What are the dis advantages of shortest job first

A

Does not take into account the priority of a process.
If a long job is nearly completed, it will still be interrupted and put back in the queue when a shorter job arrives.
The scheduler can only estimate how long a job will take to complete, but its estimation could be wrong.
Particularly long jobs may never complete if shorter jobs continually keep ‘jumping the queue’.

31
Q

What are multi-level feedback queues

A

Every job is given a priority by the scheduler when it arrives and is sorted into the relevant queue. The queues themselves are sorted by one of the previously discussed algorithms. The high priority queue is completed first, and then each of the lower level queues in turn.
The scheduler is able to re-prioritise jobs at any time, moving them into the queue appropriate for their new priority. It may do this based on new information, or simply because a low priority job has been waiting for too long already.

32
Q

What are the advantages of multi-level feedback queues

A

Makes sophisticated use of process priority.
It ensures that higher priority processes run on time.

33
Q

What are the disadvantages of multi-level feedback queues

A

Complex to implement.
Not very efficient if all jobs have similar priority.
Low priority jobs may take an extremely long time to complete if the queue algorithm doesn’t compensate for wait-time, especially if new high-priority jobs keep arriving.