• Title/Summary/Keyword: 다중 쓰레드

Search Result 88, Processing Time 0.021 seconds

Implementing Socket Polling Server in Java (자바 언어를 이용한 소켓폴링 서버구현)

  • Sohn, Kang-Min;Kang, Tae-Gun;Ham, Ho-Sang
    • Proceedings of the Korea Information Processing Society Conference
    • /
    • 2002.11a
    • /
    • pp.115-118
    • /
    • 2002
  • 소켓 프로그래밍(socket programming) 인터페이스를 지원하는 C/C++, perl, python 과 같은 언어들은 폴링(polling) 기능을 갖는 select() 함수를 제공한다. 이 select()함수를 이용할 경우, 단일 쓰레드(또는 프로세스)로 다중의 클라이언트 요청을 처리할 수 있다. 최근 네트워크 프로그래밍 분야에서 주목받는 자바 언어의 경우, 최신 JDK 1.4 의 비동기 입출력 패키지에서 select()함수를 제공하고 있으나, JDK 1.3을 포함한 그 이하의 버전에서는 아직까지 이 함수를 제공하지 않고 있다. 일반적으로 다중 쓰레드를 이용하여 소켓서버 응용프로그램을 개발할 경우, 코드가 단순해지고 응답이 빠른 장점이 있는 반면에 네트워크 연결이 증가할수록 다수의 쓰레드를 관리하는 일이 CPU에 큰 부담이 된다. 반면에 소켓폴링(socket polling)을 사용할 경우, 이러한 연결 유지에 대한 부담이 줄어드는 대신, 다중 쓰레드를 이용하는 방법에 비하여 구현이 어렵다. 본 논문에서는 다양한 시뮬레이션 환경에서 세가지 소켓 프로그래밍 모델에 대하여 그 성능을 비교평가 하였다. 이 세가지 모델은 단순 다중 쓰레드 모델(typical multi-thread model), 단일 쓰레드 소켓폴링 모델(socket polling with single-thread model), 다중 쓰레드 소켓폴링 모델(socket polling with multi-threadmodel)이다. 본 논문에서는 다중 쓰레드 소켓폴링 모델을 제안하고 JDK 1.3.1을 이용하여 구현하였다. 이 모델의 경우 복잡한 구조에도 불구하고 단순 다중 쓰레드 모델와 유사하거나 더 나은 성능을 보여주었다. 또한 동일한 용량의 쓰레드 풀(thread pool)을 사용하더라도 단순 다중 쓰레드 모델보다 더 많은 수의 클라이언트를 수용할 수 있는 장점이 있다. 이러한 결과를 바탕으로 본 연구팀에서 수행중인 MoIM-Messge서버의 네트워크 모듈로 다중 쓰레드 소켓폴링 모델을 적용하였다.

  • PDF

Multi-thread Scheduling for the Network Processor (네트워크 프로세서를 위한 다중 쓰레드 스케줄링)

  • Yim, Kang-Bin;Park, Jun-Ku;Jung, Gi-Hyun;Choi, Kyung-Hee
    • The KIPS Transactions:PartC
    • /
    • v.11C no.3
    • /
    • pp.337-344
    • /
    • 2004
  • In this paper, we propose a thread scheduling algorithm for faster packet processing on the network processors with multithreaded multiprocessor architecture. To implement the proposed algorithm. we derived several basic parameters related to the thread scheduling and included a new parameter representing the packet contents and the multithreaded architecture. Through the empirical study using a simulator, we proved the proposed scheduling algorithm provides better throughput and load balancing compared to the general thread scheduling algorithm.

A Study on Enhancement of Multithreaded Dependence Graphs for Concurrent Java Program Slicing (병행 자바 프로그램 슬라이싱을 위한 다중쓰레드 종속성 그래프의 개선에 대한 연구)

  • Ryu, Hee-Yeol;Kim, Eun-Jung
    • Proceedings of the Korea Information Processing Society Conference
    • /
    • 2002.11c
    • /
    • pp.2055-2058
    • /
    • 2002
  • 병행 자바 프로그램의 슬라이싱 방법은 Jianjun Zhao에 의해 제안된 다중 쓰레드 종속성 그래프를 이용하여 Susan Horwitz, Thomas Reps, David Binkly가 제안한 2단계 마킹 알고리즘을 적용하여 슬라이스를 계산한다. 다중 쓰레드 종속성 그래프를 이용하는 방법은 쓰레드동기화 문장들 사이의 동기화 종속성과 서로 다른 쓰레드에 존재하는 공유객채들 사이의 통신 종속성 관계를 표현하여 병행 자바 프로그램의 슬라이스를 계산할 수 있는 것이다. 그러나 프로그램 종속성 그래프를 기반으로 하기 때문에 클래스 맴버 변수들에 대한 formal_in, formal_out, actual_in, actual_out정점들의 추가로 그래프의 복잡도가 증가하고 또한 부정확한 슬라이스 계산을 위한 다중 쓰레드 종속성 그래프를 개선하여 제안한다. 제안하는 개선된 다중 쓰레드 종속성 그래프는 주어진 슬라이싱 기준에 대한 2단계 마킹 알고리즘을 적용한 결과 정확한 슬라이스 계산과 복잡도 개선을 확인하였다.

  • PDF

Analysis of Multi-thread Fool Utilization Scheme on the Apache Web Server (아파치 웹 서버에서의 다중 쓰레드 풀 활용 기법 분석)

  • Jeon Heung Seok;Lee Seung Won;Kang Hyun Kyu
    • Journal of KIISE:Computer Systems and Theory
    • /
    • v.32 no.1
    • /
    • pp.21-28
    • /
    • 2005
  • Web servers or web application servers, in general, adopt multi-thread model for efficient handling of many user requests. However, the multi -thread model always does not show the better performance than multi -process model. Sometimes, in a certain specific case, it can show worse performance than multi -process model. In this paper, to trace the cause of the decreased performance of multi -thread model, we experiment and analyze the performance of the multi-thread model by using two approaches. At first, we compare the performance of the multi-process model and multi-thread model for various application environments. Second, we observe the effects of variations of web server's dynamic directives, which are used to increase the flexibility of the web server for various system environments. For the experiments, we integrated a web client simulator, which was written by us, with the Apache 2.0 web server. This paper shows and analyze the results of the experiments.

Design and Implementation of a Web Server Using a Learning-based Dynamic Thread Pool Scheme (학습 기반의 동적 쓰레드 풀 기법을 적용한 웹 서버의 설계 및 구현)

  • Yoo, Seo-Hee;Kang, Dong-Hyun;Lee, Kwon-Yong;Park, Sung-Yong
    • Journal of KIISE:Computing Practices and Letters
    • /
    • v.16 no.1
    • /
    • pp.23-34
    • /
    • 2010
  • As the number of user increases according to the improvement of the network, the multi-thread schemes are used to process the service requests of several users who are connected simultaneously. The static thread pool scheme has the problem of occupying a static amount of system resources. On the other hand, the dynamic thread pool scheme can control the number of threads according to the users' requests. However, it has disadvantage that this scheme cannot react to the requests which are larger than the maximum value assigned. In this paper, a web server using a learning-based dynamic thread pool scheme is suggested, which will be running on a server programming of a multi-thread environment. The suggested scheme adds the creation of the threads through the prediction of the next number of periodic requests using Auto Regressive scheme with the web server apache worker MPM (Multi-processing Module). Unlike previous schemes, in order to set the exact number of the necessary threads during the unchanged number of work requests in a certain period, K-Nearest Neighbor algorithm is used to learn the number of threads in advance according to the number of requests. The required number of threads is set by comparing with the previously learned objects. Then, the similar objects are selected to decide the number of the threads according to the request, and they create the threads. In this paper, the response time has decreased by modifying the number of threads dynamically, and the system resources can be used more efficiently by managing the number of threads according to the requests.

The Implementation of Multi-Threaded Basic Object Adapter to Invoke Server Object on iORB (iORB 객체 호출을 위한 다중쓰레드 방식의 Basic Object Adapter (BOA) 구현)

  • 이권일;남궁한
    • Proceedings of the Korean Information Science Society Conference
    • /
    • 1999.10c
    • /
    • pp.215-217
    • /
    • 1999
  • CORBA 2.0 규격에 따라 구현돈 인터넷 Java ORB인 iORB는 Common Object Request Broker Architecture (CORBA) 객체 호출을 위한 Basic Object Adapter (BOA)를 클라이언트와 서버 객체 사이의 연결 설정과 요청 처리를 분리한 다중 쓰레드 방식으로 제공하고 있다. 본 논문은 다중 쓰레드 방식을 지원하는 iORB의 BOA 설계 및 구현에 관한 것이다.

  • PDF

Performance Analysis of Web-Crawler in Multi-thread Environment (다중 쓰레드 환경에서 웹 크롤러의 성능 분석)

  • Park, Jung-Woo;Kim, Jun-Ho;Lee, Won-Joo;Jeon, Chang-Ho
    • Proceedings of the Korean Society of Computer Information Conference
    • /
    • 2009.01a
    • /
    • pp.473-476
    • /
    • 2009
  • 본 논문에서는 다중 쓰레드 환경에서 동작하는 웹 크롤러를 구현하고 성능을 분석한다. 이 웹 크롤러의 특징은 검색시간을 단축하기 위하여 크롤링, 파싱 및 페이지랭킹, DB 저장 모듈을 서로 독립적으로 다른 작업을 수행하도록 구현한 것이다. 크롤링 모듈은 웹상의 데이터를 수집하는 기능을 제공한다. 그리고 파싱 및 페이지랭크 모듈은 수집한 데이터를 파싱하고, 웹 페이지의 상대적인 중요도를 수치로 계산하여 페이지랭크를 지정한다. DB 연동 모듈은 페이지랭크 모듈에서 구한 페이지랭크를 데이터베이스에 저장한다. 성능평가에서는 다중 쓰레드 환경에서 쓰레드 수와 웹 페이지의 수에 따른 검색 시간을 측정하여 그 결과를 비교 평가한다.

  • PDF

Implementation of Networked Virtual Environment by Using Effective Java Multi-Thread Parallelism (효과적인 자바 다중 쓰레드 병렬처리를 이용한 네트워크 가상환경의 구현)

  • Kim, Woo-Yeal;Park, Jong-Koo
    • Proceedings of the Korea Information Processing Society Conference
    • /
    • 2004.05a
    • /
    • pp.829-832
    • /
    • 2004
  • 대단위(large-scale) 가상현실 시스템이나 가상현실 시스템의 구성요소가 네트워크(일반적인 통신망)를 통하여 분산되어 있는 경우를 네트워크 가상현실 시스템(Net-VE : Networked Virtual Environment)이라 한다. 가상현실의 환경을 분산 처리하는 경우 가상현실 시각의 공유방법, 분산시스템의 구성방법, 저속 혹은 고속통신망을 통한 대량의 데이터를 전송하는 방법, 가상현실 내의 이용자의 상호작용 방법, 데이터 공유방법, 분산처리 방법 등 가상현실 기술에 부가하여 통신망기술, 프로토콜 공학, 분산 처리기술 등 다양한 주변 기술이 필요하다. 따라서 본 논문에서는 더 유연성 있고 모듈러한 네트워크 가상 환경을 구축하는데 있어 효율적인 객체 지향 프로그래밍 기술인 자바의 다중 쓰레드 병렬처리 기법을 사용하고자 한다. 자바의 쓰레드 구조를 사용함으로써 네트워크 가상환경에서 여러 클라이언트에서 요청하는 데이터를 네트워크를 통한 지연에 대한 효과적인 대안으로서 자바의 다중 쓰레드 병렬처리 기법을 제안하고자 한다.

  • PDF

Distributed Shared Memory Scheme for Multi-thread programming (다중쓰레드 프로그래밍을 위한 분산공유메모리 관리 기법)

  • Seo, Dae-Wha
    • The Transactions of the Korea Information Processing Society
    • /
    • v.3 no.4
    • /
    • pp.791-802
    • /
    • 1996
  • In this paper, we discuss a distributed shared memory management scheme based on multi-threaded programming model for a large-scale loosely coupled multiprocessor system. The scheme covers three major issues in the distribued shared memory;the address translation table management, the block coherence maintenance, and the block placement policy. The scheme efficiently resolves the general problems occurred in the distributed shared memory such as a false sharing, an unnecessary replication, a block bouncing, and an address aliasing phenomenon. It also provides the application transparency, good scalability, easy implementation, and multithreaded programming model to users.

  • PDF

Educational Practice Example of Information and Communications Technology: Measurement of Data Transfer Time for Concurrent Server Model (정보통신기술 실습사례: 병행서버모델의 데이터 전송시간 측정)

  • Son, Myung-Rak;Lee, Yong-Jin
    • 대한공업교육학회지
    • /
    • v.33 no.1
    • /
    • pp.265-281
    • /
    • 2008
  • The objective of this study is to show practice example let student experience about concurrent servers based multi-processes and multi-thread among the principles of data communication in ICT(information and communications technology). For this, we first implement multi-process server(fork server) and multi-thread server(thread server), and multi-thread client(thread client), Secondly, for experimental environment, we developed small ethernet networks and measure data transfer time with relation to the number of users. Experimental results show that mean transfer time of thread server is less than that of fork server by 20~61 % on average. Furthermore, it is found that the difference of data transfer time between fork server and thread server is proportional to that of the number of users. Main reason of performance difference dues to the difference between process forking time and thread creation time. We can also find that context switching for process and thread affects the load of web server. Our presentation and experimental results can be applied to used as the educational practice materials with which student can experience data communication principles.