One at a time一張做完再做下一張
The chef finishes each order before starting the next. How long does the last order wait before anything happens to it?
廚師把一張做完才開始下一張。最後那一張要等多久,才開始有進展?
How Computers Work · Unit 3 · Lesson 11 · 電腦概論 單元三 第十一課
One chef, four orders, and a rule: work on one for a moment, then move to the next. Watch the chef take turns in 3D, change how long each turn lasts, and see what it costs to switch. Then tune the turns for three programs so the music never breaks up, and decide which jobs belong to the operating system.
一位廚師、四張點單,還有一條規則:每張做一下,就換下一張。在 3D 裡看廚師怎麼輪流,改一改每一輪做多久,看看換手要付出什麼代價。接著替三個程式調出剛好的長短,讓音樂不會斷斷續續,再分辨哪些工作是作業系統的。
A processor can do only one thing at a time. The operating system is the program that lets many programs share it: each one gets a short turn, then waits while the others have theirs. The turns come around so quickly that everything seems to run at once. The operating system also shares out memory, files, and devices.
處理器一次只能做一件事。作業系統是讓很多程式共用處理器的那個程式:每個程式輪到一小段時間,然後等別的程式輪完。輪得夠快,看起來就像全部同時在跑。作業系統也負責分配記憶體、檔案和各種裝置。
3D Model · 3D 模型
The chef is the processor. The orders on the counter are programs, and each one needs 12 beats of work. The chef can work on only one order at a time. Choose how many orders there are and how many beats the chef spends on each before moving on, then press Start. Watch the bars rise, and watch what happens while the chef is walking from one order to the next.
廚師是處理器。檯上的點單是程式,每張要做 12 拍。廚師一次只能做一張。選好有幾張點單、廚師每張做幾拍就換下一張,然後按「開始做」。看進度柱往上長,也注意看廚師從一張走到下一張的那段時間發生了什麼。
Drag to turn · 拖曳旋轉
This 3D model needs WebGL, which this browser does not support. The buttons, the progress bars, and the counters below still work, and so do the reading and the games.
這個瀏覽器不支援 WebGL,無法顯示 3D 模型;下面的按鈕、進度條和計數照樣能用,課文和小遊戲也都能用。
A teaching model. A “beat” here is just a unit for counting; it is not a real length of time. In a real computer each turn is very short, and the encyclopedia says only that it may be a fraction of a second. The rule that decides the turns belongs to the operating system, which is itself a program. Real programs also spend much of their time waiting, for a key or for data, and while they wait they do not need the processor. And many computers have several processor cores, so a few things really can happen at once.
這是教學用的示意模型。這裡的「拍」只是用來數的單位,不是真正的時間長度。真的電腦裡,每一輪都很短,百科全書只說它可能是幾分之一秒。決定怎麼輪的規則屬於作業系統,而作業系統自己也是一個程式。真的程式還有很多時間是在等——等你按鍵、等資料——等的時候不需要處理器。另外,很多電腦有好幾個處理器核心,所以真的有幾件事可以同時進行。
Model and code are drawn and programmed by My Culture Connect. Every number on this page is checked in tools/computers/test/sched.test.mjs.
模型與程式由人師教育協會自行繪製、撰寫;這一頁出現的每一個數字都有自動測試(tools/computers/test/sched.test.mjs)。
Reading · 英文閱讀
Right now a computer near you may be playing music, showing a web page, and waiting for someone to type. Yet in Lesson 6 you saw that a processor carries out one instruction at a time. So how can it do three things at once? The answer is that it does not. It only looks that way.
There is one program in charge of all the others: the operating system. An encyclopedia describes it as a program that manages a computer’s resources, especially the way they are shared among other programs. The resources are the processor, the memory, the storage, and the devices. Windows, Android, and iOS are operating systems.
Think of one chef with four orders. The chef cannot cook them all at once, so the chef works on one for a moment, puts it down, and moves to the next. The operating system does the same with the processor. Each program is allowed to use it for a limited time, perhaps a fraction of a second. Then it must give up control and wait for its next turn. The turns come around so quickly that every program seems to be running all the time.
Switching is not free. While the chef is putting one order down and picking up the next, nothing is being cooked. In the same way, switching between programs uses the processor too. If the turns are very long, a program at the back of the line waits a long time, and music would break up. If the turns are very short, too much time goes to switching. The operating system has to find a balance.
Sharing the processor is only one of its jobs. The operating system also decides which program gets which part of memory, and it keeps programs from interfering with each other. When memory fills up, it is the operating system that moves things out to storage, as you saw in Lesson 7. It keeps track of where every file is. And it stands between programs and devices: in Lesson 8, it was the operating system that turned a key number into a character.
Most programs finish a task and stop. An operating system keeps running until the computer is turned off. The first computers had none: they ran one program at a time, and a human operator looked after everything else. Today many computers have several processor cores, so a few things really can happen at the same moment. But there are usually many more programs than cores, so taking turns is still how it works.
Questions · 閱讀理解
How can a computer seem to do several things at once when the processor does one thing at a time?
What goes wrong if the turns are very long? What goes wrong if they are very short?
Name three things, besides sharing the processor, that an operating system looks after.
Words & Phrases · 生字及片語
Quick Check · 小測驗
1. What is an operating system?
2. How does one processor seem to run many programs at once?
3. What happens while the processor is switching from one program to another?
4. According to the reading, what goes wrong when turns are very long?
5. Which of these is a job of the operating system?
Try It in the Model · 在模型裡試試
Then try two or three orders with turns of 6 beats, and guess the finishing beat before you press Start.
接著試試兩張或三張點單、一次做 6 拍,按「開始做」之前先猜猜第幾拍做完。
The chef finishes each order before starting the next. How long does the last order wait before anything happens to it?
廚師把一張做完才開始下一張。最後那一張要等多久,才開始有進展?
Now every bar rises a little at a time. Everything finishes later than before. What did the chef gain in return?
現在每根柱子都一點一點往上長。全部做完的時間比剛才晚。廚師換來了什麼?
Watch the “spent switching” counter. About how much of the chef’s time goes to walking?
注意看「花在換手」的計數。廚師大約有多少時間花在走路上?
With one program there is nothing to switch to. How many beats are lost?
只有一個程式,就沒有別的可以換。浪費了幾拍?
Try It · 自己試試
Three programs share one processor: a download, an essay, and music. Music is special: if it waits too long for its turn, the sound breaks up. Move the slider to change how long each turn lasts, and look at the colored strip, which shows who has the processor from start to finish.
三個程式共用一個處理器:下載、作文、音樂。音樂比較特別:如果等太久才輪到,聲音就會斷斷續續。拉動滑桿,改變每一輪的長短,再看那條彩色的時間軸——它顯示從頭到尾,處理器在誰手上。
short turns · 短long turns · 長
Download · 下載 Essay · 作文 Music · 音樂 switching · 換手
The numbers here are made up for the example: the beats, the work each program needs, and the rule that music breaks up after a wait of more than 10 beats. A real operating system uses more complicated rules than simple turns. The trade-off is real, though: shorter turns mean shorter waits and more switching.這裡的數字是為了舉例自己訂的:拍、每個程式需要的工作量,還有「音樂等超過 10 拍就會斷」這條規則。真的作業系統用的規則比單純輪流複雜。但這個取捨是真的:每一輪越短,等的時間越短,換手也越多。
Game · 小遊戲
Eight jobs. Some are done by an ordinary program, the kind you open and use. Others are done by the operating system, working behind them all. Decide which is which.
一共八件工作。有些是一般的程式做的,就是你打開來用的那種;有些是作業系統做的,它在所有程式的背後工作。分分看。
Right on the first try · 第一次就答對 0 / 0
Stories Behind Operating Systems · 作業系統的故事
Four short stories about the program behind the programs.
關於「程式背後的那個程式」的四個小故事。
Mid-1950s · 1950 年代中期
According to Britannica, the first digital computers had no operating systems. They ran one program at a time, that program had command of everything, and a human operator provided whatever else was needed. The first operating systems were developed in the mid-1950s. They were small “supervisor programs” that handled basic input and output, such as controlling punch card readers and printers, and kept accounts of how much processor time each job used, for billing.
根據大英百科,最早的數位電腦沒有作業系統。它們一次只跑一個程式,那個程式掌管一切,其他需要的事由一位操作員來做。最早的作業系統出現在 1950 年代中期,是一些小小的「監督程式」,處理基本的輸入和輸出(例如控制打孔卡片閱讀機和印表機),還替每個工作記下用了多少處理器時間,好用來算帳。
1960s · 1960 年代
In the 1960s computers were very expensive, and many people wanted to use the same one. The answer was time-sharing: a system that let many users share one computer by switching rapidly between them. Britannica names two early time-sharing systems: CTSS, developed at the Massachusetts Institute of Technology, and the Dartmouth College Basic System. Each user had a turn so often that the computer seemed to belong to that person alone.
1960 年代的電腦非常貴,很多人都想用同一台。解決的辦法叫分時(time-sharing):系統在很多使用者之間快速切換,讓大家共用一台電腦。大英百科舉出兩個早期的分時系統:麻省理工學院開發的 CTSS,以及達特茅斯學院的 BASIC 系統。每個使用者都很頻繁地輪到,所以感覺那台電腦好像是自己一個人的。
UNIX, Linux
Britannica calls UNIX the most important operating system of the 1970s. It was developed by AT&T and became widely used in the 1980s, in part because it was free to universities. Later came Linux, an open-source version of UNIX developed in part by a group led by the Finnish computer science student Linus Torvalds and in part by a group led by the American programmer Richard Stallman. For phones and tablets, Britannica names two prominent operating systems: Apple’s iOS and Google’s Android.
大英百科說,UNIX 是 1970 年代最重要的作業系統。它由 AT&T 開發,1980 年代被廣泛使用,原因之一是大學可以免費使用。後來出現了 Linux,它是 UNIX 的開放原始碼版本,一部分由芬蘭的資訊科系學生托瓦茲(Linus Torvalds)帶領的團隊開發,一部分由美國程式設計師史托曼(Richard Stallman)帶領的團隊開發。至於手機和平板,大英百科舉出兩個主要的作業系統:Apple 的 iOS 和 Google 的 Android。
Real time · 即時
Operating systems are not only for the machines on your desk. Britannica notes that special-purpose operating systems run on small computers that control assembly lines, aircraft, and even home appliances. They are called real-time systems, and they are designed to respond rapidly to sensors and to use what the sensors report to control machinery. A machine like that cannot keep its sensors waiting for a long turn.
作業系統不只用在書桌上的電腦。大英百科提到,有些特殊用途的作業系統,跑在控制生產線、飛機、甚至家用電器的小電腦上。它們叫做即時系統(real-time system),設計的目標是對感測器迅速做出反應,再根據感測器回報的資料控制機器。這樣的機器,可不能讓感測器等上很長的一輪。
Myth vs. Fact · 常見迷思
✗ Myth · 迷思A computer does many things at exactly the same moment.電腦在同一個瞬間做很多件事。
✓ Fact · 事實One processor core does one thing at a time. The operating system switches between programs so quickly that it looks like all at once. Extra cores help, but there are usually more programs than cores.一個處理器核心一次只做一件事。作業系統在程式之間切換得很快,所以看起來像同時。多幾個核心有幫助,但程式通常比核心多。
✗ Myth · 迷思The operating system is the desktop: the picture, the icons, and the windows.作業系統就是桌面:那張圖、那些圖示和視窗。
✓ Fact · 事實That is the part you can see. Most of the work is out of sight: sharing the processor, the memory, the files, and the devices among programs.那只是你看得到的部分。大部分的工作在看不到的地方:把處理器、記憶體、檔案和裝置分配給各個程式。
✗ Myth · 迷思Switching between programs costs nothing.在程式之間切換不花任何代價。
✓ Fact · 事實Britannica notes that switching between processes must itself use the processor. In the model, turns of 1 beat spend almost half the time on switching.大英百科指出,在行程之間切換,本身就要用到處理器。在模型裡,每一輪只做 1 拍的話,將近一半的時間都花在換手。
✗ Myth · 迷思Only computers and phones have operating systems.只有電腦和手機有作業系統。
✓ Fact · 事實Special-purpose operating systems run on the small computers that control assembly lines, aircraft, and even home appliances.控制生產線、飛機、甚至家用電器的小電腦,上面也跑著特殊用途的作業系統。
Remember It · 記憶口訣
One processor, many programs, taking turns.
一個處理器,很多程式,輪流來。
It only looks that way.
只是看起來像。
Too long, and others wait. Too short, and time is wasted.
太長,別人等;太短,白白浪費。
Processor, memory, files, devices.
處理器、記憶體、檔案、裝置。
Before You Start · 動手之前
Classroom Activity 1 · 課堂活動一
You need · 準備材料
Steps · 步驟
The counts should match the model: 51 beats, then 63, then 95, with 3, 15, and 47 beats of walking. Ask which round the students at the last desk liked best, and which round finished first. In Taiwan’s junior high Information Technology curriculum, this lesson matches the topic “System platforms”: 資 S-IV-2, whose notes list the operating system.
數出來應該和模型一樣:51 拍、63 拍、95 拍,其中走路分別是 3、15、47 拍。問問坐在最後一張桌子的同學最喜歡哪一回合,再問哪一回合最早全部做完。對照十二年國教國中「資訊科技」的學習內容,這一課對應「系統平台」主題:資 S-IV-2 系統平台之組成架構與基本運作原理(附錄的說明列有作業系統)。
Classroom Activity 2 · 課堂活動二
You need · 準備材料
Steps · 步驟
Apple explains the three numbers: System is the share of the processor used by processes that belong to macOS, User is the share used by apps you opened, and Idle is the share not being used. Apple also says that most of the time the processor uses only a small percentage of its power. So the operating system needs turns of its own, and most of the time there is plenty to go around.
Apple 對這三個數字的說明是:System 是屬於 macOS 的行程用掉的處理器比例,User 是你打開的 App 用掉的比例,Idle 是沒有在用的比例。Apple 還說,大部分時候處理器只用到一小部分的能力。也就是說,作業系統自己也要輪到;而大部分時候,處理器的時間綽綽有餘。
Go Further · 延伸閱讀
Sources · 資料出處
Facts on this page were checked against these sources (October 2026); the kitchen model is our own illustration, and every number is tested · 本頁的事實依下列資料查證(2026 年 10 月);廚房模型是我們自己的示意,每一個數字都有測試