Subscribe by Email


Showing posts with label Segments. Show all posts
Showing posts with label Segments. Show all posts

Thursday, September 26, 2013

Differentiate between upward and downward multiplexing?

The process of multiplexing is carried out at the transport layer. Several conversations are multiplexed in to one connection or physical links or virtual circuit. For example, suppose the host has only one network address available for use. Then it has to be used by all the transport connections originating at that host. For multiplexing the following two main strategies are followed:
Ø  Upward multiplexing and
Ø  Downward multiplexing

Upward Multiplexing 
- In upward multiplexing, the different transport connections are multiplexed in to one network connection. 
- These transport connections are grouped by the transport layer as per their destinations. 
- It then maps the groups with the minimum number of network connections possible.
- The upward multiplexing is quite useful where the network connections come very expensive.

Downward Multiplexing 
- It is only used when the connections with high bandwidth are required. 
- In case of the downward multiplexing, the multiple network connections are opened by the transport layer and the traffic is distributed among them. 
- But for using downward multiplexing, it is necessary that this capacity must be handled well by the subnet’s data links.

Another Technique 
- In either of the cases it is not guaranteed that the segments will be delivered in order. 
- Therefore, another technique is adopted. 
- The segments are numbered sequentially. 
- Each octet is numbered by the TCP sequentially. 
- Segments are then numbered based up on the number of the first octet present in that segment. 
- The segments might get damaged in the transition or some may even fail to arrive at the destination. 
- This failure is not acknowledged by the transmitter. 
- However, the successful receipt of the segment is does acknowledged by the receiver. 
- Sometimes, the cumulative acknowledgements might be used. 
- If the ACK triggers a time out interrupt, the re-transmission of the segment is done. 
- Also the re-transmission is done when an ACK is lost. 
- The receiver must have the ability to recognize the duplicate ACKs. 
- If such thing occurs, the receiver assumes by itself the ACK might have been lost.
- This happens when the ACK duplicate is received before the connection is closed. 
- If the duplicate is received after the closure of the connection, the situation is dealt differently. 
- In this case, the sender and receiver are allowed to know about each other’s existence. 
- They negotiate about the parameters and the transport entity resources are allocated based up on some mutual agreement. 
The connection release is of two types:

Ø Asymmetric release: 
This is the one used in the telephone systems. However it does not works well for the network that use packet switching.

Ø  Symmetric release: 
- This is certainly better than the previous one.
- Here, all the directions are released independently with respect to each other. 
- The host continues receiving data after the disconnection TPDU has been sent. 
- But the symmetric release has another problem which is related with indirection levels and fake messages. 
- There are no proper solutions for this problem in case of the unreliable communication media. 
- Note that this has nothing to do with the protocol. 
- Putting a reliable protocol over an unreliable medium can actually guarantee the delivery of the message. 
- Another thing to be noted is that it the time limit within which the message will be delivered cannot be guaranteed by any protocol. 
- Error conditions might prolong the delivery period. 
- Restarting the connections can lead to the loss of all the state info and the connection might remain as half-open. 
- Since no protocol has been designed to deal with this problem therefore one has to go forward with the risks associated with releasing the connections. 


Friday, June 21, 2013

Explain about the Paged Memory and Segmentation techniques?

Paging and segmentation, both are memory management techniques. 

What is Paging?

- This technique has been designed so that the system can store or retrieve data from the virtual memory or secondary memory of the system to be loaded in the main memory and used. 
- In this scheme, the data from the secondary memory is retrieved by the operating system in blocks of same size commonly known as the paging. 
- This is why the technique has been called the paging memory – management scheme. 
- This memory management scheme has a major advantage over the segmentation scheme. 
- The advantage is that non-contiguous address spaces are allowed. 
- In segmentation, non-contiguous physical address spaces are not allowed. 
Before the paging actually came in to use, the whole program had to be fitted in to the contiguous memory space by the systems. 
- This in turn led to a number of issues related to fragmentation and storage. 
Paging is very important for the implementation of the virtual memory in many of the operating systems that are general purpose. 
- With the help of paging memory management technique, the data that cannot be fitted in to the physical memory i.e., RAM can be easily used. 
- Paging actually comes in to play whenever a program makes an attempt for accessing the pages that have not been presently mapped to the main memory (RAM). 
- Such situation is termed as the page fault. 
- At this point the control is handed over to the operating system for handling the page fault.
- This is done in a way that it is not visible to the interrupt raising program. 

The operating system has to carry out the following instructions:
  1. Determining the location of the requested data from the auxiliary storage.
  2. Obtaining a page frame in the main memory that is empty to be used for storing the requested data.
  3. Loading the data requested in to the empty page obtained above.
  4. Making updates to the page table so that new data is only available.
  5. Returning the control interrupting program and retrying to execute the same instruction that caused the fault.

What is Segmentation?

- This memory management technique involves dividing the main memory in to various sections or segments.
- In the system that makes use of this management technique, a value identifying the segment and its offset is contained in the reference to that memory location. 
- Object files that are produced during the compilation of the programs make use of the segments when they have to be linked together to form an image of the program and this image has to be loaded in to the memory.  
- For different program modules, different segments might be created. 
- Some programs may even share some of the segments.
- In one way, memory protection is implemented by means of memory segmentation only.
- Paging and segmentation can be combined together for memory protection. 
- The size of memory segment is not always fixed and can be as small as a byte. 
- Natural divisions such as the data tables or the individual routines are represented by the segments.
This is to make the segmentation visible to the programmer. 
- With every segment, a set of permissions and length is associated. 
- A segment can be referred to by the process only in a way that is permitted by this set of permissions. 
- If this is not done, a segmentation fault is raised by the operating system. 
Segments also consist of a flag that indicates the presence of the segment in the main memory of the system. 


Tuesday, April 24, 2012

What are different data flow testing strategies?


Data flow testing is quite important since you do not want any unreasonable things happen to your data objects which in turn can deviate the whole control flow of your program from the right track. To make a sensible data flow testing you need to use sensible and reliable data flow testing strategies.

This article is all about such data flow testing strategies. 
There are two types of machines that are used by the data flow as mentioned below:

  1. Von Neumann machine architecture
  2. Multi- instruction, multi- data machines architecture (MIMD)
- Before carrying out the data flow testing, it is good to assume a bug which causes problem in the control flow of the program. 
- It is not compulsory to use the typical data flow graphs, annotated ordinary control graphs can also be used for guiding the data flow testing process. 
- Data flow graph depicts all the directed links and nodes involved in the data flow.
- All the strategies for data flow testing that we are going to discuss are structural in nature and also focus up on the actions taking place on the data objects rather then just focussing on the connectivity of the software program.

Requirements of Data flow testing Strategy
- Data flow link weights are the first requirement of any data flow testing strategy. 
- All these strategies are based up on the selection of the path segments that very well satisfy at least few of the data flow characteristics common to all the data objects. 
- A data flow testing strategy is weaker than another strategy Y if all the test cases present in Y are not included in the X. Then Y is said to be a stronger strategy. 

Important Terminologies
Let us take a look at some important terminologies before moving on to the strategies:
  1. Definition clear path segment: It is a path defined with respect to a variable X that consists of various links such that the X is defined only on the first link.
  2. Simple path segment: In such a path one of the two nodes are visited twice.
  3. Loop free path segment: This path is contrary to the simple path segment in the way that in this path every node is visited once for the maximum.
  4. Du path segment: It is a path that is simple and definition clear since its last link consists of a computational use of variable X.
Different Strategies for Data Flow Testing
Below described are the different strategies for the data flow testing:

  1. ADUP or all DU paths: This strategy is considered to be the strongest among all the data flow testing strategies. It takes in to account all the du paths that occur in the definitions of all the variables to their every use. This strategy is a strong data flow testing criteria also. Another advantage of this strategy is that one of its tests can satisfy many definitions at a time.
  2. AU or all uses strategy: Under this strategy at least one of the definition clear paths from all the definitions of a variable has to be tested or exercised under a test. The task or burden of testing is actually reduced here i.e., the path coverage is cut down to branch coverage.
  3. APU + C or all p uses/ some c uses strategy: This strategy covers up at least one definition free path to every predicate use for every definition of the function. If this is not able to over up all the definitions of the variable, then it is recommended that computational use test cases are exercised.
  4. ACU + P or all c uses/ some p uses strategy: This strategy is just the opposite of the above strategy.
  5. AD or all definitions strategy: It covers only the definition of the variable. 


Monday, April 23, 2012

How does a loop free path segment play a role in data flow testing?


The loop free path segments form a very important terminology in the path of data flow testing. But many of us are not well familiar with the concept of loop free path segments and the role that they have got to play in the data flow testing or path testing. In this article we have tried to explain in the easiest way possible the concept of the loop free path and the role it plays in the data flow testing. 

Before taking up the topic of the loop free path segment and its role in data flow testing we shall discuss a little about the data flow testing. 

The control flow graph is the best tool that the data flow testing can use in exploring all the weird or unreasonable things that can affect the data objects. These weird and unreasonable things are nothing but the anomalies.

Till now nine types of anomalies have been defined as mentioned below:

  1. dd: harmless but suspicious
  2. dk: might be a bug
  3. du: a normal case
  4. kd: a normal situation
  5. kk: harmless but might be containing bugs
  6. ku: a bug or error
  7. ud: not a bug because of re- assignment
  8. uk: a normal situation
  9. uu: a normal situation
 - If these anomalies are taken in to consideration, one can develop very effective and reliable path selection strategies which can be then used in filling the gaps that are present in between the branch testing and the complete path testing. 
- The strategies that are followed for carrying out a data flow test are based up on the selection of the paths via the flow of control of the software system or application.
- These path selection strategies are quite useful when it comes to exploring the sequences of the events that are in a way related to the status of the data objects. 
- The paths are so selected that they cover up all the objects, i.e. they ensure the initialization of each and every data object before it is used in the program and also that they are used for a minimum of one time. 

Categories of Data Objects


- The data objects have been categorized in to three different categories for making the path selection process easier:
  1. Defined, created, initialized (d)
  2. Killed, undefined, released (k)
  3. Used:
(a)    In calculations (c)
(b)   In predicates (p)

- An object is said to be defined whenever it has an occurrence in a data declaration or is assigned with a new value or is dynamically allocated. 
- On the other hand an object is said to be used whenever it becomes a part of a predicate or a calculation. - The anomaly detection process relies heavily on the following two anomaly detection techniques:
  1. Static anomaly detection (responsible for syntax errors) and
  2. Dynamic anomaly detection (responsible for logical errors).

What are Loop Free Path Segments


- Now coming to the loop free path segments, this is a terminology that is usually used under the context of the data flow modelling. 
- Loop free path segments are discovered using the control flow graph.
- The loop free path segments are basically a derivative of the simple path segments.
- It depends on the simple path segment that whether or not it is a loop free path segment also. 
- If the simple path segment consisting of two nodes A and B is having loop in both the nodes, then it cannot be called as a loop free path. 
- Loop free paths are the simple paths segments consisting of loop only in one of the either nodes.


How does a simple path segment play a role in data flow testing?

Whenever you have discussed about the data flow testing you must have came across the term simple path segments while discussing about the strategies for data flow testing. Many of us are not quite clear with the concept of the simple path segments and what role have they got to play in the data flow testing. This article is all about the simple path segments and the role that they have got to play in the data flow testing. 

First we shall brief up ourselves with the concepts of the data flow testing before moving on to the topic of the simple path segments and their role. 

What is Data Flow Testing


- Data flow testing includes all those strategies that have been based up on the selection of the paths via the control flow of the program for discovering the sequence in which the events related to the object’s status take place.

- A primary bug assumed during the data flow testing is that though the control flow is generally correct, there is some fault with the software system or application since the data objects are not available when they are supposed to be or weird things happen to the data objects. 

- Even if some problem is found to preside in the control flow of the program it is initially detected by the data flow analysis. 

- One of the most aiding tool in the data flow testing are the control flow graphs which are the graphs consisting of directed links and nodes. 

- The objective of the data flow testing is to discover the deviations in the data flow. Three types of data objects have been defined namely:


  1. Killed or undefined
  2. Defined
  3. Usage
And some nine kinds of anomalies have been defined:

  1. dd: harmless but suspicious
  2. dk: might be a bug
  3. du: a normal case
  4. kd: a normal situation
  5. kk: harmless but might be containing bugs
  6. ku: a bug or error
  7. ud: not a bug because of re- assignment
  8. uk: a normal situation
  9. uu: a normal situation
These anomalies are detected by the means of two anomaly detection techniques namely:

  1. static anomaly detection technique and
  2. dynamic anomaly detection technique
All the strategies involved in the process of data flow testing are structural. Data flow testing and path testing strategies have so many things in common. But one of difference between them is made by what one takes in to account for testing. Path and data flow testing both are emphasized up on the raw connectivity of the graph but in addition to this the data flow testing also focuses up on what happens to the data objects. There are so many terminologies associated with the data flow testing and simple path segment is one of them. The others are:

  1. definition clear path segment
  2. loop free path segment
  3. du path segment

What is Simple Path Segment


We shall now define what a simple path segment is! 

- Any path in which the same node is visited twice at the most, such a path is called a simple path segment. 
- One can easily make out why a simple path segment is called so! 
- It is called so because it does not consists of loops in both the nodes.
- Only one node holds the loop. 
- One of the problems that are faced by the testers is of finding the simple paths. 
- This problem can be overcome by following a lower bound max- flow approach. 
- The simple path segments though being, are important in the data flow testing just like all the other path segments. 


Tuesday, March 15, 2011

How do we map data flow into a software architecture?

In architectural design, the mapping method uses data flow characteristics to derive a commonly used architectural style. A data flow diagram is mapped into program structure using one of the two mapping approaches:
- Transform Mapping
- Transaction Mapping
Structured design is often characterized as a data flow oriented design method because it provides a convenient transition from a data flow diagram. This type of information flow is the driver for the mapping approach.
Transform Flow: The overall flow of data occurs in a sequential manner and follows one, or only a few straight line paths. When a segment of a data flow diagram exhibits these characteristics, transform flow is present.

Transaction Flow: Information flow which is characterized by single data item called a transaction that triggers other data flow along one of many paths. When a data flow diagram takes this kind of form then transaction flow is present.


TRANSFORM MAPPING


It is a set of design steps that allows a data flow diagram with transform flow characteristics to be mapped into a specific architectural style.
- Review the fundamental system model.
- Review and refine data flow diagrams for the software.
- Determine whether the data flow diagram has transform or transaction flow characteristics.
- Isolate the transform center by specifying incoming and outgoing flow boundaries.
- Perform first level factoring.
- Perform second level factoring.
- Refine the first iteration architecture using design heuristics for improved software quality.

TRANSACTION MAPPING


In transaction mapping, information flow along two of the three action paths accommodates additional incoming flow. Each action path flows into a single transform, display messages and status. The design steps for transaction mapping is similar with a major difference lies in mapping of data flow diagram to software structure.
- Review the fundamental system model.
- Review and refine data flow diagrams for the software.
- Determine whether the data flow diagram has transform or transaction flow characteristics.
- Identify the transaction center and the flow characteristics along each of the action paths.
- Map the data flow diagram in a program structure amenable to transaction processing.
- Factor and refine the transaction structure and the structure of each action path.
- Refine the first iteration architecture using design heuristics for improved software quality.

Once an architecture has been derived, it is elaborated and then analyzed against quality criteria.


Thursday, April 1, 2010

Transport Multiplexing Protocol (TMux)

One of the problems with the use of terminal servers is the large number of small packets they can generate. Frequently, most of these packets are destined for only one or two hosts. TMux is a protocol which allows multiple short transport segments, independent of application type, to be combined between a server and host pair.

- TMux protocol is intended to optimize the transmission of large numbers of small data packets that are generated in situations where many interactive Telnet and Rlogin sessions are connected to a few hosts on the network.

- TMux protocol may be applicable to other situations where small packets are generated, but this was not considered in the design.

- TMux is designed to improve network utilization and reduce the interrupt load on hosts which conduct multiple sessions involving many short packets.

- TMux is highly constrained in its method of accomplishing this task, seeking simplicity rather than sophistication.

Protocol Design


TMux operates by placing a set of transport segments into the same IP datagram. Each segment is preceded by a TMux mini-header which specifies the segment length and the actual segment transport protocol. The receiving host demultiplexes the individual transport segments and presents them to the transport layer as if they had been received in the usual IP/transport packaging.
Hence, a TMux message appears as:
| IP hdr | TM hdr | Tport segment | TM hdr | Tport segment| ...|

where:
TM hdr : It is a TMux mini-header and specifies the following Tport segment.
Tport segment : It refers to the entire transport segment, including
transport headers.


Header Format


Each 4 octet TMux mini-header has the following general format:
Length high |
+-------------------------------+
| Length low |
+-------------------------------+
| Protocol ID |
+-------------------------------+
| Checksum |
+-------------------------------+
| Transport segment |
| ... |
| ...
Length : It specifies the octet count for this mini header and the following transport segment, from 0-65535 octets.
Protocol ID : It contains the value that would normally have been placed in the IP header Protocol field.
Checksum : This field is the XOR of the first 3 octets.


Facebook activity