EasyManuals Logo

Intel ARCHITECTURE IA-32 User Manual

Intel ARCHITECTURE IA-32
568 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #374 background imageLoading...
Page #374 background image
IA-32 Intel® Architecture Optimization
7-28
Avoid Coding Pitfalls in Thread Synchronization
Synchronization between multiple threads must be designed and
implemented with care to achieve good performance scaling with
respect to the number of discrete processors and the number of logical
processor per physical processor. No single technique is a universal
solution for every synchronization situation.
The pseudo-code example in Example 7-5 (a) illustrates a polling loop
implementation of a control thread. If there is only one runnable worker
thread, an attempt to call a timing service API, such as Sleep(0), may be
ineffective in minimizing the cost of thread synchronization. Because
the control thread still behaves like a fast spinning loop, the only
runnable worker thread must share execution resources with the
spin-wait loop if both are running on the same physical processor that
supports Hyper-Threading Technology. If there are more than one
runnable worker threads, then calling a thread blocking API, such as
Sleep(0), could still release the processor running the spin-wait loop,
allowing the processor to be used by another worker thread instead of
the spinning loop.
A control thread waiting for the completion of worker threads can
usually implement thread synchronization using a thread-blocking API
or a timing service, if the worker threads require significant time to
complete. Example 7-5 (b) shows an example that reduces the overhead
of the control thread in its thread synchronization.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Intel ARCHITECTURE IA-32 and is the answer not in the manual?

Intel ARCHITECTURE IA-32 Specifications

General IconGeneral
Instruction Setx86
Instruction Set TypeCISC
Memory SegmentationSupported
Operating ModesReal mode, Protected mode, Virtual 8086 mode
Max Physical Address Size36 bits (with PAE)
Max Virtual Address Size32 bits
ArchitectureIA-32 (Intel Architecture 32-bit)
Addressable Memory4 GB (with Physical Address Extension up to 64 GB)
Floating Point Registers8 x 80-bit
MMX Registers8 x 64-bit
SSE Registers8 x 128-bit
RegistersGeneral-purpose registers (EAX, EBX, ECX, EDX, ESI, EDI, ESP, EBP), Segment registers (CS, DS, SS, ES, FS, GS), Instruction pointer (EIP), Flags register (EFLAGS)
Floating Point UnitYes (x87)

Related product manuals