1 / 15

Understanding and Improving Operating System Effects in Control Flow Prediction

Understanding and Improving Operating System Effects in Control Flow Prediction. Tao Li, Lizy Kurian John, Anand Sivasubramaniam, N. Vijayakumar and Juan Rubio. A short review by. ASPLOS X 2002 San Jose, CA, USA. R. Achutharaman Dept. of. SERC, IISc, Bangalore 06 th Feb 2004.

kipp
Download Presentation

Understanding and Improving Operating System Effects in Control Flow Prediction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Understanding and Improving Operating System Effects in Control Flow Prediction Tao Li, Lizy Kurian John, Anand Sivasubramaniam, N. Vijayakumar and Juan Rubio A short review by ASPLOS X 2002 San Jose, CA, USA. R. Achutharaman Dept. of. SERC, IISc, Bangalore 06th Feb 2004.

  2. Background overview Branch Prediction interferences or aliasing interference type addressed by BHT interferencesPAg PHT interferences in local history indexing PAp, PAg with large PHT PHT interferences G-share, Agree, Bi-Mode, in global history indexing GA with large PHT Context interference Multi-hybrid predictors OS interference ???

  3. Background overview Dynamic Branch Predictors PHT PHT PHT PHT

  4. Agree Branch Predictor PHT * reduces negative interferences (converts negative interference to a positive or neutral interference) * eg. let two branches taken rates are 85% and 15%, probability of these 2 branches has opposite outcome (ie. negative interference): (br1-T, br2-NT) + (br1-NT, br2-T) = (85%*85%) + (15%*15%) = 75.5% With agree predictor, with biasing bits, the above probability equation would be: (br1-agrees, br2-disagree) + (br1-disagrees, br2-agrees) = (85%*15%) + (15%*85%) = 25.5% 2-bit counter BHSR 2-bit counter indexing function 2-bit counter Biasing bit storage (part of BTB) Branch PC Tag bit Predict taken or not taken Tag bit Tag bit

  5. Bi-Mode Branch Predictor updation policy: Direction Predictor: - only selected direction predictor counter is updated; the other direction counter is not updated Choice predictor: - always updated; - except when branch outcome is opposite to choice predictor & selected predictor predicted correctly

  6. Why Operating System aware branch predictors ? * user and kernel branches have different characteristics * interference between the branches in user and kernel mode (User/OS interference) pollutes the shared PHT in small PHT based global prediction schemes ! How much is the User/OS interference ?

  7. OS interference

  8. OS Branch Execution Profile for benchmark “jack” Average of all benchmarks

  9. Characteristics of OS branch behavior (based on the SimOS) * TLB misprediction code has only ONE branch, and nearly “always taken” ! -> static predictor is sufficient * exception/trap code has binary decision trees -> correclative predictor (like Gshare) is good; But, % of exceptions/trap are nearly insignificant (~2%) (Figure.4) * authors observation based on the experiments: -> far more branches are executed in user contexts then the OS context (Figure.2) -> % branches execution by OS alone even goes upto 55% (Table.1) -> many OS branches are very correlated -> user and OS prediction directions differs (Figure.5) (user and OS has different bias distribution) -> with 8K entry PHT (G-share), the avg. misprediction due to User/OS interference 14.2%(Based on Table.3) -> % of misprediction due to User/OS interference does not change significanty by increasing the PHT from 8K entries to 64K entries. -> with 8k PHT (G-share), 22-62% of misprediction in the OS code are due to user/OS aliasing (Table.4)

  10. User and OS branch directions <= for “jack” Average =>

  11. OS-aware branch prediction K-PHT PHT Split (PHT) Predictor Split BHSR Predictor

  12. PHT Phil.1: Split BHSR Predictor Phil.2: Split (PHT) Predictor => 2K Kernel PHT + 50% of User PHT that of Phil.1 The author claims, “split BHSR predictor outperforms split (PHT) predictor.” Is it a FAIR Comparision ?

  13. “Better Model “ - as referred by me Phil.2: Split (PHT) Predictor with extra 2K Kernel PHT PHT 33% 31% 29% 25% 21% 22% 22% 21% 18% 17% 29% 28% 26% 24% 22% 12% 9% 6% 5% 4%

  14. Results Summary Branch Misprediction reduction: on avg. 16K entry split BHSR reduces by 33% split PHT reduces by 24% better split PHT model by 31% At times, split PHT predictor performs worst than the baseline: (ref. Table 6b) - “compress” needs more User PHT, but with split PHT it underperforms by -27% This could have been clearly avoided with better model. - “postgres.update” requires more kernel PHT, and thus with split PHT, underperforms by -10%. Better performs with split BHSR, as the PHT is dynamically shared across the User and the OS IPC improvements With G-share split BHSR : upto 8% with G-share split PHT: upto 7% with G-share split BHT (Better Model) with 16K PHT entries: upto 10% Bi-Mode OS-aware predictor only marginally (1% IPC gain) performs better compared to Bi-Mode predictor with similar size.

  15. Comments and Observations 1. Seperating U-BHSR and K-BHSR (and PHT) is on comparable with U-TSB and K-TSB seperation used in the modern OSs to alliveate TSB interferences. 2. More results with the “Better Model” would have been nice to compare realistic results with more comaprable Split PHT model. ( similar results as on Table 6a, 6b, Figure 12) 3. My assumption is that all predictors in Multi-Hybrid model (ie. GAs, Pshare) were also simulated with split BHSR for a fair comparision. 4. Authors have collected lots of data and done good amount of experiments to get motivated to go for OS-aware predictors. 5. Results are more closure to Bi-mode predictor, as Bi-Mode predictor also targets to resolve biased branch direction interferences with two PHTs. 6. Selecting the bias bit in Agree predictor would be critical for branch accuracies. Since here a simple and practical bias bit selection (first-time branch direction) is used the results are not very close to Bi-Mode and to OS-aware-predictors. Probably a better bias bit selection (most-time branch direction) would have produced different results.

More Related