Slides 3 Flashcards

1
Q

define pipelining

A

Multiple steps of a process occur concurrently and then pass their results to the next step so less time is wasted as compared to waiting for every step to be finished.

i.e in fetch-decode cycle fetching takes longer than decoding and executing so while the nth instruction is being executed, instruction n+2 is being fetched and n+1 is being decoded.

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

what happens when in kernel mode

A

all instructions are allowed
• all I/O operations are allowed
• all memory can be accessed
• note: most of the kernel runs in kernel mode

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

what happens when in user mode

A

when a normal application is ran the CPU is in user mode and:
• eg. accessing the status register is disallowed (of course),
I/O instructions not allowed, access to some parts of memory not
allowed, …
• illegal instructions result in traps (exceptions)

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

what is a trap?

A

often a special instruction (SWI n, INT n, … )
• switches from user mode to kernel mode and invokes a predefined (system call)
routine
• think of it as ‘pausing’ the application and executing a kernel routine configured by the OS
• when the kernel routine is done, user mode is restored and application ‘resumes’

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

how to access hardware in user mode?

A

Not possible, in user mode one has to switch to kernel mode and run a predefined routine (system call) to do access hardware. These are called traps.

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