Jump to ratings and reviews
Rate this book

Multicore Application Programming: for Windows, Linux, and Oracle Solaris

Rate this book
Write High-Performance, Highly-Scalable Multicore Applications for Any Leading Hardware and OS Environment

 

Programmers who know how to leverage today’s multicore processors can achieve remarkable performance improvements, but multicore programming has traditionally been viewed as complex and difficult. Multicore Application Programming is the a comprehensive, practical guide to high-performance multicore programming that any experienced developer can use.

 

Author Darryl Gove covers all leading approaches to virtualization on multiple leading platforms, including Linux, Oracle Solaris, Mac OS X, and Windows. Through practical examples, he illuminates the challenges involved in writing applications that fully utilize multicore features, helping you produce applications that are functionally correct, offer superior performance, and scale well to eight cores, sixteen cores, and beyond.

 

Gove reveals how specific hardware implementations impact application performance and shows how to avoid common potential programming pitfalls. Step by step, you’ll write applications that can handle large numbers of parallel threads, and you’ll master today’s most advanced parallelization techniques. You’ll learn how

Identify your best opportunities to use parallelism Share data safely between multiple threads Write applications using POSIX or Windows threads Take advantage of automatic parallelization and OpenMP Hand-code synchronization and sharing Overcome common obstacles to scaling Apply new approaches to writing correct, fast, scalable parallel code Multicore Application Programming isn’t wedded to a single approach or It is for every experienced C programmer working with any contemporary multicore processor in any leading operating system environment.

708 pages, Kindle Edition

First published November 9, 2010

Loading...
Loading...

About the author

Darryl Gove

8 books

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
0 (0%)
4 stars
0 (0%)
3 stars
1 (100%)
2 stars
0 (0%)
1 star
0 (0%)
Displaying 1 of 1 review
Profile Image for Jaewoo.
58 reviews
November 3, 2016
Linux 명령어
pmap : Memory Map of Application and Libraries
LD_DEBUG= flags : debug 아웃풋 수정 가능
Helgrind : detect DataRace
NamedPipes : pass data frome one process to another.
__thread Specifier : Thread-Locl Data Every time a thread referenced the variable count, it would access the value of the copy local to thatthread.
ulimit -s
PTHREAD_STACK_MIN : provide no space on the stack for local variables or making function
pthread_self() : to get its own handle, which it can then use to convert itself onto a detachedthread.
pthread_exit()
pthread_mutex_trylock()

-mt : compile option -> variable( ex. errno , etc) for thread.

collapse : openmp에 이 절을 스면 nested loop의 순서를 바꾸어 최적의 for를 만든다.
flush : openmp에서 모든 thread간 변수 동기를 맞춘다.

mfence : Ensures that all previous loads and stores are visible to the system before any future loads and stores become visible
sfence : mfence에서 store만
lfence : mfence에서 load만

asm volitile ("mfence":::"memory")
asm("":::"memory") : correctly order the loops

__sync_fetch_and_add

numactl : numactl 은 특정한 NUMA 스케줄링이나 메모리 배치 정책으로 프로세스를 실행시킨다. 정책은 명령어로 정해지고 모든 children 에게도 상속된다. 또한, 공유메모리 segments 나 파일에 지속적으로 작용한다.

sched_setaffinity() : sets the affinity of a thread
gettid() : the ID of calling thread.
Concurrent Queue : xmlns="http://www.w3.org/1999/xhtml" 1999 www.w3.org xhtml:sentenceText>스레드로부터 안전한 FIFO(선입선출) 방식 1999 www.w3.org xhtml:sentenceText>
xmlns="http://www.w3.org/1999/xhtml" 1999 www.w3.org xhtml:sentenceText> 1999 www.w3.org xhtml:sentenceText>

용어 정리
CMT(Chip MultiThreading)

Affinity - which keeps threads local to where they were previously executing.

TLB(Translation look-aside buffers) : that are used for converting virtual memory addresses to physical
ITLB(TLB for Instruction), DTLB(TLB for Data)

Super-scalar Execution : the ability to execute mutiple instructions per cycle. (펜티엄부터 가능)

Associativity of the cache : make it possible for a single cache line to map into more positions in the cache and therefore reduce the possibility of there being a conflict in the cache.

snooping : providing cache coherence. Each processor broadcasts the address that it wants to either read or write. The other processors watch for these broadcasts.

OoO(out-of-order) : enable the processor to make some forward progress while waiting for data from memory.

fork-join pattern : fork is the division of work between the threads, and the join is the point at which all the threads synchronize.

DataRaces : Miltiple threads use the same data item

contendedmutex

spinlock : Spin locks are essentially mutex locks. keep trying to acquire the lock without sleeping.

Semaphores : for a finite limit to a resource and a mechanism is needed to impose that limit.

Barriers : situations where a number of threads have to all complete their work before any of the threads can start on the next task.

thundering herd problem : where a number of threads are waiting for a condition to become true and only one thread can successfully proceed, so all the other thread end up using uncecessary resources.

ABAP Problem : if문이 true가 되고 A가 일하려는데 Context switch 되면서 if문을 false로 만들었지만 A는 모르고 일을 진행하는거

Oversubscription : There are too many active threads on a system.
This entire review has been hidden because of spoilers.
Displaying 1 of 1 review