Index
[SYMBOL]
[A]
[B]
[C]
[D]
[E]
[F]
[G]
[H]
[I]
[J]
[K]
[L]
[M]
[N]
[O]
[P]
[Q]
[R]
[S]
[T]
[U]
[V]
[W]
safety 2nd 3rd 4th [See also guidelines, encapsulation.] [See also updating, immutable objects.] [See also contention/contended, synchronization.] [See also thread(s).] cache implementation issues initialization guarantees for immutable objects idioms for JMM support liveness vs publication idioms for in task creation of mutable objects responsiveness vs as graceful vs. abrupt shutdown split ownership concerns subclassing issues testing goals tradeoffs in performance optimization strategies untrusted code behavior protection mechanisms saturation policies scalability 2nd algorithm comparison testing Amdahl's law insights as performance testing criteria client-side locking impact on concurrent collections vs. synchronized collections ConcurrentHashMap advantages 2nd CPU utilization monitoring enhancement reducing lock contention heterogeneous task issues hot field impact on intrinsic locks vs. ReentrantLock performance lock scope impact on locking during iteration risk of open call strategy impact on performance vs lock granularity reduction object pooling issues three-tier application model as illustration queue implementations serialization differences result cache building serialization impact on techniques for improving atomic variables nonblocking algorithms testing thread safety hazards for under contention as AQS advantage ScheduledThreadPoolExecutor as Timer replacement scheduling overhead performance impact of priority manipulation risks tasks sequential policy thread-per-task policy threads as basic unit of work stealing deques and
scope/scoped [See also lock(ing), granularity.] containers thread safety concerns contention atomic variable limitation of escaping publication as mechanism for lock narrowing, as lock contention reduction strategy synchronized block search depth-first breadth-first search vs parallelization of security policies and custom thread factory Selector non-interruptable blocking
semantics 2nd [See also guidelines, documentation.] [See also task(s), representation.] atomic arrays binary semaphores final fields of interruption of multithreaded environments ThreadLocal variable considerations reentrant locking ReentrantLock capabilities ReentrantReadWriteLock capabilities undefined of Thread.yield volatile weakly consistent iteration within-thread-as-if-serial Semaphore AQS use example use 2nd 3rd in BoundedBuffer example saturation policy use similarities to ReentrantLock state-based precondition management with semaphores 2nd as coordination mechanism binary mutex use counting permits, thread relationships SemaphoreOnLock example fair vs. nonfair performance comparison nonfair advantages of sendOnSharedLine example
sequential/sequentiality [See also concurrent/concurrency, errors.] asynchrony vs consistency event processing in GUI applications execution of tasks parallelization of orderly shutdown strategy page renderer example programming model task execution policy tests, value in concurrency testing threads simulation of serialized/serialization access object serialization vs timed lock use WorkerThread granularity throughput impact impact on HttpSession threadsafety requirements parallelization vs Amdahl's law scalability impact serial thread confinement 2nd sources identification of, performance impact
server [See also client(s).] applications context switch reduction 2nd design issues
service(s) 2nd [See also GUI (Graphical User Interface), applications.] [See also GUI (Graphical User Interface), frameworks.] logging as thread-based service example shutdown as cancellation reason thread-based stopping servlets framework thread safety requirements threads benefits for stateful, thread-safety issues atomicity liveness and performance locking stateless as thread-safety example session-scoped objects stateless thread safety concerns
set(s) [See also concurrent/concurrency, collections.] BoundedHashSet example CopyOnWriteArraySet as synchronized Set replacement safe publication use PersonSet example SortedSet ConcurrentSkipListSet as concurrent replacement TreeSet ConcurrentSkipListSet as concurrent replacement
shared/sharing 2nd [See also concurrent/concurrency, errors.] [See also guidelines, publication.]
data [See also page renderer examples.] access coordination, explicit lock use models, GUI application handling synchronization costs threads advantages vs. processes data structures as serialization source memory as coordination mechanism memory multiprocessors memory models mutable objects guidelines objects split data models state managing access to, as thread safety goal strategies ExecutorCompletionService use thread necessities and dangers in GUI applications volatile variables as mechanism for
shutdown 2nd [See also task(s), lifecycle.] abrupt JVM, triggers for limitations as cancellation reason cancellation and ExecutorService state graceful vs. abrupt tradeoffs hooks in orderly shutdown JVM and daemon threads logging service shutdown alternatives of thread-based services orderly strategies lifecycle method encapsulation logging service example 2nd one-shot execution service example support LifecycleWebServer example shutdownNow limitations logging service shutdown alternatives side-effects as serialization source freedom from importance for task independence synchronized Map implementations not available from Concurrent-HashMap signal ConditionBoundedBuffer example signal handlers as coordination mechanism
simplicity [See also strategies, design.] Java monitor pattern advantage of modeling threads benefit for performance vs in refactoring synchronized blocks simulations barrier use in single notification
[See notify.] [See signal.]
single shutdown hook [See also shutdown, hooks.] orderly shutdown strategy
single-thread(ed) 2nd [See also guidelines, threads.] [See also Thread.] as synchronization alternative as Timer restriction deadlock avoidance advantages subsystems GUI implementation as task execution disadvantages of executor use, concurrency prevention 2nd Singleton pattern ThreadLocal variables use with
size(ing) 2nd [See also configuration.] [See also instrumentation.] as performance testing goal bounded buffers determination of heterogeneous tasks pool core 2nd maximum task appropriate thread pools sleeping blocking state-dependent actions blocking state-dependent actions sockets as coordination mechanism synchronous I/O non-interruptable blocking reason
solutions 2nd 3rd 4th [See also policy(s), interruption.] [See also result(s).] [See also strategies, search.] [See also thread(s), termination.] SortedMap ConcurrentSkipListMap as concurrent replacement SortedSet ConcurrentSkipListSet as concurrent replacement space state
specification [See also guidelines, documentation.] correctness defined in terms of spell checking as long-running GUI task
spin-waiting 2nd 3rd [See also block(ing).] [See also busy-waiting.] as concurrency bug pattern split(ing) data models 2nd lock Amdahl's law insights as lock granularity reduction strategy ServerStatus examples ownership stack(s) address space thread creation constraint
confinement 2nd 3rd [See also guidelines, confinement.] [See also guidelines, encapsulation.] nonblocking size search strategy impact trace thread dump use stale data improper publication risk race condition cause
starvation 2nd 3rd 4th 5th [See also analysis, deadlock.] [See also livelock.] [See also performance, liveness.] [See also analysis, performance.] as liveness failure locking during iteration risk of thread starvation deadlock 2nd thread starvation deadlocks
state(s) 2nd 3rd 4th 5th 6th [See also cache/caching, implementation issues, atomic/atomicity.] [See also guidelines, encapsulation.] [See also task(s), lifecycle.] [See also task(s), representation.] [See also guidelines, safety.] [See also memory, visibility.] application framework threads impact on code vs thread-safety focus dependent classes classes, building operations operations, blocking strategies operations, condition queue handling operations, managing task freedom from, importance of encapsulation breaking, costs of invariant protection use synchronizer role thread-safe class use lifecyle ExecutorService methods locks control of logical management AQS-based synchronizer operations managing access to as thread safety goal modification visibility role mutable coordinating access to object components of remote and thread safety ownership class design issues servlets with thread-safety issues, atomicity thread-safety issues, liveness and performance concerns thread-safety issues, locking space stateless servlet as thread-safety example task impact on Future.get intermediate, shutdown issues transformations in puzzle-solving framework example transition constraints variables condition predicate use independent 2nd independent, lock splitting safe publication requirements stateDependentMethod example static initializer safe publication mechanism 2nd static analysis tools
statistics gathering [See also instrumentation.] adding to thread pools ThreadPoolExecutor hooks for status flag volatile variable use with interrupted thread shutdown issues
strategies 2nd 3rd 4th 5th [See also strategies, design.] [See also guidelines, documentation.] [See also design, of thread-safe classes, guidelines.] [See also policy(s).] [See also task(s), representation.] atomic variable use cancellation Future use deadlock avoidance 2nd delegation vehicle tracking example design interruption policy documentation use annotations value end-of-lifecycle management 2nd InterruptedException handling interruption handling 2nd Future use lock splitting locking ConcurrentHashMap advantages monitor vehicle tracking example parallelization partitioning performance improvement program design order correctness then performance search stack size impact on shutdown lifecycle method encapsulation logging service example one-shot execution service example poison pill split ownership safety thread safety delegation thread-safe class extension stream classes client-side locking with thread safety String immutability characteristics
striping [See also lock(ing), contention.] lock 2nd Amdahl's law insights ConcurrentHashMap use structuring thread-safe classes object composition use subclassing safety issues submit, execute vs. uncaught exception handling suspension, thread costs of 2nd elimination by CAS-based concurrency mechanisms Thread.suspend, deprecation reasons swallowing interrupts as discouraged practice bad consequences of when permitted
Swing [See also application(s), GUI.] listeners single-thread rule exceptions methods single-thread rule exceptions thread confinement confinement in use use, safety concerns and untrusted code protection mechanisms in SwingWorker long-running GUI task support
synchronization/synchronized 2nd 3rd 4th [See also serialized/serialization, access.] [See also concurrent/concurrency, errors.] [See also iterators/iteration, locking.] [See also guidelines, safety.] allocation advantages vs bad practices double-checked locking blocks Java objects as cache implementation issues collections concurrent collections vs problems with concurrent building blocks contended correctly synchronized program data sharing requirements for encapsulation hidden iterator management through requirement for thread-safe classes 'fast path' CAS-based operations vs costs of immutable objects as replacement inconsistent as concurrency bug pattern memory performance impact of memory visibility use of operation ordering role piggybacking policy documentation requirements encapsulation, client-side locking violation of race condition prevention with requirements, impact on class extension requirements, impact on class modification shared state requirements for ReentrantLock capabilities requirements synchronization policy component thread safety need for types
[See memory, barriers.] [See block(ing).] [See FutureTask.] [See latch(es).] [See semaphores.] uncontended volatile variables vs wrapper client-side locking support synchronizedList (Collections) safe publication use
synchronizer(s) 2nd 3rd 4th 5th 6th [See also Semaphore.] [See also CyclicBarrier.] [See also latch(es), FutureTask.] [See also Exchanger.] [See also CountDownLatch.] behavior and interface building with AQS with condition queues synchronous I/O non-interruptable blocking SynchronousQueue performance advantages thread pool use of 2nd
|