09_Practical Multicore programming

999 views

Published on

멀티코어 프로그래밍 개요

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
999
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
16
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

09_Practical Multicore programming

  1. 1. Practical Multi-core Multi-Game Programming (noerror@hitel.net) 2009.9.13
  2. 2. • – , – – – • Architect NEW JOB•• .
  3. 3. • – IO ( , ) • • IO – CPU ( ) • • (3 )
  4. 4. • 3 (from Getting More from Multicore / Ian Lewis) – BSP (Bulk Synchronous Processing) – CSP (Communicating Sequential Processing) – TASK POOL• IO – CPU 100% –
  5. 5. BSP(1)• BSP (Bulk Synchronized Process) – • • • • – – • – AI,
  6. 6. BSP(2)• Update Thread• : Coding for Buffer 0 Multiple Cores / Bruce Dawson & Chuck Buffer 1 Walbourn Render Thread
  7. 7. CSP• CSP (Communicating Sequential processing) – – • • (Sleep ) Anim Render Main A B Render Anim
  8. 8. Task Pool• TASK POOL – – Task(JOB) – CPU – CSP • Seirialize – Context Switching – Task Main Anim Anim Render Render Anim Render Main Thread 0 Anim Anim Render Render Anim Render Thread 1 Anim Anim Render Render Anim Render Thread 2 Anim Anim Render Render Thread 3 Anim Render
  9. 9. (recall)• – n • – IOCP• Context Switching – statck (context) – Context Switching
  10. 10. • IOCP• P2P••• PhysX•••
  11. 11. IOCP• IOCP – IOCP • – GQCS » – GQCS » Context Switching – » SQL Context Switching –
  12. 12. P2P• P2P , respose – mainloop • , , mainloop • ping (mainloop ping ) – , • Lock-Free FIFO QUEUE
  13. 13. (recall)• Lock-Free Queue – – => + ~ ( .) – ( : Saints Row Scheduler / Randall Turner)• STL – – ( )
  14. 14. • – – pseudo – mainloop IO => – sleep • CPU
  15. 15. (1)• – TerminateThread X • teminate ???
  16. 16. (2)• – signal
  17. 17. (recall)• – Semaphore • n – Mutex • Semaphore 1 – Critical Section (win32) • Mutex . Spinlock – Event (win32) • Mutex
  18. 18. PhysX• –• – , ,
  19. 19. (1)• , Proxy• pseudo ( – Threadmain )
  20. 20. (2)•• texture 100 ,
  21. 21. (3)• , ,• Task Pool Object Update Draw Job queue pseudo ( 1 Update , 2 Draw ??)
  22. 22. (1)• D3D Render ??• DrawPrimitive RenderState• – D3D ( ) Command Buffer , <- Unreal3 ( ) – D3D – D3D 11 Display List ^^
  23. 23. (2)• – Draw – DrawPrimitive (TLS )
  24. 24. • – Priority – Serialize• – IO – Task••
  25. 25. (recall)• – % – 40% 2CPU 1.25 , 25% . 30 => 37.5 ( , 4 43 ) GPU idle
  26. 26. /
  27. 27. • Coding for Multiple Cores, Bruce Dawson & Chuck Walbourn• Multicore Strategies for Games, Aaron Lanterman• Getting More from Multicore, Ian Lewis• Threading 3D Game Engine Basics, Henry Gabb and Adam Lake• Saints Row Scheduler, Randall Turner• Lockless Programming Considerations for Xbox 360 and Microsoft Windows, Bruce Dawson• An Optimistic Approach to Lock-Free FIFO Queues, Edya Ladan- Mozes and Nir Shavit• Developing Gears of War in Unreal Engine 3, Michael Capps• Multi-Threaded Rendering for Games, Matt Lees

×