Main article:
History of macOS
The heritage of what would become macOS had originated at
NeXT, a company founded by
Steve Jobs following his departure from Apple in 1985. There, the
Unix-likeNeXTSTEP operating system was developed, and then launched in 1989. The
kernel of NeXTSTEP is based upon the
Mach kernel, which was originally developed at
Carnegie Mellon University, with additional kernel layers and low-level
user space code derived from parts of
BSD. Its
graphical user interface was built on top of an
object-oriented GUI toolkit using the
Objective-C programming language.
Throughout the early 1990s, Apple had tried to create a "next-generation" OS to succeed its
classic Mac OS through the
Taligent,
Copland and
Gershwin projects, but all of them were eventually abandoned.
[20] This led Apple to purchase
NeXT in 1996, allowing NeXTSTEP, then called
OPENSTEP, to serve as the basis for Apple's next generation operating system.
[21] This purchase also led to Steve Jobs returning to Apple as an interim, and then the permanent CEO, shepherding the transformation of the programmer-friendly OPENSTEP into a system that would be adopted by Apple's primary market of home users and creative professionals. The project was first code named "
Rhapsody" and then officially named Mac OS X.
[22][23]
Architecture
Main article:
Architecture of macOS
At macOS's core is a
POSIX compliant operating system built on top of the
XNU kernel, with standard Unix facilities available from the
command line interface. Apple has released this family of software as a
free and
open source operating system named
Darwin. On top of Darwin, Apple layered a number of components, including the
Aqua interface and the
Finder, to complete the
GUI-based operating system which is macOS.
[52]
With its original introduction as Mac OS X, the system brought a number of new capabilities to provide a more stable and reliable platform than its predecessor, the
classic Mac OS. For example,
pre-emptive multitasking and
memory protection improved the system's ability to run multiple applications simultaneously without them interrupting or corrupting each other.
[53] Many aspects of macOS's architecture are derived from
OPENSTEP, which was designed to be portable, to ease the transition from one platform to another. For example,
NeXTSTEP was ported from the original
68k-based NeXT workstations to
x86 and other architectures before NeXT was purchased by Apple,
[54] and OPENSTEP was later ported to the
PowerPC architecture as part of the
Rhapsody project.
The default macOS
file system is
HFS+, which it inherited from the classic Mac OS. Operating system designer
Linus Torvalds has criticized HFS+, saying it is "probably the worst file system ever", whose design is "actively corrupting user data". He criticized the
case insensitivity of file names, a design made worse when Apple extended the file system to support
Unicode.
[55][56] Initially, HFS+ was designed for classic Mac OS, which runs on
big-endian 68K and
PowerPC systems. When Apple switched Macintosh to little-endian Intel processors, it continued to use big-endian byte order on HFS+ file systems. As a result, macOS on current Macs must do
byte swap when it reads file system data.
[57][58] These concerns are being addressed with the new
Apple File System, which will be included in a later update.
The
Darwin subsystem in macOS is in charge of managing the file system, which includes the Unix
permissions layer. In 2003 and 2005, two
Macworld editors expressed criticism of the permission scheme; Ted Landau called misconfigured permissions "the most common frustration" in macOS, while Rob Griffiths suggested that some users may even have to
reset permissions every day, a process which can take up to 15 minutes.
[59] More recently, another Macworld editor, Dan Frakes, called the procedure of repairing permissions vastly overused.
[60] He argues that macOS typically handles permissions properly without user interference, and resetting permissions should just be tried when problems emerge.
[61]
The architecture of macOS incorporates a layered design:
[62] the layered frameworks aid rapid development of applications by providing existing code for common tasks.
[63] Apple provides its own
software development tools, most prominently an
integrated development environment called
Xcode. Xcode provides interfaces to
compilers that support several
programming languages including
C,
C++,
Objective-C, and
Swift. For the
Apple–Intel transition, it was modified so that developers could build their applications as a
universal binary, which provides compatibility with both the Intel-based and PowerPC-based Macintosh lines.
[64] First and third-party applications can be controlled programatically using the
AppleScript framework,
[65] retained from the
classic Mac OS,
[66] or using the newer
Automator application that offers pre-written tasks that do not require programming knowledge.
[67]