Abstract:
A buffer management method for a modem having virtual circuits is provided. The buffer management method includes steps of: detecting the virtual circuits, and counting the number of virtual circuits in use; collecting the buffers of the modem; and distributing the buffers of the modem to the virtual circuits in use. A buffer management system is also provided.

Description:
BACKGROUND OF THE INVENTION 
       [0001]    1. Field of the Invention 
         [0002]    The invention relates to a buffer management system and method, and particularly to a buffer management system and method for a modem. 
         [0003]    2. Description of related art 
         [0004]    In a typical digital subscribed line (DSL) architecture, buffers are set between an asynchronous transfer mode (ATM) interface and an Ethernet interface, for adjusting transmission rate of the ATM interface and the Ethernet interface. Since the ATM connection is divided into more than one virtual circuit (VC), and each virtual circuit occupies a number of the buffers, buffer management is required while multiple permanent virtual circuits (PVCs) are applied in a single ATM channel. 
         [0005]    In buffer management it is traditional to allocate a fixed number of buffers for each permanent virtual circuit. For example, if the total number of buffers is 160 and the number of permanent virtual circuits is 8, each of the permanent virtual circuits is allocated 20 buffers. However, in a case that only two of the eight permanent virtual circuits are in use, the remaining 120 buffers are still occupied, and thus, utilization of the buffers is not efficient. 
         [0006]    Moreover, since traffic on a permanent virtual circuit transmitting control signaling is far less than that transmitting data, if each permanent virtual circuit is allocated a same number of buffers, a transmission speed of the permanent virtual circuit transmitting data is be decreased. 
       SUMMARY OF THE INVENTION 
       [0007]    An exemplary embodiment of the invention provides a buffer management system for a modem. The buffer management system includes a detecting module, a collecting module, and a distributing module. The detecting module detects the virtual circuits and counts the number of virtual circuits in use. The collecting module collects the buffers of the modem. The distributing module distributes the buffers of the modem to the virtual circuits in use. 
         [0008]    Another exemplary embodiment of the invention provides a buffer management method for a modem having virtual circuits. The buffer management method includes steps of detecting the virtual circuits, and counting the number of virtual circuits in use; collecting the buffers of the modem; and distributing the buffers of the modem to the virtual circuits in use. 
         [0009]    Other advantages and novel features will become more apparent from the following detailed description of preferred embodiments when taken in conjunction with the accompanying drawings, in which: 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0010]      FIG. 1  is a schematic diagram illustrating an application environment of a buffer management system for a modem of an exemplary embodiment of the present invention; 
           [0011]      FIG. 2  is a schematic diagram of the buffer management system for the modem of  FIG. 1 ; 
           [0012]      FIG. 3  is a flowchart of a buffer management method for a modem of another exemplary embodiment of the present invention; and 
           [0013]      FIG. 4  is a flowchart of the buffer management method for a modem of a further exemplary embodiment of the present invention. 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0014]      FIG. 1  is a schematic diagram illustrating an application environment of a buffer management system for a modem of an exemplary embodiment of the present invention. A client  10  is connected to a digital subscriber line access multiplexer (DSLAM)  30  via a communication device like an asymmetric digital subscriber line (ADSL) modem  20 . The ADSL modem  20  interacts with the DSLAM  30  via a plurality of virtual circuits (VCs)  40 . In the exemplary embodiment, the virtual circuits  40  are permanent virtual circuits (PVCs). 
         [0015]      FIG. 2  is a schematic diagram of the buffer management system of  FIG. 1 . In the exemplary embodiment, the buffer management system  100  is arranged in the modem  20 . The buffer management system  100  includes a detecting module  102 , a collecting module  104 , and a distributing module  106 . 
         [0016]    The detecting module  102  detects virtual circuits  40  between the ADSL mode  20  and the DSLAM  30 , and generates a detected result. In the exemplary embodiment, the detecting module  102  includes a state detecting sub-module  1021  and a function detecting sub-module  1023 . The state detecting sub-module  1021  detects states of the virtual circuits  40  and counts the number of the virtual circuits  40  in use. The function detecting sub-module  1023  detects functions of the virtual circuits  40 . In the exemplary embodiment, the functions of the virtual circuits  40  include transmitting signaling information and transmitting data. 
         [0017]    The collecting module  104  collects buffers of the ADSL modem  20 , and transmits a collected result to the distributing module  106 . 
         [0018]    The distributing module  106  distributes the buffers to the virtual circuits  40  according to the detected result and the collected result. In the exemplary embodiment, the distributing module  106  evenly distributes all buffers of the ADSL modem  20  to the virtual circuit  40  in use. In another exemplary embodiment, the detecting module  102  detects functions and states of the virtual circuits  40  simultaneously, and transmits the detected result to the distributing module  106 . The distributing module  106  distributes all buffers of the ADSL modem  20  to the virtual circuits  40  in use according to the detected result. In this embodiment, the buffers distributed to the virtual circuits  40  in use for transmitting signaling information are less than those for transmitting data. 
         [0019]      FIG. 3  is a flowchart of a buffer management method for the modem of another exemplary embodiment of the present invention. 
         [0020]    In step S 301 , the detecting module  102  detects the state of the virtual circuits  40  between the ADSL modem  20  and the DSLAM  30  and counts the number of the virtual circuits  40  in use. In the exemplary embodiment, the virtual circuits  40  are permanent virtual circuits  40 . 
         [0021]    In step S 303 , the collecting module  104  collects the buffers of the ADSL modem  20 . 
         [0022]    In step S 305 , the distributing module  106  distributes the buffers of the ADSL modem  20  to the virtual circuits  40  in use. In the exemplary embodiment, the distributing module  106  evenly distributes all buffers of the ADSL modem to the virtual circuits  40  in use, and does not distribute any buffers to the unused virtual circuits  40 . 
         [0023]      FIG. 4  is a flowchart of the buffer management method for the modem of a further exemplary embodiment of the present invention. 
         [0024]    In step S 401 , the detecting module  102  detects the state and function of the PVCs  40  between the ADSL modem  20  and the DSLAM  30 . In the exemplary embodiment, the virtual circuits  40  are permanent virtual circuits  40 , the states of the virtual circuits  40  include in-use and not-in-use, and the functions of the virtual circuits  40  include transmitting signaling and transmitting data. 
         [0025]    In step S 403 , the collecting module  104  collects buffers of the ADSL modem  20 . 
         [0026]    In step S 405 , the distributing module  106  distributes all buffers of the modem  20  collected by the collecting module  104  to the PVCs  40  according to the state and the function of the PVCs  40  detected by the detecting module  102 . In this embodiment, the distributing module  106  distributes the buffers to the PVCs  40  in use, and the buffers distributed to the PVCs  40  in use for transmitting signaling information are less than those for transmitting data. 
         [0027]    While embodiments and methods of the present invention have been described above, it should be understood that they have been presented by way of example only and not by way of limitation. Thus the breadth and scope of the present invention should not be limited by the above-described exemplary embodiments, but should be defined only in accordance with the following claims and their equivalents.