You are here: hacking technology > network management > Content
Hot Articles
Recommend Articles
New Articles
One kind of highly effective class media movie server's design (figure)(3)
  Add date: 07/23/2008   Publishing date: 07/23/2008   Hits: 2
Total 5 pages, Current page:3, Jump to page:
 


  The operating system in the convection media server's function realizes on uses take the application advancement (thread) as the central system resources mode of administration. The operating system selects the virtual memory method, the application procedure virtual memory space maps the physical memory, between the physical memory and CPU has Cache. When the class media data carries on the transmission from the floppy disk to the network, must carry on the different system space transmits the copy many times, as shown in Figure 4.



  Figure 4 has demonstrated the floppy disk data to the network interface transmission way: First, data object from floppy disk copy to memory, then, data in memory, because each work thread's space is different, carries on the spatial copy, namely from core space copy to advancement space, then, data again from advancement space copy to core space, finally data again copy to network. Because the class media data must pass through RTP the pack processing, therefore, data in copy before network, but also wants the copy to arrive at Cache, from Cache the copy to the CPU register, carries on pack processing again.

  May see from Figure 3, counts n along with the work thread enlargement, system's between various threads cut expenses sharp growth, looking from operating system's angle, because each thread involves to the hard disk video data read, the independent thread are respectively more, is bigger to the hard disk read-write's data quantity, the data increases in the different space's copy, the operating system unceasing will carry on the page cut, server's performance along with customer connection number increase, the efficiency will drop suddenly.

  In order to improve the above design the shortcoming, must the redesign server's service routine structure. According to the server the function which must complete in the class media transmission, may see, the server when the customer has the connection request, the analysis connection requests and closes the connection request is the very short process, server's majority of time uses in giving each customer to transmit the RTP data stream package. Transmits the RTP data stream package to call in including the server the corresponding media file the memory, the pack transmission, as well as obtains a RTCP package of feedback. Therefore, may design an independent processing thread, uses in giving the customer specially to transmit RTP the data stream package.

  Improvement class media server design as shown in Figure 5, completes the main function to realize through two threads.

  The event thread is responsible to examine the customer connection, as well as the customer sends RTCP package of arrival. The event thread through to the TCP port's examination, when has the connection request the establishment may maintain the customer information the RTSP conversation, in each customer's RTSP conversation's survival time, the event thread unceasing transmits to the customer RTP Bao Zhei the duty to put in the processing thread the formation, until the RTSP session termination, the event thread puts in again the closure connection's duty the formation.

  The event thread (transmits to the different customer's service RTP data packet) puts in after the duty form the formation, in the processing thread right row's duty in turn carries on processing, i.e., the processing thread basis customer's difference, unceasing forms the corresponding class media file the RTP package, sends out in turn, until video frequency service termination.

  May look coming out, processing thread, although provides the service to all customers, but carries out the duty throughout transmits the RTP data stream package, simultaneously, this thread visits after the media file calls in the memory, may by identical thread other duties repeatedly transfer, such design, not only reduced the system frequent cut resources loss which increases along with the customer number creates, also reduced the visit hard disk data number of times, reduced the access time, also has displayed the merit which the instruction topicality efficiency enhances. After supposing Figure 5 the improvement processing flow to count, the analysis customer's connection request also puts in the processing thread in the formation, carries on processing in the processing thread, although the analysis connection's duty is different with transmits a RTP package of duty majority, but this duty consumes the time to be few, therefore the right system performance's influence is not big.



 
Other pages: : <<Prev * 1 * 2 * 3 * 4 * 5 * Next>>
Prev:Network management notice: Route related terminology selection Next:Graphic solution Web and FTP server safety control disposition (figure)

Comment:

Category: Home > network management