»
S
I
D
E
B
A
R
«
Grand Central Dispatch ported on FreeBSD
October 14th, 2009 by Wegra Lee

Grand Central Dispatch 가 벌써 타 OS 에 포팅되었다. 대상은, OS X 와 가장 가까운 친척인 FreeBSD. FreeBSD 는 CLang 도입에도 적극적이고.. 여러모로 Apple 과 친한 사이로 보인다.

하지만 마이너 OS 인 FreeBSD 보다는, 리눅스 진영이 이를 받아들이느냐가 훨씬 큰 관심사다.  OS X 이 데스크탑/서버 분야에서는 그리 대중적이지 못하고, iPhone/iPod touch를 필두로 세를 확장 중인 모바일 시장은 GCD 의 잇점을 제대로 살리기에는 아직 몇 년이 더 필요하다. 뿐만 아니라, 최근 Gartner 의 전망치에서도 보듯, 모바일에서도 iPhone 은 몇 년 내에 Linux 기반인 Android 에 점유율 역전을 당할 가능성이 높다.

아래는 FreeBSD 의 분기 진행상황 리포트에서 발췌해온 내용이다. 내용에서도 나와있지만 배포본에서는 당장은 볼 수 없고.. 8.1 버전 정도가 나오면 접해볼 수 있을 듯 하다.

Grand Central Dispatch – FreeBSD port

URL: http://libdispatch.macosforge.org/

Contact: Robert Watson <rwatson@FreeBSD.org>
Contact: Stacey Son <sson@FreeBSD.org>
Contact: libdispatch mailing list <libdispatch-dev@lists.macosforge.org>

We have ported libdispatch, Apple’s Grand Central Dispatch event and concurrency framework to FreeBSD:

  • Added new kqueue primitives required to support GCD, such as EVFILT_USER and EV_TRIGGER
  • Created autoconf and automake build framework for libdispatch
  • Modified libdispatch to use POSIX semaphores instead of Mach semaphores
  • Adapted libdispatch to use portable POSIX time routines

Jordan Hubbard has also prepared a blocks-aware clang compiler package for FreeBSD. When compiled with clang, libdispatch provides blocks-based, as well as function-based callbacks.

The port was presented at the FreeBSD Developer Summit in Cambridge, UK in September, and slides are online on the devsummit wiki page. A FreeBSD port is now available in the Ports Collection. After FreeBSD 8.0-RELEASE has shipped, the new kqueue primitives will be MFC’d so that libdispatch works out of the box on FreeBSD 8.1-RELEASE.

Open tasks:

  1. Complete porting of libdispatch test suite to FreeBSD.
  2. Investigate pthread work queue implementation for FreeBSD.
  3. Evaluate performance impact of some machine-dependent and OS-dependent optimizations present in the Mac OS X version of libdispatch to decide if they should be done for other platforms and OS’s.
  4. Explore whether FreeBSD base operating system tools would benefit from being modified to use libdispatch.
Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • LinkedIn
  • MySpace
  • PDF
  • RSS
  • Twitter

Leave a Reply

»  Substance: WordPress   »  Style: Ahren Ahimsa