Previous | Next --- Slide 8 of 88
Back to Lecture Thumbnails
tspint

I'm a little confused as to what Execution Context is exactly, can someone explain? Is it registers?

orz

I think it includes registers but may be anything that contains the state of the processor to execute the given program. Another example in my mind is stack pointer.

orz

(Forgot mentioning) @tspint

harrymellsop

@orz, a small note, but I think generally the stack pointer is itself always stored in a register (SP on x86).

My understanding of an execution context is that it consists of a heap, stack, code, and all the registers (including things like stack pointer, instruction pointer, etc.).

I think it's probably telling that the Execution Context box here has 8 little boxes within it, and the standard x86 architecture includes 8 General-Purpose registers.

kevtan

@harrymellsop To build on what you're saying, I believe the "execution context" is a broad term that applies to any and all state that a program requires to run. This could include, as you already mentioned, data stored in the heap and stack as well as the registers. For those of you who took CS 140 already, everything instead of a "struct thread" would be the execution context.

assignment7

@kevtan, I am still a little confused about why Execution Context should include data in heap and codes? My understanding is that the Execution Context is anything that stores program's states, too, but I think data and codes should be stored out side and be fetched by Fetch/Decode part.

Nian

Sorry, but what does ALU mean?

nickbowman

@Nian ALU stands for arithmetic and logic unit, which is the part of the processor responsible for carrying out arithmetic operations (add, mult, sub, div) and handling logical flow operations.

rubensan

Is it correct for me to state that the number of Execution Contexts in a core is equal to the number of hardware-threads?

gpu

So far, it seems like the fetch/decode block is still pretty mysterious. What fetching and decoding does this logic refer to, specifically? What are the trade offs to adding potentially more of these components to a single core?

a7hu

@gpu fetch/decode block refers to fetching an instruction, pointed to by the program counter (PC), from the memory into the instruction register(IR). The instruction in the instruction register needs to be decoded into opcode and operands before sent to ALU.

jessiexu

@rubensan execution context refers to the states of a program while hardware-threads or hyperthreading refers to the set of hardware resources like registers to store such states. Without hardware-threads, context switching involve storing current states into the memory and can be expensive. Hardware threads can speed up context switching and achieve better concurrency.

Please log in to leave a comment.