|
The Netscape Portable Runtime, or NSPR, is a platform abstraction library that makes all operating systems it supports appear the same to Mozilla. NSPR provides platform independence for non-GUI operating system facilities. These facilities include threads, thread synchronization, normal file and network I/O, interval timing and calendar time, basic memory management (malloc and free) and shared library linking. A good portion of the library's purpose, and perhaps the primary purpose in the Gromit environment, is to provide the underpinnings of the Java VM, more or less mapping the sys layer that Sun defines for the porting of the Java VM to various platforms. NSPR does go beyond that requirement in some areas and since it is also the platform independent layer for most of the servers produced by Netscape. It is expected and preferred that existing code be restructured and perhaps even rewritten in order to use the NSPR API. It is not a goal to provide a platform for the porting into Netscape of externally developed code. Software development is the translation of a user need or marketing goal into a software product. ...
The Mozilla Foundation (abbreviated MF or MoFo) is a non-profit organization that exists to support and provide leadership for the open source Mozilla project. ...
The Mozilla Corporation is a wholly owned subsidiary of the Mozilla Foundation that coordinates and integrates the development of Internet-related applications such as the Mozilla Firefox web browser and the Mozilla Thunderbird email client by the growing global community of open-source developers, only some of whom are employed...
A software release refers to the creation and availability of a new version of a computer software product. ...
January 22 is the 22nd day of the year in the Gregorian calendar. ...
2007 (MMVII) is the current year, a common year starting on Monday of the Gregorian calendar and the Anno Domini (common) era. ...
An operating system (OS) is a computer program that manages the hardware and software resources of a computer. ...
A cross-platform (or platform independent) programming language, software application or hardware device works on more than one system platform (e. ...
Illustration of an application which may use libvorbisfile. ...
A software license is a legal agreement which may take the form of a proprietary or gratuitous license as well as a memorandum of contract between a producer and a user of computer software. ...
In computing, the Mozilla Public License (MPL) is an open source and free software license. ...
The GNU logo The GNU General Public License (GNU GPL or simply GPL) is a widely-used free software license, originally written by Richard Stallman for the GNU project. ...
GNU logo The GNU Lesser General Public License (formerly the GNU Library General Public License) is a free software license published by the Free Software Foundation. ...
A website (or Web site) is a collection of web pages, images, videos and other digital assets and hosted on a particular domain or subdomain on the World Wide Web. ...
An operating system (OS) is a computer program that manages the hardware and software resources of a computer. ...
Mozilla is a computer term which has had many different uses, though all of them have been related to the now-defunct Netscape Communications Corporation and its related application software. ...
A cross-platform (or platform independent) programming language, software application or hardware device works on more than one system platform (e. ...
An operating system (OS) is a computer program that manages the hardware and software resources of a computer. ...
Look up Thread on Wiktionary, the free dictionary The word thread has many meanings: A thread is a kind of thin yarn, which is thin fibers spun together. ...
In computing, malloc is a subroutine provided in the C programming languages standard library for performing dynamic memory allocation. ...
A Java virtual machine or JVM is a virtual machine that runs Java byte code. ...
In computer science, porting is the process of adapting software so that an executable program can be created for a computing environment that is different from the one for which it was originally designed (e. ...
History
The current generation of NSPR is known as NSPR20. The first generation of NSPR was originally conceived just to satisfy the requirements of porting Java to various host environments. NSPR20, an effort started in 1996, builds on that original idea, though very little is left of the original code. (The "20" in "NSPR20" does not mean "version 2.0" but rather "second generation".) Many of the concepts have been reformed, expanded, and matured. Today NSPR may still be appropriate as the platform dependent layer under Java, but its primary application is supporting clients written entirely in C or C++.
How It Works NSPR's goal is to provide uniform service over a wide range of operating system environments. It strives to not export the lowest common denominator, but to exploit the best features of each operating system on which it runs, and still provide a uniform service across a wide range of host offerings.
Threads Threads are the major feature of NSPR. The industry's offering of threads is quite sundry. NSPR, while far from perfect, does provide a single API to which clients may program and expect reasonably consistent behavior. The operating systems provide everything from no concept of threading at all up to and including sophisticated, scalable and efficient implementations. NSPR makes as much use of what the systems offer as it can. It is a goal of NSPR that NSPR impose as little overhead as possible in accessing those appropriate system features.
Thread synchronization Thread synchronization is loosely based on Monitors as described by C.A.R. Hoare in Monitors: An operating system structuring concept, Communications of the ACM, 17(10), October 1974 and then formalized by Xerox' Mesa programming language ("Mesa Language Manual", J.G. Mitchell et al, Xerox PARC, CSL-79-3 (Apr 1979)). This mechanism provides the basic mutual exclusion (mutex) and thread notification facilities (condition variables) implemented by NSPR. Additionally, NSPR provides synchronization methods more suited for use by Java. The Java-like facilities include monitor reentrancy, implicit and tightly bound notification capabilities with the ability to associate the synchronization objects dynamically.
I/O NSPR's I/O is a slightly augmented BSD sockets model that allows arbitrary layering. It is was originally intended to export synchronous I/O methods only, relying on threads to provide the concurrency needed for complex applications. That method of operation is preferred though it is possible to configure the network I/O channels as non-blocking in the traditional sense.
Network Addresses Part of NSPR deals with manipulation of network addresses. NSPR defines a network address object that is Internet Protocol (IP) centric. While the object is not declared as opaque, the API provides methods that allow and encourage clients to treat the addresses as polymorphic items. The goal in this area is to provide a migration path between IPv4 and IPv6. To that end it is possible to perform translations of ASCII strings (DNS names) into NSPR's network address structures, with no regard to whether the addressing technology is IPv4 or IPv6.
Time Timing facilities are available in two forms: interval timing and calendar functions. Interval timers are based on a free running, 32-bit, platform dependent resolution timer. Such timers are normally used to specify timeouts on I/O, waiting on condition variables and other rudimentary thread scheduling. Since these timers have finite namespace and are free running, they can wrap at any time. NSPR does not provide an epoch, but expects clients to deal with that issue. The granularity of the timers is guaranteed to be between 10 microseconds and 1 millisecond. This allows a minimal timer period in of approximately 12 hours. But in order to deal with the wrap-around issue, only half that namespace may be utilized. Therefore, the minimal usable interval available from the timers is slightly less than six hours. Calendar times are 64-bit signed numbers with units of microseconds. The epoch for calendar times is midnight, January 1, 1970, Greenwich Mean Time. Negative times extend to times before 1970, and positive numbers forward. Use of 64 bits allows a representation of times approximately in the range of -30000 to the year 30000. There is a structural representation (i.e., exploded view), routines to acquire the current time from the host system, and convert them to and from the 64-bit and structural representation. Additionally there are routines to convert to and from most well-known forms of ASCII into the 64-bit NSPR representation.
Memory management NSPR provides API to perform the basic malloc, calloc, realloc and free functions. Depending on the platform, the functions may be implemented almost entirely in the NSPR runtime or simply shims that call immediately into the host operating system's offerings.
Linking Support for linking (shared library loading and unloading) is part of NSPR's feature set. In most cases this is simply a smoothing over of the facilities offered by the various platform providers.
See also Image File history File links Floss_draft. ...
The Apache Portable Runtime (APR) is a supporting library for the Apache web server. ...
The Adaptive Communication Environment (often referred to as ACE) is an open-source cross-platform framework of object oriented classes to help the development of communication software. ...
External links Browser components: NSPR · Rhino · SpiderMonkey · Tamarin · Venkman Mozilla is a computer term which has had many different uses, though all of them have been related to the now-defunct Netscape Communications Corporation and its related application software. ...
An example of a web browser (Mozilla Firefox), displaying the English Wikipedia main page. ...
Rhino is an open source JavaScript engine. ...
SpiderMonkey is the code name for the first ever JavaScript engine, written by Brendan Eich at Netscape Communications and later released as open source. ...
Tamarin is a free virtual machine and just in time compiler intended to implement the fourth edition of the ECMAScript standard. ...
Venkman is the JavaScript debugger component of the Mozilla web browser. ...
Browser infrastructure: Gecko · XPCOM · XPInstall · XUL · XULRunner Epiphany using Gecko to render the Wikipedia main page Gecko is the open source, free software web browser layout engine used in all Mozilla-branded software and its derivatives, including later Netscape releases. ...
XPCOM (Cross Platform Component Object Model) is a simple, cross platform component model similar to CORBA or Microsoft COM. It has multiple language bindings and IDL descriptions so programmers can plug their custom functionality into the framework and connect it with other components. ...
A typical XPInstall confirmation dialog XPInstall (Cross-Platform Install) is a technology used by Mozilla Application Suite, Mozilla Firefox, Mozilla Thunderbird and other XUL-based applications for installing Mozilla extensions that add functionality to the main application. ...
XUL (pronounced zool ()), the XML User Interface Language, is an XML user interface markup language developed by the Mozilla project. ...
XULRunner is a product in development which will serve as a runtime environment for XUL applications. ...
Browser projects: Camino · Firefox · Minimo · SeaMonkey Camino is a free, open source, graphical Web browser based on Mozillas Gecko layout engine and specifically designed for the Mac OS X family of operating systems. ...
Mozilla Firefox (abbreviated as Fx, fx (prescribed[2]), or FF) is a graphical web browser developed by the Mozilla Corporation. ...
Minimo (from Mini Mozilla) is a project to create a version of the Mozilla web browser for small devices like PDAs and cellphones. ...
For other uses, see Seamonkey. ...
Non-browser projects: Bugzilla · Lightning · Penelope · Sunbird · Thunderbird Bugzilla is a general-purpose bug-tracking tool originally developed and used by the Mozilla Foundation. ...
The Lightning project, announced on December 22, 2004 and currently in development by the Mozilla Foundation, is an extension that adds calendar and scheduling functionality to the Mozilla Thunderbird mail and newsgroups client. ...
Penelope is an e-mail client. ...
Mozilla Sunbird is a free, open source, cross-platform, calendar application developed by the Mozilla Foundation and many volunteers. ...
Mozilla Thunderbird is a free, cross-platform e-mail and news client developed by the Mozilla Foundation. ...
|