>Bouquet of questions

>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.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s