Introduction
After covering Android's system architecture, I wanted to understand the architecture of its biggest rival, iOS. This article aims to analyze each layer of iOS's system architecture (above the hardware) in a digestible format. Let's begin.
Fun fact: iOS (for mobile devices) and OS X (now called MacOS) have similar architectures. The main difference is at the topmost layer because people interact with mobile devices and laptops differently.
Kernel & Device Drivers
The iOS kernel manages system resources, processes, memory, security, and device interactions. It acts as an intermediary between hardware and software. If you've interacted with Apple products or services you may have heard the terms 'Mach' or 'Darwin'. This layer is where both of these components reside.
Mach
Note: Apple documentation uses the term 'Kernel' somewhat differently than you might expect.
Mach is a microkernel which manages processor resources such as CPU usage and memory, handles scheduling, provides memory protection, and offers other services to the rest of the operating-system layers. In the kernel architecture, Mach (the microkernel) is one of the components of the kernel.
Darwin
The kernel, along with other core parts of the operating system, is collectively referred to as Darwin. Darwin is based on BSD and includes Mach and other components.
Device drivers complement the kernel by translating between hardware devices and the OS. They provide hardware abstraction, handle I/O operations etc.
Core OS
This layer abstracts many of the complexities of the kernel, providing a more accessible interface for higher-level software. These services are typically used for tasks that require direct interaction with system resources or low-level operations, but are not directly exposed to applications. Some components at this layer are OpenCL and System Configuration.
Core Services
Core Services often build upon the functionality provided by Core OS to offer more complex and application-specific features. Core Services provide essential services to apps but have no direct bearing on the app’s user interface. Some components at this layer include the Accounts framework, Social framework and MapKit.
Media Layer
The Media layer handles all the audio, video, graphics, and animation services required by applications. Components like Core graphics, Core audio and OpenGL are found at this layer.
Cocoa application layer
This layer is primarily responsible for the appearance of apps and their responsiveness to user actions. It provides the frameworks needed to build user interfaces and interact with device features. Here is where most developers will spend the majority of their time. Some components at this layer include UIKit, HealthKit and HomeKit.
Conclusion
We can see that there are some similarities between iOS's architecture and that of Android. Each layer of the iOS architecture plays a vital role in delivering the experience that users have come to expect from Apple devices. Hopefully, this post clarified the role of each layer and helped you to get a better understanding of how everything fits together.
Top comments (0)