TGViewer
ReverseEngineering ReverseEngineering @reverseengine · 1.33K subscribers
Post #1821 100
│
▼
Context Switch
│
▼
Thread B
│
├── Instruction X
├── Instruction Y
│
▼
Context Switch
│
▼
Thread A
│
└── Instruction 3

So, the execution timing of a program doesn't depend solely on its own code.

The Scheduler
and the overall system state also influence the scheduling of thread execution.

Process or Thread

There is a crucial point here:
In modern systems, the scheduler typically schedules the entity that actually runs on the CPU at the *thread* level,
rather than always treating the process as an indivisible unit.

For example:

Process A
├── Thread 1
├── Thread 2
└── Thread 3

Process B
├── Thread 1
└── Thread 2

The Scheduler
can select ready threads for execution; this becomes even more significant when we delve deeper into the topic of threads later.

A point regarding CPU Cores:
If we have a single core, only one thread can actually execute on that core at any given moment; however, through rapid switching between threads, it appears as though multiple programs are running simultaneously.

For example:

Time
│
├── Thread A
├── Thread B
├── Thread C
├── Thread A
└── Thread B

If we have multiple cores, multiple threads can actually execute simultaneously on different cores.
This is where the distinction between

Concurrency and Parallelism becomes important.


CPU Scheduling
refers to the kernel deciding which ready thread or process should be allocated the CPU.

Simply put:

Ready
│
▼
Scheduler
│
▼
Running
│
├── Time slice expires
│
▼
Preemption
│
▼
Context Switch
│
▼
Another thread or process

Key concepts in this section:

Scheduler
The component that selects the executable unit.

Ready Queue
The conceptual location for units ready to execute.

Preemption
Taking the CPU away from the currently executing unit.

Timer Interrupt
One of the mechanisms... ...that allow the kernel to check the status and reschedule

Context Switch
Swapping the execution state of the current unit and preparing the next one

Thread
A unit that, in modern systems, is typically scheduled directly for execution

@reverseengine
  • ❤ 2
More from @reverseengine
  1. Oct 15, 2026Reverse Engineer Anything v6.5.0 A tool for reverse engineering that allows AI agents to a…
  2. Oct 15, 2026Someone Used AI to Reverse-Engineer PS5 Security in Weeks: What Is REA? https://pub.toward…
  3. Oct 15, 2026How Dangerous Is REA (Reverse Engineer Anything) for Your App? https://21zerixpm.medium.co…
  4. Oct 15, 2026REA Is Impressive. But Reverse Engineering Was Never the New Part https://crizantlai.mediu…
  5. Oct 15, 2026QuarkslaB Dynamic binary Instrumentation https://qbdi.quarkslab.com/introduction @reversee…
  6. Oct 15, 2026angr’s documentation https://docs.angr.io/en/latest/search.html?q=Document&check_keywords=…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →