Google Fuchsia: Improving on the Android OS

0
3517

If hardware is the heart of a computer, then the operating system (OS) is its soul. It’s the OS that gives life to a computer and makes it perform various tasks. That’s why it’s important to choose the right OS for a particular computer system. Fuchsia is an open source compatibility based operating system currently being developed by Google, which addresses the challenges the Android OS faces.

The design and development of an OS plays an important role in the performance of computer hardware, and a perfectly designed OS can make the hardware run at its full potential. Basically, there are seven types of OSs – single- and multi-tasking, single- and multi-user, distributed, templated, embedded, real-time, and library. Among these, the single- and multi-tasking OSs are more widely used in many computer systems. The multi-tasking OS, also known as the General Purpose OS (GPOS), is used because it can do multiple tasks at the same time. GPOSs in use today include Mac, Windows, Linux, Android and Raspberry Pi. They work on a method called time-slicing, whereby the OS slices the CPU time into various time slots. Each time slot is dedicated to a task, which is scheduled accordingly. This process is also known as pre-emptive multi-tasking. The time scheduling of the task is done in such a way that the system throughput is maintained. However, GPOSs don’t give time assurance for the completion of any task, because tasks are not executed based on their priority, and can cause latency.

In the case of a Real Time OS (RTOS), every task is executed according to its priority and can be completed within the expected time. That’s why RTOSs don’t cause any latency like the GPOSs, and are more responsive to the I/O data. As most smartphones use Android and iOS, the user experiences some kind of latency at some point of time because both the OSs use pre-emptive multi-tasking and are not RTOSs. Moreover, Google has developed the Android OS from the kernel of the Linux OS, which was not designed for smartphone hardware. To compensate for this incompatibility, Android OS uses middleware to support the hardware. Whereas, Apple developed its iOS by shrinking the Mac OS, and as the hardware for the iPhone was designed for iOS, there were no compatibility issues of the kind Android had. The Android OS also suffers from fragmentation at some point of time. For this reason, Android smartphones have performance issues after some use. RTOSs can not only improve the performance of smartphones but also IoT devices. As the I/O response of RTOSs is better than GPOSs, IoT devices can be controlled with minimum latency.

Therefore, to get a better solution, Google is now working on the development of a new OS called Fuchsia. Google Fuchsia is an open source RTOS that is capable of running on many platforms — from embedded systems and smartphones to tablets and personal computers. As Fuchsia is an RTOS, it will not cause any latency and performance issues like the Android OS. In contrast to prior Google-developed operating systems such as Chrome OS and Android, which are based on the Linux kernel, Fuchsia is based on a new kernel called Zircon, named after the mineral. Zircon is derived from Little Kernel, a small operating system intended for embedded systems. ‘Little Kernel’ was developed by Travis Geiselbrecht, a creator of the NewOS kernel used by Haiku. The initial development of Fuchsia has started at GitHub. On July 1, 2019, Google had announced the official website (https://fuchsia.dev) of the development project, providing source code and documentation for the operating system.

Requirements of Fuchsia

  • Google Fuchsia can be improved and customised using various programming languages and runtimes, including C++, Rust, Flutter, and Web.
  • Flutter, a software development kit, is required to code the apps and UI for Fuchsia.
    A 64-bit Intel machine with at least 8GB of RAM and 100GB of free disk space is required to develop Fuchsia.
  • One of the best ways to experience Fuchsia is by running it on actual hardware like Acer Switch 12, Intel NUC, and Google Pixelbook.
  • The Fuchsia install process, called ‘paving’, requires two connected machines over a network — the machine on which you want to run Fuchsia (‘target’) and the machine on which you build Fuchsia (‘host’).
  • Fuchsia creates a UNIX-like file system called MinFS, and can currently support files up to 4GB.
  • It requires AArch64 (ARM64) and x86-64 platforms to run.

Functionality and architecture
Google Fuchsia doesn’t use a microkernel but uses a different type of kernel called message passing. A message passing kernel is a kind of Inter Process Communication (IPC) mechanism, where processes communicate with each other by passing messages. Unlike the shared memory kernel, which is also another kind of IPC, a message passing kernel doesn’t share the memory with the processes but uses a message queue instead.

Figure 1: Message passing process

In a message passing kernel, one process can send a message to another through the message queue, and the message carries the information about the requirement. Each message that is sent by a process contains the identity of the process that is going to receive it. Similarly, the process that receives the message creates another message, sends it back to the previous process and informs about the requirement. In this way, messages are passed between every process of the kernel without any flaw.

If there are two processes (P1 and P2) running in the kernel, and P1 needs to use a resource that is being currently used by the process P2, then P1 will send a message to P2 to release the resource within a specified time. As soon as P2 receives the message, it will try to complete its process within the time specified by P1, and the kernel will give higher priority to P2. After completing the process, P2 will inform P1 by passing a message that the resource is free to use, and P1 will use the resource after getting the message. This process of message passing can keep the system running without any latency, and is also easier to implement than a shared memory process.

Fuchsia has four layers, as shown in Figure 2.

Figure 2: Fuchsia layers

Zircon: This is the first layer and is the kernel of Fuchsia. Zircon is composed of a new kind of message passing kernel derived from Linux, called the Little Kernel. This is the heart of Fuchsia and has been designed by Google to work with all kinds of devices like smartphones, laptops and IoT devices. This layer mediates hardware access, implements essential software abstractions over shared resources, and provides a platform for low-level software development.

Garnet: This is the second layer and provides device-level system services for software installation, administration, communication with remote systems, and product deployment. This layer contains the network, media and graphics services, and also contains the package management and update system.

Peridot: This third layer provides the services needed to create a cohesive, customisable, multi-device user experience assembled from modules, stories, agents, entities and other components. It contains the device, user, story runners and also the ledger and resolver, as well as the context and suggestion engines.

Topaz: This is the topmost fourth layer that increases system functionality by implementing interfaces defined by underlying layers. It contains four major categories of software: modules, agents, shells and runners. Modules include the calendar, email, and terminal modules; shells include the base shell and the user shell; agents include the email and chat content providers; and runners include the Web, Dart, and Flutter runners.

Google Fuchsia is coded using the C, C++, Dart, Go, Rust and Python languages. It can support machines with ARM64 and x86-64 architectures. The Flutter development kit produces apps based on Dart that can run at 120 frames per second. Fuchsia also offers a Vulkan based graphics rendering engine called Escher, with specific support for ‘volumetric soft shadows’. A special version of Android Runtime for Fuchsia will be developed, and it will run on machines with this system from a FAR file, which is the equivalent of the Android APK.

Security
Google Fuchsia uses a concept called sandboxing, which prevents the apps from gaining full access to the OS. All access to the kernel of the OS is exposed to the apps as object-capabilities, which means that applications running on Fuchsia have no ambient authority — they can interact only with the objects to which they have been granted access explicitly. Software is delivered in hermetic packages and everything is sandboxed, which means all software that runs on the system, including applications and system components, gains access only to the information it needs to know. Such architecture keeps the kernel safe, and can prevent any venerable attacks.

Pros and cons of Fuchsia
Pros Cons
  • Fuchsia supports many languages like C, C++, Dart, Go, Rust and Python.
  • It is developed using a development kit called Flutter, which can also be used to create cross-platform apps for Fuchsia, Android and iOS. Fuchsia can also support Android apps (APK) by using a runtime.
  • It can support both ARM-46 and x86-64 architecture and can run on laptops, smartphones and IoT devices.
  • Fuchsia uses a sandboxing concept to run the apps, and this makes it a secure OS by preventing any attacks.
  • Fuchsia uses a message passing kernel instead of shared memory, the system has slower communication and the connection time between the processes may take some time.
  • Fuchsia uses a UI that is different from Android, and current Android users might find it difficult to use.


Features of Fuchsia

  • Fuchsia’s user interface and apps are written with a software development kit called Flutter, and it allows cross-platform development abilities for Fuchsia, Android and iOS.
  • Due to the cross-platform opportunities offered by the Flutter development kit, users are able to install parts of Fuchsia on Android devices also.
  • Fuchsia packages are designed to be updated independently or even delivered ephemerally, and the software is always up-to-date, like a Web page.
  • Fuchsia currently supports many types of languages and runtimes, including C++, Rust, Flutter and Web. Developers can use a variety of languages or runtimes without needing to change Fuchsia itself.
  • Fuchsia is designed for optimised performance. The use of asynchronous message passing communication reduces latency by letting the sender proceed without waiting for the receiver. It also optimises memory use by avoiding garbage collection in the core operating system, which helps to minimise memory requirements to achieve performance equivalent to other OSs.Google Fuchsia is a new open source RTOS that will come with various improved features compared to Android, and can help various IoT devices to work effectively. This operating system was chosen by Google to overcome the drawbacks of the Android OS, and that’s why it will give us a better user experience.

LEAVE A REPLY

Please enter your comment!
Please enter your name here