23.07.2013 Views

HP-UX 11i Knowledge-on-Demand

HP-UX 11i Knowledge-on-Demand

HP-UX 11i Knowledge-on-Demand

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Introducti<strong>on</strong>: Mercury rati<strong>on</strong>ale<br />

• Customer and field reports of certain heavily used areas of functi<strong>on</strong>ality<br />

− Tracking time<br />

− User space locking c<strong>on</strong>tenti<strong>on</strong> issues<br />

− Both too expensive in terms of CPU time<br />

• System call overhead is <strong>on</strong>e key problem here.<br />

− Calls are d<strong>on</strong>e many, many times.<br />

− Calls are d<strong>on</strong>e in performance-critical parts of the code.<br />

• Soluti<strong>on</strong>: Let almost all the work be d<strong>on</strong>e in user space.<br />

• Another key problem is user space lock c<strong>on</strong>tenti<strong>on</strong> when many threads are sharing locks<br />

and resources.<br />

− Threads waiting for locks spin when the lock holder is not running—wasteful.<br />

− Threads holding locks/resources are c<strong>on</strong>text-switched out by the kernel, causing waiting threads<br />

to have to wait even more—<strong>on</strong>ce again, wasteful.<br />

• Soluti<strong>on</strong>:<br />

− Let threads see the run-state of other threads.<br />

− Let threads in critical secti<strong>on</strong>s prevent themselves from being switched out.<br />

<str<strong>on</strong>g>HP</str<strong>on</strong>g>-<str<strong>on</strong>g>UX</str<strong>on</strong>g> <str<strong>on</strong>g>11i</str<strong>on</strong>g> v3 Training

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!