Introduction
Early computer systems improved performance primarily by increasing the clock speed of processors. However, as processors became faster, engineers encountered major physical limitations:
Excessive heat generation
High power consumption
Signal propagation delays
Diminishing performance gains
Eventually, simply increasing clock frequency became impractical.
To continue improving computational performance, processor manufacturers introduced multicore processors.
A multicore processor contains multiple independent processing cores within a single physical CPU chip. Instead of relying on one extremely fast processor, systems achieve performance through parallel execution across multiple cores.
Modern operating systems are heavily designed around multicore architectures because nearly all modern devices now contain multicore CPUs, including:
Laptops
Smartphones
Servers
Cloud infrastructure
Gaming systems
Supercomputers
Understanding multicore processing is extremely important because modern operating systems must efficiently coordinate parallel execution across multiple cores while maintaining synchronization, fairness, and performance.
What is Multicore Processing?
Multicore processing refers to the use of multiple CPU cores within a single processor to execute tasks concurrently and improve computational performance.
Each core can:
Execute instructions independently
Run separate threads/processes
Share system resources with other cores
Core Idea
Multiple processing cores execute tasks simultaneously
Important Insight
Multicore systems improve performance through parallelism rather than only increasing clock speed
What is a Core?
A core is an independent processing unit capable of:
Fetching instructions
Decoding instructions
Executing operations
Managing execution state
A multicore CPU may contain:
2 cores (dual-core)
4 cores (quad-core)
8 cores
64+ cores in servers
Why Multicore Processing Became Necessary
Single-core scaling encountered limitations.
Problems with Higher Clock Speeds
Increased heat
Excessive power usage
Hardware reliability issues
Multicore Solution
Instead of:
One extremely fast core
Use:
Multiple moderately fast cores
This enables:
Parallel execution
Better energy efficiency
Improved throughput
Operating System Role in Multicore Systems
The operating system plays a critical role in multicore processing.
Responsibilities include:
Scheduling tasks across cores
Synchronization management
Load balancing
Resource sharing
Cache coordination
Without OS coordination:
Some cores idle
Some overloaded
Performance wasted
Parallelism in Multicore Systems
Multicore processing enables:
Parallel execution
Multiple instructions execute simultaneously.
Types of Parallelism
1. Task Parallelism
Different tasks run on different cores.
Example:
Browser on Core 1
Music player on Core 2
2. Data Parallelism
Same operation applied to different data sets simultaneously.
Example:
Image processing
Scientific computation
Important Insight
Multicore systems exploit parallelism to improve throughput and responsiveness
Multithreading and Multicore Processing
Threads are extremely important in multicore systems.
Single-Core System
Threads execute one at a time through context switching.
Multicore System
Different threads may execute truly simultaneously on different cores.
Example
Four-core processor:
Four threads execute concurrently
Symmetric Multiprocessing (SMP)
Most modern multicore systems use:
Symmetric Multiprocessing
Characteristics:
All cores equal
Shared memory access
Shared operating system
OS schedules tasks dynamically across cores.
Important Insight
SMP systems allow all processors to share memory and operating system resources equally
Asymmetric Multiprocessing (AMP)
Less common model.
Characteristics:
One master core controls others
Specialized task allocation
Used in:
Embedded systems
Specialized hardware
CPU Scheduling in Multicore Systems
Scheduling becomes more complex in multicore environments.
OS must decide:
Which task runs
On which core
For how long
Scheduling Goals
Maximize CPU utilization
Balance workload
Reduce latency
Improve cache performance
Load Balancing
Critical multicore concept.
OS distributes tasks evenly among cores.
Example
Without load balancing:
Core 1 overloaded
Core 2 idle
With balancing:
Work distributed efficiently
Types of Load Balancing
Push Migration
OS actively moves tasks between cores.
Pull Migration
Idle core pulls work from busy core.
Processor Affinity
Sometimes keeping process on same core improves performance.
Reason:
Cache reuse
This concept called:
Processor affinity
Types
Soft Affinity
OS prefers same core but may migrate process.
Hard Affinity
Process restricted to specific core(s).
Cache Memory in Multicore Systems
Modern multicore CPUs contain:
L1 cache
L2 cache
L3 cache
Caches improve speed by reducing memory access latency.
Shared vs Private Caches
Private Cache
Dedicated to individual core.
Shared Cache
Accessible by multiple cores.
Cache Coherence Problem
Major multicore challenge.
Suppose:
Core 1 modifies variable
Core 2 still has old cached value
This creates inconsistency.
Cache Coherence Protocols
Ensure all cores see consistent memory values.
Examples:
MESI protocol
Important Insight
Cache coherence maintains consistent memory views across multiple cores
Synchronization in Multicore Systems
Multiple cores may access shared data simultaneously.
This creates:
Race conditions
Data inconsistency
OS and applications use synchronization mechanisms:
Mutexes
Semaphores
Spinlocks
Monitors
Example
Two cores increment same variable simultaneously:
Incorrect results possible without synchronization
False Sharing
Performance issue in multicore systems.
Occurs when:
Independent variables share same cache line
Causes unnecessary cache invalidation.
Hyperthreading vs Multicore
Students often confuse these concepts.
Multicore
Multiple physical cores.
Hyperthreading
Single core appears as multiple logical processors.
Intel calls this:
Simultaneous Multithreading (SMT)
Important Insight
Hyperthreading increases utilization of one core, while multicore provides true parallel physical execution
NUMA in Multicore Systems
Large multicore systems may use:
Non-Uniform Memory Access (NUMA)
Memory access speed depends on:
Which core accesses which memory region
OS must optimize:
Memory placement
Scheduling
Scalability Challenges
Adding more cores does not always improve performance linearly.
Reasons:
Synchronization overhead
Shared resource contention
Sequential code portions
Amdahl’s Law
Very important concept.
States:
Speedup limited by sequential portion of program
Even with many cores:
Non-parallel code becomes bottleneck.
Multicore Processing in Mobile Systems
Smartphones commonly use:
Big.LITTLE architectures
Combines:
High-performance cores
Power-efficient cores
Advantages:
Better battery life
Adaptive performance
Multicore in Cloud Computing
Cloud servers may contain:
Hundreds of cores
Used for:
Virtualization
Distributed computing
Massive parallel workloads
Real-World Example
Suppose user:
Watches video
Downloads file
Runs browser
Plays music
OS schedules:
Different threads/processes across multiple cores
System remains responsive because:
Tasks execute concurrently.
Advantages of Multicore Processing
1. Better Performance
Parallel execution increases throughput.
2. Improved Responsiveness
Multiple applications run smoothly.
3. Energy Efficiency
Moderate-speed cores more efficient than one ultra-fast core.
4. Scalability
Supports larger workloads.
Challenges of Multicore Processing
1. Synchronization Complexity
Concurrent access difficult.
2. Cache Coherence
Maintaining consistency expensive.
3. Scheduling Complexity
Efficient load balancing required.
4. Parallel Programming Difficulty
Writing scalable parallel programs challenging.