o What is a cache line?
- Smallest unit of data transfer between cache and main memory.
- Finest level of granularity
o How can I get IPC information over processes?
- Use $ipcs
o Tell the value of enum's elements.
enum e_tag{ a, b, c, d=20, e, f, g=20, h
}var
- a=0, b=1, c=3, d=20, e=21, f=22, g=20, h=21
o Why use volatile?
- To avoid compiler optimization on variables involved in two cases:
+ Shared library
+ Value updated implicitly by hardware
Avoid optimization of Load/Store instructions by the compiler.
e.g., If you have a variable(X) that reads from a shared lib variable(Y), while Y is being updated by other process. Compiler would have no idea of this dependency of external value updates and it may remove these LOAD/STORE instructions during compilation.
No comments:
Post a Comment