Published on

  • Be the first to comment

  • Be the first to like this


  1. 1. OpenDarwin<br />
  2. 2. Contents<br />1 Goals<br />2 Organization<br />3 Contributing<br />4 Sponsors<br />5 Frequently asked questions<br />5.1 Why spend time on Darwin?<br />5.2 How does PureDarwin relate to the former OpenDarwin project?<br />5.3 How does PureDarwin relate to the DarwinBuild project?<br />5.4 What does the "Pure" in PureDarwin stand for?<br />5.5 Where can I find an ISO image?<br />5.6 When do you plan to release a full ISO image?<br />6 PureDarwin Logo<br />
  3. 3. Goals<br />The goal of the Pure Darwin project is to make Darwin more usable for open source enthusiasts and developers by providing documentation and by enabling them to retrieve, understand, modify, build, and distribute Darwin. <br />
  4. 4. Organization<br />The Pure Darwin project is organized very informally at this stage. There are no official boards and committees. We are not interested in politics and personal agendas, just in smart concepts and quality code. Our team is loosely coupled by a common interest in Darwin and by upholding true Open Source spirit.<br />
  5. 5. Contributing<br />Like other open source projects, PureDarwin is looking for contributors for all aspects of the project. <br />The PureDarwin project is always looking for talented individuals to contribute to and join the project. To contribute to the PureDarwin project, you should first familiarize yourself with the contents of this wiki. You can also join some IRC discussion on the #puredarwin channel on and helping each others. Contributing to the project can take various forms, from adding documentation to sending in patches and constructive feedback in the "Google Code" repository.<br />A non exhaustive list of the field where investigation has still not yet been done is available here.<br />
  6. 6. We have no official sponsors as of yet. We would however like to thank Google for hosting this site. We'd also like to thank Apple, Inc. for making Darwin available and especially for maintaining the Darwin Build project.<br />Sponsors<br />
  8. 8. For learning and fun. <br />Why spend time on Darwin?<br />
  9. 9. Although some people have been seeing Pure Darwin as the informal successor to Open Darwin, there is no official relationship other than the fact that Open Darwin and Pure Darwin are both downstream Darwin projects. Also, there is no secret that Pure Darwin would not exist if Open Darwin had not closed down. Coming later in time, Pure Darwin is in the fortunate position to be able to benefit from the valuable contributions that were rooted in the Open Darwin project.<br />How does PureDarwinrelate to former OpenDarwinproject?<br />
  10. 10. Darwin Buildis one of Pure Darwin's main upstream projects. <br />How does Pure Darwin relate to the Darwin Build project?<br />
  11. 11. Pure as in beer! It means that we just use components specifically released by Apple for use with Darwin, as well as other Open Source components (collectively called "upstream code"). Specifically, it means that we do not use any components from Mac OS X. It also means that we try to stay as close as possible to the "outside world" as in Mac OS X (e.g., regarding the choice of compilers, options, etc.). It does not mean, however, that we do not modify and add to the upstream code, to the extent that the respective licenses allow.<br />What does the "Pure" in PureDarwin stand for?<br />
  12. 12. A ready-made VMware virtual machine is available in the Downloads page. This virtual machine contains an ISO that could be used on real hardware as well. It is a proof-of-concept of a minimal Darwin 9 system built from the DarwinBuild project. Please, note that you need the latest VMware (Player 2.5, Fusion 2).<br />Where can I find an ISO image?<br />
  13. 13. Probably when the DarwinBuild project and the MacPorts project will be able to run on a maturePureDarwin release without any "impurity".<br />When do you plan to release a full ISO image?<br />
  14. 14. source software titles.<br />The screenshot above shows a PureDarwin 9 system created from the scripts in our repository, running on real hardware, using TightVNC and XFCE from MacPorts.<br /> <br />This page shows (modulo delay) where we currently are and tend to be updated as we progress (see the current blockers).<br /> <br />Next releases are challenging Darwin10.<br />However, a last release based on Darwin 9 (Imminent!) will be available in the meantime, potentially including:<br />Status<br />
  15. 15. The Apple vanilla kernel<br />Alternative kernel (Voodoo xnu-dev)<br />The Chameleon bootloader<br />The PureFoundation framework<br />A functional compilation environment (e.g.: gcc (and llvm))<br />The MacPorts project<br />The dawn of network and audio support<br />An alpha stage1/stage2 in order to deploy PureDarwin<br />More, and what is already present (e.g., DTrace, (X11), etc...)<br />
  16. 16. The PureDarwin project announces the availability of "PureDarwin Xmas", a developer preview of the upcoming operating system based on Apple's Darwin 9 sources and other Open Source projects.<br /> <br />At the same time, the PureDarwin project would like to invite the community to discuss, participate and contribute.<br />The developer preview is available for download as a pre-configured virtual machine for VMware Fusion 2.0 on Macintosh, and the code used to generate it is available in a Subversion/Mercurial repository form.<br /> <br />A minimal PureDarwin system known as "PureDarwinnano" is also available, where only one process is running (a shell).<br />
  17. 17. INTERNET WORLD, LOS ANGELES - April 5, 2000 - Apple® today announced the release of Darwin 1.0, the advanced operating system core at the heart of Mac® OS X, and the release of an updated Darwin Streaming Server. Darwin’s open source model allows the tens of thousands of registered Darwin developers to modify, customize and extend key Apple software, including the modern mach kernel and BSD layers found in Apple’s next generation operating system, Mac OS X.<br />Apple Releases Darwin 1.0 Open Source<br />New Mac OS Core and QuickTime Streaming Server Released to Tens of Thousands of Developers<br />
  18. 18. “The core of Mac OS X is the only mainstream operating system following an open source model,” said Philip Schiller, Apple’s vice president of Worldwide Product Marketing. “The new Darwin 1.0 posting includes some of the most advanced operating system technology available, and it’s open to our customers and developers so that we may collaborate on the future of the Mac OS.”<br />
  19. 19. The new Darwin kernel is based on FreeBSD and Mach 3.0 technologies and supports the Kernel Extension Developer Kit (KDK) for developing drivers and loadable modules.  Darwin 1.0 gives developers access to essential Mac OS X source code. This allows developers to enhance the feature set, performance and quality of Mac OS X products in partnership with Apple engineers. Darwin 1.0 is processor-independent and is built for PowerPC and Intel platforms, enabling Open Source developers to work on Darwin projects on the widest choice of computer systems.<br />
  20. 20. In addition to Darwin 1.0, Apple also announced an update to the Darwin Streaming Server, the open source version of Apple’s QuickTimeTMStreaming Server software, which is used to stream high-quality audio and video over the Internet. The Darwin Streaming Server is the only open source, standards-based and free Internet streaming server. This update makes the Darwin Streaming Server available for Windows NT-based systems, expanding support for developers creating streaming server products based on five different operating systems - Mac OS X, FreeBSD, Linux, Solaris and now Windows NT.<br />
  21. 21. Darwin 1.0 is available for immediate download at The CD set will be available from the Apple Developer Connection website,, for US$20. Darwin Streaming Server will be available in May.<br />Pricing & Availability<br />
  22. 22. Apple ignited the personal computer revolution in the 1970s with the Apple II and reinvented the personal computer in the 1980s with the Macintosh. Apple is committed to bringing the best personal computing experience to students, educators, creative professionals and consumers around the world through its innovative hardware, software and Internet offerings.<br />
  23. 23. Welcome to Darwin Streaming Server, the open source version of Apple's QuickTime Streaming Server technology that allows you to send streaming media to clients across the Internet using the industry standard RTP and RTSP protocols. Based on the same code base as QuickTime Streaming Server, Darwin Streaming Server provides a high level of customizability and runs on a variety of platforms allowing you to manipulate the code to fit your needs.<br />Streaming server<br />
  24. 24. While sharing the same code base as QuickTime Streaming Server, Darwin Streaming Server is an open source project intended for developers who need to stream QuickTime and MPEG-4 media on alternative platforms such as Windows, Linux, and Solaris, or those developers who need to extend and/or modify the existing streaming server code to fit their needs. Darwin Streaming Server is only supported by the open source community and is not eligible for technical support from Apple. Apple hosts a number of email discussion lists for Darwin Streaming Server users and developers to share ideas and discuss deployment scenarios.<br />Who should use Darwin Streaming Server?<br />
  25. 25. QuickTime Streaming Server (QTSS) is Apple's commercial streaming server delivered as part of Mac OS X Server. QTSS provides users with enhanced administration and media management tools as a result of the tight integration with Mac OS X Server; these tools are not available as part of the open source project. Technical support is available for QTSS as part of the AppleCare support plans provided for Mac OS X Server and Xserve.<br />
  26. 26. Both DSS and QTSS are built on a core server that provides state of the art quality of service features with Skip protection and Instant-On, and support for the latest digital media standards, MPEG-4 and 3GPP<br />
  27. 27. Darwin Streaming Server is the open source version of the QuickTime Streaming Server allowing you to stream hinted QuickTime, MPEG-4, and 3GPP files over the Internet via the industry standard RTP and RTSP protocols.<br />Q. What is Darwin Streaming Server?<br />
  28. 28. DSS 5.5.5 includes submissions from the developer community as well as a security fix for the streaming proxy. The fixes include the following:<br />A security fix for possible stack and heap overflow attacks in the StreamingProxy (CVE-2007-0748, CVE-2007-0749) <br />Compilation problems using gcc 4 (Andreas Thienemann) <br />Support for SDPs created by VLC and Mpeg4IP (David Moore) <br />Fix date display in DSS Web Admin (MaksymVeremeyenko) <br />Better support for streaming through NAT (Denis Ahrens) <br />Better support for running DSS on a multi-homed system (Denis Ahrens) <br />Relaying problems with VLC (Alessandro Falaschi<br />A fix for sync sample searching on Intel-based Macs. <br />A fix for an infinite loop when the server fails to bind to streaming ports. <br />An enhancement allowing RTSP requests to contain the hh:mm:ss format for the npt value (Fredrik Widlund) <br />Q. What's new in DSS 5.5.5?<br />
  29. 29. The package includes source files for a streaming server that can both serve on-disk QuickTime, MPEG-4, and 3GPP files and reflect live broadcasts, as well as source for the proxy (except on Windows).<br />Q. What does the Darwin Streaming Server source include?<br />
  30. 30. The source currently compiles and runs on Mac OS X Server, Linux (Red Hat 8 or higher recommended), Solaris 9, and Windows 2000/2003 Server. It can be ported to other platforms by modifying a handful of platform specific source files:<br />OSThread, OSCond, OSMutex: Implements threads, mutexes, and condition variables. The implementations provided work on MacOS X as well as any platform that supports pthreads. <br />OS: Includes some platform-specific code for getting the current time. Implementations provided work on MacOS X as well as any platform that supports gettimeofday. <br />Socket: This class is C++ wrapper for the sockets API. On MacOS X, this class uses a set of APIs collectively called the Event Queue for receiving events from sockets in non-blocking mode. For other platforms, an implementation of the Event Queue APIs using select() has been provided in ev.cpp. For more details on the Event Queue, see "What is the Event Queue?" in the FAQ section. <br />Q. What platforms does the source compile and run on?<br />
  31. 31. One of the major features of the Darwin Streaming Server is the ability to serve hinted QuickTime files over RTSP and RTP. All of the code for parsing hinted QuickTime files has been abstracted into the QTFile library. Separating the code in this way keeps both parts much simpler: QTFile only deals with file parsing, the Darwin Streaming Server only deals with networking and protocols. The RTPFileModule in the server calls the QTFile library to retrieve packets and meta-data from hinted QuickTime files.<br />Q. What is the QTFile library?<br />
  32. 32. The reflector allows an administrator to deliver live broadcasts to RTSP clients. The reflector is implemented as an RTP module, and the source code is entirely in RTPReflectorModule.h/.cpp, and ReflectorSession.h/.cpp.<br />Q. What is the reflector, and how does it work?<br />
  33. 33. The Event Queue is an extension to the sockets API that exists on Mac OS X. It consists of three API calls:<br />watchevent: Watch for events on a file descriptor (socket). waitevent: Wait for events on any of sockets (this is a blocking call, it only returns when there is an event pending). modwatch: When waitevent returns an event for a socket, that socket won't receive any new events until modwatch is called for that socket.<br />Q. What is the Event Queue?<br />
  34. 34. The use of these API calls is almost exclusively contained within Socket.cpp. This file contains the implementation of a thread object called SocketEventQueueThread. This thread blocks on waitevent and notifies the proper Task object (See "What Are Task Objects?") when an event is received.<br />For other UNIX platforms, an implementation of these three Event Queue API calls is provided in terms of select(). This implementation is contained in ev.cpp.<br />
  35. 35. DSS has three main threads managing its subsystems: a single connection thread for managing all connections, a task thread for servicing tasks, and an idle thread for time based tasks. DSS does not dedicate a thread per connection because the cost of servicing multiple connections would become prohibitively expensive when hundreds or thousands of connections are active. Typically connections last anywhere from 5 minutes to hours. To allow the server to scale into the thousands of connections, the Darwin Streaming Server uses asynchronous I/O wherever possible so a given thread will never block.<br />Q. How does the Darwin Streaming Server (DSS) employ threads?<br />
  36. 36. Because the server is largely asynchronous, there needs to be a communication mechanism for events. For instance, when a socket used for an RTSP connection gets data, something has to be notified so that data can be processed. The Task object is a generalized mechanism for performing this communication.<br />Q. What are Task objects?<br />
  37. 37. Each Task object has two major methods: Signal and Run. Signal is called by the server to send an event to a Task object. Run is called to give time to the Task for processing the event. The goal of each Task object is to implement server functionality using small non-blocking time slices. Run is a pure virtual function that is called when a Task object has events to process. Inside the Run function, the Task object can call GetEvents to receive and automatically dequeue all its current and previously Signaled events. All Task functions are atomic: if a Task object calls GetEvents in its Run function, and is then Signaled before the Run function completes, the Run function will be called again for the new event after exiting the function. In fact, the Task"s Run function will be called repeatedly until the task object"s event queue has been cleared with GetEvents. Run functions are not re-entered during execution due to new signaled events.<br />
  38. 38. Submitted by:<br />Roseann Delatorre<br /> and<br />ArianemaePorcincula<br />