Shared resource
A shared resource is data, an object, or another resource that can be accessed or used by multiple actors or execution contexts.
Grokking Concurrency
A shared object is a data or resource object accessed by multiple concurrent execution threads.
- How it is used
- Enables threads or concurrent tasks to exchange data through shared memory or storage.
- How deep it goes
- Explains access hazards, synchronization costs, and alternatives, but does not provide synchronization implementation steps.
- Examples
- Uses a process address space shared by threads and a NAS volume for MapReduce intermediate data.
- What you can do after
- Evaluate when shared data needs synchronization and when message passing could avoid shared memory.
Modern C, Third Edition
A shared object is an object whose storage and value can be accessed by more than one thread.
- How it is used
- Coordinates initialization, access, protection, and destruction when multiple threads use the same object.
- How deep it goes
- Explains initialization ordering, one-time initialization, cleanup, and protection choices, but does not develop memory-model internals.
- Examples
- Demonstrates a shared error log initialized with call_once and finalized through atexit or at_quick_exit handlers.
- What you can do after
- Operate shared C objects safely by ordering initialization, guarding one-time setup, protecting critical sections, and arranging cleanup.
Pro Angular 16
A shared object is an object instance made available to multiple application components so they can access common state or behavior.
- How it is used
- Coordinates common discount state and behavior between Angular components in a product-table application.
- How deep it goes
- Explains object creation, input passing, getters, setters, and two-way binding, but stops short of service injection.
- Examples
- Uses DiscountService, a discount editor, a discount display, and a product-table template.
- What you can do after
- Build shared component state by creating one object and passing it through Angular input properties.
Also covered in
- Distributed Machine Learning Patterns
- Modern C
- The Coder CafeIn early access (MEAP)
- Data for All
- Learn Concurrent Programming with Go
What to know first
- threadA thread is a distinct sequence of execution with its own control flow and state, managed or scheduled by a processor, runtime, or operating system.
- CPUA central processing unit (CPU) is a computer processor that executes program instructions and performs general-purpose computational operations.
- static storageStatic storage duration is the storage duration of an object whose lifetime extends throughout program execution.
Related concepts
- lockingused by · Locking is a synchronization technique that controls concurrent access to a shared resource or protected operation.
- threadused by · A thread is a distinct sequence of execution with its own control flow and state, managed or scheduled by a processor, runtime, or operating system.
- Model Servingused by · Model serving is the software infrastructure that hosts trained machine-learning models and handles inference requests, returning model outputs.
- race conditionused by · A race condition is a concurrency defect in which program behavior or results depend on the timing or ordering of interacting operations.
- semaphoreconfigured by · A semaphore is a synchronization primitive that uses a counter of available permits to coordinate operations or control concurrent access to a resource.
- synchronizationused by · Synchronization is the coordination of concurrent activities, events, or system states to establish required ordering, alignment, access, or consistency relationships.
Questions about shared resource
What is shared resource?
A shared resource is data, an object, or another resource that can be accessed or used by multiple actors or execution contexts.
Which Manning books explain shared resource?
Grokking Concurrency, Modern C, Third Edition and Pro Angular 16.
What should I know before learning shared resource?
Manning books that teach shared resource usually introduce thread, CPU and static storage first.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


