Technical Article

借助线程局部存储减少同步处理

借助线程局部存储减少同步处理 (PDF 241KB)

摘要

同步化处理通常是一个昂贵的操作,它限制一个多线程程序的性能。 使用线程局部数据结构来代替由线程共享的数据结构可在某些情况下减少同步化处理,使一个程序运行得更快。

本文是“英特尔多线程应用开发指南”系列的一部分,该系列介绍了针对英特尔® 平台开发高效多线程应用的指导原则。

背景

当数据结构由一组线程共享时,至少有一个线程写入其中,线程之间的同步化处理有时需要确保是否所有线程均会看到一致的共享数据。 这种情况下,线程的一个典型同步化访问制度是一个线程获取锁,读取或写入共享数据结构,然后释放锁。

  • Parallel Computing
  • Threading
  • 避免线程之间发生堆冲突

    避免线程之间发生堆冲突 (PDF 256KB)

    摘要

    由于系统运行时库使用锁定的方式同步对堆的访问,因此从系统堆分配内存的操作成本非常高。 对于锁的争用限制了多线程的性能优势。 要解决这个问题,可采用避免使用共享锁的分配战略,或使用第三方堆管理器。

    本文是“英特尔多线程应用开发指南”系列的一部分,该系列介绍了针对英特尔® 平台开发高效多线程应用的指导原则。

    背景

  • Microsoft Windows* 8.x
  • Server
  • Intermediate
  • Intel® Parallel Studio XE Composer Edition
  • Intel® VTune™ Amplifier
  • synchronization
  • heap contention
  • dynamic memory allocation
  • lock contention
  • stack allocation
  • Parallel Computing
  • Threading
  • Образец кода Enhanced Photography для камеры Intel® RealSense™ R200

    This article and sample application show you how to use the Intel® RealSense™ camera (R200) and the Enhanced Photography functionality that is part of the Intel® RealSense™ SDK. The article separates the Intel RealSense SDK functionality from the GUI layer code to make it easier to focus on the R200 Enhanced Photography functionality.
  • Microsoft Windows* 10
  • Microsoft Windows* 8.x
  • Intel® RealSense™ Technology
  • C#
  • Beginner
  • Intel® RealSense™ SDK
  • Intel® RealSense™ Technology
  • Приступая к работе с технологией Intel® Active Management (AMT)

    Looking to get started with Intel® Active Management Technology (Intel® AMT)? This article provides an overview of the features, as well as information on minimum system requirements, configuration of an Intel AMT client, and the developer tools available to help create applications for Intel AMT.
  • Microsoft Windows* (XP, Vista, 7)
  • Microsoft Windows* 10
  • Microsoft Windows* 8.x
  • Business Client
  • Intel® AMT Software Development Kit
  • AMT 11
  • Intel® Active Management Technology
  • Intel® vPro™ Technology
  • Intel® Software Guard Extensions, серия учебных материалов: часть 1, Intel® SGX Foundation

    This first article in the Intel® Software Guard Extensions (Intel® SGX) tutorial series is a brief overview of the technology. Learn how Intel SGX can protect your application's private information, including passwords, account numbers, financial information, encryption keys, and health records.
  • Business Client
  • Windows*
  • Software Guard Extensions
  • Advanced Bitrate Control Methods in Intel® Media SDK

    In the world of media, there is a great demand to increase encoder quality but this comes with tradeoffs between quality and bandwidth consumption. This article addresses some of those concerns by discussing advanced bitrate control methods, which provide the ability to increase quality (relative to legacy rate controls) while maintaining the bitrate constant using Intel® Media SDK/ Intel® Media Server Studio tools.
  • Partners
  • Professional
  • Professors
  • Students
  • Linux*
  • Microsoft Windows* (XP, Vista, 7)
  • Microsoft Windows* 10
  • Microsoft Windows* 8.x
  • Server
  • Windows*
  • C/C++
  • Advanced
  • Intermediate
  • Intel® Media Server Studio
  • Media SDK for Windows*
  • Media Processing
  • Subscribe to Technical Article