Shadowing Practice: FANG Interview Question | Process vs Thread - Learn English Speaking with Video

Choose a practice mode

Each mode opens a full-screen practice room.

47 sentences
If sentences are too short or too long, click Edit to adjust them.
1
What's the difference between process and thread?
2
This is a common interview question.
3
Let's take a look.
4
To better answer this question, let's first understand what a program is.
5
A program is an executable file.
6
It contains the code or a set of processing instructions that is stored as a file on disk.
7
When the code in the program is loaded into memory and executed by the processor, it becomes a process.
8
An active process also includes the resources the program needs to run.
9
These resources are managed by the operating system.
10
Some examples are processor registers, program counters, stack pointers, memory pages assigned to the process for its heap and stack,
11
etc. There is an important property of a process that is worth mentioning.
12
Each process has its own memory address space.
13
One process cannot corrupt the memory space of another process.
14
This means that when one process malfunctions, other processes keep running.
15
Chrome is famous for taking advantage of this process isolation by running each tab in its own process.
16
When one tab misbehaves due to a bug or a malicious attack, other tabs are unaffected.
17
Now what is a thread?
18
A thread is the unit of execution within a process.
19
A process has at least one thread.
20
It is called the main thread.
21
It is not uncommon for a process to have many threads.
22
Each thread has its own stack.
23
Earlier we mentioned registers, program counters, and stack pointers as being part of a process.
24
It is more accurate to say that those things belong to a thread.
25
Threads within a process share a memory address space.
26
It is possible to communicate between threads using that shared memory space.
27
However, one misbehaving thread could bring down the entire process.
28
How does the operating system run a thread or process on a CPU?
29
This is handled by context switching.
30
During a context switch, one process is switched out of the CPU so another process can run.
31
The operating system stores the states of the current running process, so the process can be restored and resume execution at a later point.
32
It then restores the previously saved states of a different process and resumes execution for that process.
33
Contact switching is expensive.
34
It involves saving and loading of registers, switching out memory pages, and updating various kernel data structures.
35
Switching execution between threads also requires context switching.
36
It is generally faster to switch context between threads than between processes.
37
There are fewer states to track, and more importantly, since threads share the same memory address space,
38
there is no need to switch out virtual memory pages, which is one of the more expensive operations during a context switch.
39
Contact switching is so costly, there are other mechanisms to try to minimize it, some examples of fibers and coroutines.
40
These mechanisms trace complexity for even lower contact switching cost.
41
In general, they are cooperatively scheduled, that is, they must yield control for others to run.
42
In other words, the application itself handles task scheduling.
43
It is the responsibility of the application to make sure a long -running task is broken up by yielding periodically.
44
This concludes our discussion of process and threads.
45
If you'd like to learn more about system design, check out our books and weekly newsletter.
46
Please subscribe if you learn something new.
47
Thank you so much and we'll see you next time.

Download App

Everything you need to speak fluently

AI PronunciationScore every sentence
IPA PracticeMaster every sound
VocabularyBuild your word bank
Vocab GameLearn while playing

Same Channel

FOR YOU

Recommend Video

Vocabulary and speaking notes for this lesson

This speaking lesson is built on the video “FANG Interview Question”. The speaker keeps coming back to these words: process, thread, memory, switching, program. This video has 47 sentences and 565 words to shadow. The speech runs for 3:41. The speaker talks at a natural 153 words per minute, close to everyday conversation. Only 78% of the words are among the 3,000 most common in English, so the vocabulary is demanding.

Key vocabulary in this video

15 words from the video worth learning, with pronunciation and meaning:

WordPronunciationMeaning
thread noun/ˈθɹɛd/A cord formed by spinning or twisting together textile fibers or filaments into one or more continuous strands, typically used in needlework.
execution noun/ˌɛk.sɪˈkjuː.ʃən/The act, manner or style of executing (actions, maneuvers, performances).
stack noun/stæk/A large pile of hay, grain, straw, or the like, larger at the bottom than the top, sometimes covered with thatch.
resource noun/ɹɪˈzɔːs/Something that one uses to achieve an objective, e.g. raw materials or personnel.
mechanism noun/ˈmɛk.ə.nɪ.zəm/Any mechanical means for the conversion or control of motion, or the transmission or control of power.
restore verb/ɹɪˈstoɹ/To reestablish, or bring back into existence.
yield verb/jiːld/To give as a result or outcome; to produce or render.
resume verb/ˈɹɛz.ə.meɪ/To start (something) again that has been stopped or paused from the point at which it was stopped or paused; continue, carry on.
processor noun/ˈpɹɑˌsɛsɚ/A person or institution who processes things (foods, photos, applications, etc.).
pointer noun/ˈpɔɪn.təɹ/One who points.
belong verb/bɪˈlɒŋ/To have its proper place.
virtual adjective/ˈvɜɹt͡ʃuəl/In effect or essence, rather than in fact or reality; also, imitated, simulated.
fewer/ˈfjuː.ɚ/Less; a smaller amount of something non-integral commonly expressed as an integer
involve verb/ɪnˈvɑlv/To have (something) as a component or a related part; to comprise, to include.
communicate verb/kəˈmjuːnɪkeɪt/To impart or transmit (information or knowledge) to someone; to make known, to tell.

Phrasal verbs you will hear

WordMeaning
switch out verbTo exchange or swap one (person, thing, etc.) for another.
break up verbTo break or separate into pieces.
bring down verbTo make (a ruler or government) lose their position of power.
check out verbTo record the departure or withdrawal of someone or something (such as guests, employees, books, etc.).

Pronunciation to watch

  • The “sh” and “zh” sounds: execution /ˌɛk.sɪˈkjuː.ʃən/, instruction /ɪnˈstɹʌkʃən/, isolation /ˌaɪsəˈleɪʃən/, malicious /məˈlɪʃəs/, malfunction /ˌmælˈfʌŋk.ʃən/
  • Long words — get the stress right: execution /ˌɛk.sɪˈkjuː.ʃən/, mechanism /ˈmɛk.ə.nɪ.zəm/, communicate /kəˈmjuːnɪkeɪt/, importantly /ɪmˈpɔɹ.tənt.li/, complexity /kəmˈplɛk.sɪ.ti/

How to practise with this video

  1. Listen to the whole video once without speaking and note the words you do not know.
  2. Start at 0.75× speed, shadow it sentence by sentence, then go back to normal speed once it feels easy.
  3. Record yourself and compare with the original, paying attention to words like thread, execution, stack.

What is the Shadowing Technique?

Shadowing is a science-backed language learning technique originally developed for professional interpreter training and popularized by polyglot Dr. Alexander Arguelles. The method is simple but powerful: you listen to native English audio and immediately repeat it out loud — like a shadow following the speaker with just a 1–2 second delay. Unlike passive listening or grammar drills, shadowing forces your brain and mouth muscles to simultaneously process and reproduce real speech patterns. Research shows it significantly improves pronunciation accuracy, intonation, rhythm, connected speech, listening comprehension, and speaking fluency — making it one of the most effective methods for IELTS Speaking preparation and real-world English communication.

Shadowing technique: read the full step-by-step guide →