38
Open Darwin

Roseannandariane

Embed Size (px)

Citation preview

Page 1: Roseannandariane

Open Darwin

Page 2: Roseannandariane

Contents

• 1 Goals• 2 Organization• 3 Contributing• 4 Sponsors• 5 Frequently asked questions

– 5.1 Why spend time on Darwin?– 5.2 How does PureDarwin relate to the former OpenDarwin project?– 5.3 How does PureDarwin relate to the DarwinBuild project?– 5.4 What does the "Pure" in PureDarwin stand for?– 5.5 Where can I find an ISO image?– 5.6 When do you plan to release a full ISO image?

• 6 PureDarwin Logo

Page 3: Roseannandariane

Goals

• 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.

Page 4: Roseannandariane

ORGANIZATION

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.

Page 5: Roseannandariane

Contributing

• Like other open source projects, PureDarwin is looking for contributors for all aspects of the project.

• 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 irc.freenode.net 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.

• A non exhaustive list of the field where investigation has still not yet been done is available here.

Page 6: Roseannandariane

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.

Sponsors

Page 7: Roseannandariane

FREQUENTLY ASKED QUESTIONS

Page 8: Roseannandariane

For learning and fun.

Why spend time on Darwin?

Page 9: Roseannandariane

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.

How does PureDarwin relate to former OpenDarwin project?

Page 10: Roseannandariane

Darwin Build is one of Pure Darwin's main upstream projects. 

How does Pure Darwin relate to the Darwin Build project?

Page 11: Roseannandariane

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.

What does the "Pure" in PureDarwin stand for?

Page 12: Roseannandariane

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).

Where can I find an ISO image?

Page 13: Roseannandariane

Probably when the DarwinBuild project and the MacPorts project will be able to run on a mature PureDarwin release without any "impurity".

When do you plan to release a full ISO image?

Page 14: Roseannandariane

source software titles. 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.

  This page shows (modulo delay) where we currently

are and tend to be updated as we progress (see the current blockers).

  Next releases are challenging Darwin10. However, a last release based on Darwin 9 (Imminent!)

will be available in the meantime, potentially including:

Status

Page 15: Roseannandariane

The Apple vanilla kernel Alternative kernel (Voodoo xnu-dev) The Chameleon bootloader The PureFoundation framework A functional compilation environment (e.g.: gcc (and

llvm)) The MacPorts project The dawn of network and audio support An alpha stage1/stage2 in order to deploy

PureDarwin More, and what is already present (e.g., DTrace,

(X11), etc...)

Page 16: Roseannandariane

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.

  At the same time, the PureDarwin project would like to

invite the community to discuss, participate and contribute. 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.

  A minimal PureDarwin system known as "PureDarwin nano"

is also available, where only one process is running (a shell).

Page 17: Roseannandariane

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.

Apple Releases Darwin 1.0 Open Source

New Mac OS Core and QuickTime Streaming Server Released to Tens of Thousands of Developers

Page 18: Roseannandariane

“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.”

Page 19: Roseannandariane

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.

Page 20: Roseannandariane

In addition to Darwin 1.0, Apple also announced an update to the Darwin Streaming Server, the open source version of Apple’s QuickTimeTM Streaming 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.

Page 21: Roseannandariane

Darwin 1.0 is available for immediate download at www.apple.com/darwin. The CD set will be available from the Apple Developer Connection website, www.apple.com/developer, for US$20. Darwin Streaming Server will be available in May.

Pricing & Availability

Page 22: Roseannandariane

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.

Page 23: Roseannandariane

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.

Streaming server

Page 24: Roseannandariane

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.

Who should use Darwin Streaming Server?

Page 25: Roseannandariane

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.

Page 26: Roseannandariane

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

Page 27: Roseannandariane

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.

Q. What is Darwin Streaming Server?

Page 28: Roseannandariane

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:

A security fix for possible stack and heap overflow attacks in the StreamingProxy (CVE-2007-0748, CVE-2007-0749)

Compilation problems using gcc 4 (Andreas Thienemann) Support for SDPs created by VLC and Mpeg4IP (David Moore) Fix date display in DSS Web Admin (Maksym Veremeyenko) Better support for streaming through NAT (Denis Ahrens) Better support for running DSS on a multi-homed system (Denis Ahrens) Relaying problems with VLC (Alessandro Falaschi

http://labtel.ing.uniroma1.it/opencdn/darwinp.html A fix for sync sample searching on Intel-based Macs. A fix for an infinite loop when the server fails to bind to streaming ports. An enhancement allowing RTSP requests to contain the hh:mm:ss format

for the npt value (Fredrik Widlund)

Q. What's new in DSS 5.5.5?

Page 29: Roseannandariane

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).

Q. What does the Darwin Streaming Server source include?

Page 30: Roseannandariane

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:

OSThread, OSCond, OSMutex: Implements threads, mutexes, and condition variables. The implementations provided work on MacOS X as well as any platform that supports pthreads.

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.

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.

Q. What platforms does the source compile and run on?

Page 31: Roseannandariane

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.

Q. What is the QTFile library?

Page 32: Roseannandariane

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.

Q. What is the reflector, and how does it work?

Page 33: Roseannandariane

The Event Queue is an extension to the sockets API that exists on Mac OS X. It consists of three API calls:

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.

Q. What is the Event Queue?

Page 34: Roseannandariane

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.

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.

Page 35: Roseannandariane

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.

Q. How does the Darwin Streaming Server (DSS) employ threads?

Page 36: Roseannandariane

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.

Q. What are Task objects?

Page 37: Roseannandariane

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.

Page 38: Roseannandariane

SUBMITTED BY:

◦ Roseann Delatorre

and◦Ariane mae Porcincula