HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Problems
  2. /Three programs are started at the same moment…
HardComputer ScienceHigh School (9–10)Computer Science › Software, Languages and TranslatorsNumericalIGCSE

Three programs are started at the same moment…

StemPy LabContributed by StemPy Lab

Try it on paper first. A hint, the key idea and the worked solution are here when you need them.

Three programs are started at the same moment. Program 1 needs 404040 ms of processor time, program 2 needs 606060 ms and program 3 needs 202020 ms. The operating system gives turns of 202020 ms in the order 1, 2, 3, 1, 2, 3, and so on. A program that has finished gets no more turns.

At what time does each program finish?

Check your answer

Work it out on paper, then type your number. The answer itself stays hidden.

Need a reminder? The key ideaShowHide

The operating system manages files, handles interrupts, provides an interface, manages peripherals and drivers, manages memory, manages multitasking, provides a platform for running applications, provides system security and manages user accounts. In multitasking, programs take short turns on the processor, so they seem to run at the same time.

The worked solution

Have you tried it?

Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.

Plan. List the turns of 202020 ms and keep a running time.

Step 1. First round. Program 1 runs to 202020 ms, program 2 to 404040 ms, program 3 to 606060 ms. Program 3 has had its 202020 ms, so it finishes at 606060 ms.

Step 2. Second round. Program 1 runs to 808080 ms. It has now had 404040 ms, so it finishes at 808080 ms. Program 2 runs to 100100100 ms, and has had 404040 ms.

Step 3. The last turn. Only program 2 is left. It runs to 120120120 ms and finishes at 120120120 ms.

Answer: program 1 at 808080 ms, program 2 at 120120120 ms, program 3 at 606060 ms.

Check. The programs need 40+60+20=12040 + 60 + 20 = 12040+60+20=120 ms in all, and the last one finishes at 120120120 ms. The processor was never idle.

Log in to save this for later
← All Problems
← A laptop has 8 GiB of RAM. The operating system uses 2 GiB…Describe four functions of an operating system… →
More onComputer Science › Software, Languages and Translators

Discussion (0)

Log in to join the discussion.

Loading…

More on this topic

  1. A programmer uses the identifier TotalPrice, which has 10 letters, 25 times in a program…Medium
  2. Name the function of an IDE in each case…Easy
  3. In a model with made-up times, a program takes 3 s each time it is run with an interpreter…Hard
  4. A programmer uses an interpreter while she writes a game…Medium
  5. A program has eight lines. Line 5 has a missing comma and line 7 has a missing bracket, so neither…Medium
All problems on this topic →