Subscribe by Email


Thursday, March 1, 2012

What are different control flow defects?

Flow of control is the dynamic aspect of any program. Whenever there is a flow of control in a program, the program is said to be active or responsive. The execution of a software program, system or application depends pretty much on the flow of control and data. Flow of control is needed to maintain data links between the different components of the software system or application.

The control flow makes use of some predefined special codes. These codes are transmitted via a band over the communications channel preferably primary. These codes are of 2 types namely:


1. XON: it stands for “transmit on” and
2. XOFF: it stands for “transmit off”.

Because of these two codes, the flow of control is sometimes referred to as the “XON/ XOFF control flow”.

NOTE : Flow of control in a software system or application is totally different from the flow of control in the hardware system. Like any other process, the flow of control also experiences some defects.

MECHANISM OF CONTROL FLOW
In order to understand these defects it is necessary that you understand the mechanism of this process.
- One of the ends of the data link sends the code XON to the other end if this end is ready to intake data.
- If this end is not able to receive data it sends off the XOFF code to the other end.
- The other on getting this code immediately stops the data transmission and resumes once again when the other end is ready to accept the data and sends a XON code.

DIFFERENT CONTROL FLOW DEFECTS
- The ends of the data links sometimes become unresponsive to the intake or transmission of data.
- These kinds of problems are an indication of the defects in data linkage.

To make you understand the control flow defects let us see a detailed example:

- Say you connect your computer to printer whose performance speed is relatively slow when compared to the speed of the computer.
- When you want to take out a print, the computer starts by sending the data to be printed to the printer.
- Since the speed of the printer is slower than the computer, it lags behind i.e., it is unable to handle the incoming volume of data from the computer.

- Ultimately it reaches a stage where it memory is overflowing with the data.
- Now what the printer will do in such a situation? It sends a XOFF code to the computer to stop this data transmission.
- It again sends a XON code to the computer once it has received the whole previously transmitted data and is ready to receive the data again.
- XON and XOFF have a specialty that they can be used by the data links in both the directions.
- In some cases it happens that the data links are not able to employ these codes from either direction.
- This is again a defect in the control flow.
- The flow control is usually used for devices having old technology i.e., the devices which are not compatible with the modern software.
- The devices are unable to accept any more incoming data because their output rate is limited.

REMOVAL OF DEFECTS
- Removal of defects in the flow of control is very necessary.
- It is important since the flow of control is very crucial for the well execution of the software system or application.
- Tests should be undertaken to identify these defects.
- Once the defects have been identified, they should be assigned priority on the basis of the severity they can cause.
- The defects should be validated and resolves as soon as possible.


No comments:

Facebook activity