검색 상세

효율적인 자원 사용을 위한 동적인 쓰레드 풀 모델 : Dynamic thread pool model for efficient resource usage

  • 발행기관 서강대학교 대학원
  • 발행년도 2003
  • 학위수여년월 2003.년
  • 학위명 석사
  • 학과 및 전공 컴퓨터학과
  • 식별자(기타) 000000083445
  • 본문언어 한국어

목차

네트워크환경의 발전과 이에 따른 사용자들의 증가로 인해서, 웹서버, 파일서버, 코바(CORBA)와 같은 미들웨어들은 보다 많은 동시접속을 처리할 수 있는 능력을 필요로 하게 되었고, 멀티 쓰레드를 이용하여 다양한 형태의 모델들이 개발되어 왔다.
대부분의 서버프로그램에서 사용하는 쓰레드 풀(Thread Pool) 모델은 고정된 쓰레드 풀(Bounded Thread Pool)모델로서 서버에 최적화된 쓰레드 개수를 이용하여 많은 사용자들의 요청에 대해서도 빠른 시간에 응답할 수 있다는 장점이 있으나, 사용자의 접속이 적을 때에도 항상 고정된 시스템 자원을 점유함으로써 점유되고 있지만 사용되지 않는 자원을 다른 프로그램들이 사용할 수 없다는 단점이 존재한다.
본 논문에서는 이러한 자원을 활용하기 위해 동적으로 쓰레드 풀의 크기를 변경하는 방법을 설계 및 구현하였으며, 쓰레드의 생성과 삭제에 걸리는 오버헤드와 이로 인한 사용자의 요청에 대한 응답시간의 증가를 줄이기 위해서 지수 평균을 응용한 방법을 이용하였다.
일정 주기로 지수평균으로 계산된 값으로 쓰레드의 개수를 조정함으로써 단순히 클라이언트의 접속량에 따라서 쓰레드의 양을 늘이거나 줄이는 방법에 비해서 쓰레드의 생성 및 삭제의 빈도가 줄어들게 되며, 접속이 증가하는 추세일 경우에는 그 값을 예측해서 미리 쓰레드를 생성함으로써 사용자의 요청에 대한 응답시간을 줄일 수 가 있다.
이렇게 쓰레드의 개수를 고정시키지 않고, 현재의 상황에 맞춰서 바꿔줌으로써 항상 고정된 개수의 쓰레드를 가지고 있는 고정된 쓰레드 풀 모델에 비해서 자원은 적게 사용하면서도 비슷한 성능을 지닐 수 있도록 구현을 하였다.

more

목차

As the improvement of network environment and growth of users, Web server, File server, Middle-ware like CORBA has been required a more ability for handling many requests.
For doing these things, there exist two models for modelling a server programming that handles many requests from users concurrently. one is a multi-process model, and the other is a multi-thread model. Because process has much more overhead for creating and deleting than thread, usually multi-threading model is used for server programming and we can classify multi-thread model as Thread per Request model, Thread Per Connection model, Thread Pool model, Leader / Follower Thread Pool model, and Watermark Thread pool model according to creation policy of threads.
In most cases, Thread Pool model(especially Bounded Thread Pool Model) is used for server programming. Because it reduces a overhead of creating and deleting overhead using creating threads in advance and consisting thread pool, so it can response more quickly for users' requests. But this model always occupies system resource when there are small requests, so other applications can't use that resources.
In this paper, for utilizing occupied but unused resources we implemented a Dynamic Thread Pool model using customized exponential average and slow deletion of unneeded threads. and from the experiments, we could find out that the performance of this model is better than bounded thread pool model in some cases, and uses small resources.

more