Bus Mastering

What is Bus Mastering?

Bus mastering refers to the process where data is transferred without using the Central Processing Unit (CPU) of the computer.

Technically, it refers to the specific feature of the bus architecture that helps the control bus to interact with other components and access the RAM directly, and also help in independent DMA transactions.

Understanding Bus Mastering

What is Bus Mastering

Bus mastering is a specific feature that allows the control bus to communicate with the other parts of the computer and access the Random Access Memory or RAM without needing any help from the CPU.

In the world of computing, there are several different bus architectures with this particular feature that helps the device or devices connected to the bus to set off Direct Memory Access or DMA transactions.

This specific phenomenon is called the first-party DMA, which is significantly different from the third-party DMA concept, where, traditionally, it is the DMA controller of the system that is in total control of the process and does the data transfer in reality.

Most commonly, the bus master platform is found in a microprocessor or in the distinct Input and Output (I/O) devices.

This particular platform directs the traffic on the computer bus or on the I/O pathway.

This bus master, just as the name implies, is the ‘master’ of this type of setup and manages the bus pathways. It is these pathways that contain the transmission addresses and signals.

On the other hand, all of the input and output devices on the bus are referred to as the ‘slaves.’

Ideally, in the bus mastering process, there is only one particular peripheral device that is theoretically allowed to communicate with another directly.

However, in practice, almost every peripheral device masters the bus entirely for performing DMA to the main memory of the system.

Read Also:  3 Ways to Defrag a Hard Drive

Bus Mastering Devices

Typically, there is a need for an exclusive processor built into the device in order to use bus mastering.

It is only then that it will be able to work independently of the CPU. The bus-mastering peripheral will control the bus making it feel like it is its own separate computer system.

Some of the most familiar bus mastering devices are:

A few others that focus on bus mastering are the Integrated Drive Electronics (IDE) and the Advanced Technology Attachment (ATA) channels.

Sometimes, there may be many components in a computer system that support bus mastering.

There are more than a few of these structures such as:

In all these systems, you will need to implement a hierarchical structure or a bus arbitration scheme.

This will prevent the different components of the computer from trying to make use of the bus, all at the same time.

On the flipside, there may also be a few specific systems with specific buses that allow only one single component to initiate and handle the data transfer.

This component is usually the CPU of the system, or any other proxy of it.

There may also be a few specific systems in which the operating system may forbid the peripherals from becoming bus masters in real time.

This is due to the fact that the scheduler will then no longer be able to arbitrate for the bus and, as a result, will not be able to offer deterministic latency.

Uses

And, as for the overall system, this specific feature and design of the bus architecture allow transferring data between the RAM and the peripheral component when the CPU is busy carrying out other responsibilities or is being used by other devices.

This specific aspect offers significant benefits such as:

Read Also:  Direct vs Sequential Access Storage Devices: 5 Differences

With no bus mastering in the equation, the CPU would have to work always as a middleman to communicate the instructions between two components, hampering the performance.

Value Aspect

Though most modern systems support this feature, the performance benefits of bus mastering and its value may not be applicable always in the real world, for example in the case of the modern graphics cards.

This is because, in several cases, it is seen that the modern video cards in quite a few systems do not need to pass information to and from the main memory or RAM in the system.

The main reason behind this is that most of the modern video cards come with an on-board RAM included in their design to use for video-specific purposes.

The amount of this RAM, often called the Video RAM, on the graphics cards can go up to several gigabytes.

This makes the additional RAM superfluous and obviates the need for going through the main or general memory of the system for the sake of communication.

Another significant aspect where the value of bus mastering is quite questionable is on the PCI bus.

On the contrary, it is much more beneficial when used on the IDE or ATA buses, usually needed by the hard drives and optical drives in a computer. This is because these devices have very little or no memory of their own.

Therefore, bus mastering is useful in these devices for data transfer, which is quite substantial, because a file or program is first placed into the system RAM from these devices before the computer system can use it.

How to Enable Bus Mastering?

You can enable bus mastering by using the native Direct Memory Access or DMA driver supplied with Windows.

The steps to follow are:

Finally, go to the Properties sheet of the drive after the system boots up to check whether or not the checkbox is marked and the DMA is enabled.

Remember, on most PCI devices bus mastering is enabled, including eth0, but it is not on the local network or eth1.

If you have a Windows 2000 system, you will need to configure the DMA in the following ways to enable bus mastering for performance gains:

Read Also:  What is Hard Disk Controller (HDC)? (Explained)

Keep in mind that, in order to enable it, you will need to enable the native DMA driver and not the one provided by Intel or any other chipset manufacturer.

Furthermore, the Microsoft drivers need DMA support in the Basic Input Output System (BIOS).

Therefore, before installing the driver, you will also have to flash the BIOS of your system to the most recent version.

Therefore, if there is the Intel BM-IDE driver installed in your computer system, remove it before installing the Microsoft driver.

To do that, run the BM-IDE installation program and choose Deinstall.

Do All PCI Cards Support Bus Mastering?

No, this may not be the case with all PCI cards. Though both PCI and EISA are considered to be bus mastering devices and allow initiating a bus transfer, not all of these cards and buses support it.

Typically, whether or not bus mastering will be supported is determined by the specific type of hardware being used.

Normally, bus mastering can function without the help of the bus architecture and can be any of the following:

However, in most of the modern computers, bus mastering is accessible primarily through the PCI bus. These slots are typically situated at the bottom half of the motherboard of the computer.

The PCI bus typically includes the PCI-Express (PCIe) slot or slots. The video card or cards are inserted into these slots of the system.

However, other devices may also be mounted on the PCI bus such as sound cards and network cards.

Conclusion

Bus mastering is quite a useful feature to better the performance of the system.

This process allows the attached components of the system to communicate with each other directly, which improves response times as they do not need a mediator.

It also saves resources while passing instructions through the system.