ArticleslgStudy

science

Cycle stealing

Cycle stealing is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Cycle stealing rather than just read about it. In short: In computing, traditionally cycle stealing is a method of memory (RAM) or bus access without interfering with the CPU. It is similar to direct memory access (DMA) for allowing I/O controllers to read or write RAM without CPU intervention.

Key takeaways

  • Cycle stealing belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Cycle stealing to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Cycle stealing from memory before moving on to harder problems.

Reference excerpt

In computing, traditionally cycle stealing is a method of memory (RAM) or bus access without interfering with the CPU. It is similar to direct memory access (DMA) for allowing I/O controllers to read or write RAM without CPU intervention. Clever exploitation of specific CPU or bus timings can permit the CPU to run at full speed without any delay if external devices access memory not actively participating in the CPU's current activity and complete the operations before any possible CPU conflict. Cycle stealing was common in older platforms, first on supercomputers which used complex systems to time their memory access, and later on early microcomputers where cycle stealing was used both for peripherals as well as display drivers. It is more difficult to implement in modern platforms because there are often several layers of memory running at different speeds, and access is often mediated by the memory management unit. In the cases where the functionality is needed, modern systems often use dual-port RAM which allows access by two systems, but this tends to be expensive. In older references, the term is also used to describe traditional DMA systems where the CPU stops during memory transfers. In this case the device is stealing cycles from the CPU, so it is the opposite sense of the more modern usage. In the smaller models of the IBM System/360 and System/370, the control store contains microcode for both the processor architecture and the channel architecture. When a channel needs service, the hardware steals cycles from the CPU microcode in order to run the channel microcode.

Common implementations Some processors were designed to allow cycle stealing, or at least supported it easily. This was the case for the Motorola 6800 and MOS 6502 systems due to a design feature which meant the CPU only accessed memory every other clock cycle. Using RAM that was running twice as fast as the CPU clock allowed a second system to interleave its accesses between the CPUs by timing themselves on every other clock cycle. This was widely used for updating the display using main memory as a framebuffer. Common RAM of the late 1970s ran at 2 MHz, so most machines had a CPU running around 1 MHz. The BBC Micro secured a supply of 4 MHz RAM which allowed its CPU to run at 2 MHz. Another common solution was to use separate banks of memory that stored instructions vs. data, or more than one pool of data. In these cases the I/O systems can access their data memory while the processor is using a different bank. One example is the Zilog Z80, whose M1 line indicates that the processor is reading instructions; if those instructions are in a different bank, or more commonly ROM, the I/O systems can access RAM without interfering with the processor.

Modern architecture Cycle stealing is difficult to achieve in modern systems due to many factors such as pipelining, where pre-fetch and concurrent elements are constantly accessing memory, leaving few predictable idle times to sneak in memory access. DMA is the only formal and predictable method for external devices to access RAM. This term is less common in modern computer architecture (above 66-100 MHz), where the various external buses and controllers generally run at different rates, and CPU internal operations are no longer closely coupled to I/O bus operations.

Examples in actual computer systems Unexpected cycle stealing by the rendezvous radar during descent nearly caused the Apollo 11 landing to be aborted, but the design of the Guidance Computer allowed the landing to continue by dropping low-priority tasks. The IBM 1130's "cycle steal" is really DMA because the CPU clock is stopped during memory access. Several I/O controllers access RAM this way. They self-arbitrate via a fixed priority scheme. Most controllers deliberately pace RAM access to minimize impact on the system's ability to run instructions, but others, such as graphic video adapters, operate at higher speed and may slow down the system.

The cycle-stealing concept of the 1130 permits the CPU program to start an operation on an I/O device and then continue the mainline program while the I/O device is performing its operation. Each I/O device that operates in this manner takes (steals) a cycle from the CPU when it is needed. The CPU is "tied up" only one cycle while a data character is being transferred. The frequency at which devices steal cycles depends on the type of device. Since the CPU is much faster than any I/O device on the system, the CPU may be performing another function, such as arithmetic, at the same time an I/O operation is being performed. In fact, several I/O operations may be overlapped with each other and with other CPU functions.

Cycle stealing has been the cause of major performance degradation on machine such as the Sinclair QL, where, for economy reasons, the video RAM was not dual access. Consequently, the M68008 CPU was denied access to the memory bus when the ZX8301 "master controller" was accessing memory, and the machine performed poorly when compared with machines using similar processors at similar speeds.

References

Worked examples

Example 1 — a first encounter with Cycle stealing

Start with the simplest possible case. Write down what Cycle stealing claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Cycle stealing before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Cycle stealing ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Cycle stealing

In research
Cycle stealing appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Cycle stealing in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Cycle stealing is common in secondary-school and first-year university syllabi. It links to neighbouring topics Central processing unit, so understanding it makes those chapters shorter.
In everyday life
Look for Cycle stealing outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Cycle stealing” →

How to study Cycle stealing in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Cycle stealing means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Cycle stealing out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Cycle stealing in simple terms?

In computing, traditionally cycle stealing is a method of memory (RAM) or bus access without interfering with the CPU. It is similar to direct memory access (DMA) for allowing I/O controllers to read or write RAM without CPU intervention.

Why does Cycle stealing matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Cycle stealing?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Cycle stealing.

Tags

  • Central processing unit

Keep exploring