跟讀練習: FANG Interview Question | Process vs Thread - 通過影片學習英語口語

選擇練習模式

每種模式都會開啟全屏練習室。

47 句
如果句子過短或過長,請點選 Edit 進行調整。
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.

下載應用

流利口語所需的一切

AI 發音評分逐句打分
音標練習掌握每個音
詞彙學習建立你的詞庫
詞彙遊戲邊玩邊學

同頻道

FOR YOU

推薦影片

本課的詞彙與口語要點

這節口語課以影片“FANG Interview Question”為素材。 影片中反覆出現的詞有:process, thread, memory, switching, program。 這段影片共有 47 個句子、565 個單詞可供跟讀。 講話部分時長為 3:41。 說話人語速自然,每分鐘約 153 個詞,接近日常對話。 只有 78% 的單詞屬於英語最常用的 3,000 詞,詞彙難度較高。

影片中的重點詞彙

影片中 15 個值得學習的單詞,附發音和釋義:

單詞發音釋義
thread 名詞/ˈθɹɛd/線 /線
execution 名詞/ˌɛk.sɪˈkjuː.ʃən/執行 /執行, 實行 /實行
stack 名詞/stæk/堆
resource 名詞/ɹɪˈzɔːs/資源 /資源
mechanism 名詞/ˈmɛk.ə.nɪ.zəm/機械 /機械, 機構 /機構
restore 動詞/ɹɪˈstoɹ/恢復 /恢復
yield 動詞/jiːld/產量 /產量, 產生 /產生
resume 動詞/ˈɹɛz.ə.meɪ/恢復 /恢復, 重新開始 /重新開始
pointer 名詞/ˈpɔɪn.təɹ/教鞭
belong 動詞/bɪˈlɒŋ/屬於 /屬於
fewer/ˈfjuː.ɚ/較少 /較少, 更少
trace 名詞/tɹeɪs/痕跡 /痕跡
instruction 名詞/ɪnˈstɹʌkʃən/教導 /教導
importantly 副詞/ɪmˈpɔɹ.tənt.li/重要的是...
complexity 名詞/kəmˈplɛk.sɪ.ti/複雜性 /複雜性

影片中出現的短語動詞

單詞釋義
check out 動詞退房

需要注意的發音

  • “sh” 和 “zh” 音: 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/
  • 長單詞——注意重音位置: 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/

中文母語者容易讀錯的音:

  • /v/ — 不要讀成 /w/,上齒輕觸下唇: virtual /ˈvɜɹt͡ʃuəl/, involve /ɪnˈvɑlv/
  • 詞尾子音 — 要讀清楚,後面不要加母音: thread /ˈθɹɛd/, stack /stæk/, resource /ɹɪˈzɔːs/, yield /jiːld/, involve /ɪnˈvɑlv/
  • /r/ 和 /l/ 的區別: virtual /ˈvɜɹt͡ʃuəl/, importantly /ɪmˈpɔɹ.tənt.li/

如何用這段影片練習

  1. 先完整聽一遍影片,不要開口,記下不認識的單詞。
  2. 先用 0.75 倍速逐句跟讀,熟練之後再回到正常速度。
  3. 錄下自己的聲音並與原聲對比,特別注意 thread, execution, stack 這類單詞。

什麼是跟讀法?

跟讀法 (Shadowing) 是一種有科學依據的語言學習技巧,最初開發用於專業口譯員的培訓,並由多語言者Alexander Arguelles博士普及。這個方法簡單而強大:您在聽英語母語原聲的同時立即大聲重複——就像是一個延遲1-2秒緊跟說話者的影子。與被動聽力或語法練習不同,跟讀法強迫您的大腦和口腔肌肉同時處理並模模擬實的講話模式。研究表明它能顯著提高發音準確性,語調,節奏,連讀,聽力理解和口語流利度——使其成為雅思口語備考和真實英語交流最有效的方法之一。

影子跟讀法: 閱讀完整分步指南 →