SIYUAN FANG
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    ## Indentification of key scalability challenges SerenityOS is an graphical Unix-like operating system which supports the x86 and x86-64 instruction sets, features a preemptive kernel, and hosts multiple complex applications including its own web browser and integrated development environment (IDE).[<sup>1</sup>](#refer-anchor-1) All stakeholders have various needs and preferences and what they expect from SerenityOS are quite different. Therefore, it would be advantageous to stakeholders if SerenityOS exhibits great scalability. In this article, we discuss the scalability of SerenityOS in four aspects: Modularity, Reusablity, Configurability and Design Consistency. They will be explored as follows: ### Modularity A modular design is an approach for product designing which is used to produce a complete product by integrating or combining smaller parts that are independent of each other. With the modular design approach, a complex product (in this case, SerenityOS) can be broken down or divided into smaller and simpler components that are independently designed and manufactured. Each of these individual components is then integrated (or assembled) together to form the final product. Modularity is essential for code reuse, separate compilation, incremental build, distributed deployment, etc. Even though C++ doesn't have modules as a programming language, SerenityOS does have a structral decomposition of the architecture that is shown below. [<sup>2</sup>](#refer-anchor-2) ![](https://i.imgur.com/DAXKb2q.png) ### Reusability When developers want to scale up their design, code reusability is an important issue to consider. Reusability measures how many times a block of software can be used for different purposes. There are two types of reuse mechanisms, namely Fork (duplication) and Reference (dependencies). To guarantee reusability, components should possess trusted quality, standarized and documented interfaces. The ability to reuse relies in an essential way on the ability to build larger things from smaller parts, and being able to identify commonalities among those parts.[<sup>3</sup>](#refer-anchor-3) Reusability implies some explicit management of build, packaging, distribution, installation, configuration, deployment, maintenance and upgrade issues. If these issues are not considered, software may appear to be reusable from design point of view, but will not be reused in practice. In SerenityOS, reusability takes the form of common libraries which other components of the project are using to optimize tasks. Within the folder AK, there are plenty of files with suffix .h invoked by other modules, such as Math.h, ByteReader.h and URL.h. ### Configurability Configurability implies that the software allows system behavior to be varied by a small amount of user input. The more configurable a system is:[<sup>4</sup>](#refer-anchor-4) + The easier it is to build and modify. + The more of this the user can do. + The higher reuse is. + The cheaper the system is. + The faster it can be built. + The more defect free it tends to be. Users have different tastes and preferences and what they want from SerenityOS are quite varied. Therefore, software can have wider group of users with Configurability. ### Design Consistency Consistency is when all the elements of the design behave in the same way or follow the set pattern.[<sup>5</sup>](#refer-anchor-5) To ensures the product matches customer expectations and users easily understand how to use the product, developers should creating a product that displays consistency in all its elements. ## Modularity on Hardware SerenityOS is a Unix-based operating system, and its tailorability is one of its major advantages. Developers can cut down the functions of kenel and userland as needed to reduce system size. For example, developers can cut out the graphics display of the entire os and only perform system operations through the command line. Thinking of this, we explored the tailorability and adaptability of Serenity os on different hardware platforms. First of all, in the mainstream liunx PC, qemu is used as the simulation platform to be compatible with most mainstream PCs. Users only need to install C++11 and complete the build with qumu to run. (For less popular linux distributions, such as openSUSE, Alpine Linux, OpenBSD, FreeBSD are all compatible). On the Raspberry Pi, Serenity doesn't currently boot on Rasperry Pi, and it is only used for developer purposes to perform the same simulation as on the pc through qemu. However, on the Raspberry Pi, users can replace the kenel image and use the kernel of serenity os to run the environment. The official Serenity OS documentation also provides a list of currently compatible bootable hardware, including Network Adapters, Desktop machines, Laptops, notebooks and netbooks, and Motherboards. ## Identified issues for system's architecture Serenity OS was originally developed by Andreas Kling alone, and then many dedicated to building their own retro unix system to contribute. Therefore, this open source software does not have a complete business model, but exists in the form of a geek project. Serenity OS was originally developed by Andreas Kling alone, and then many dedicated to building their own retro unix system to contribute. Therefore, this open source software does not have a complete business model, but exists in the form of a geek project. Therefore, although this open source software has a high degree of modularity, it does not have accessibility and has high third-party compatibility difficulties. For example, if Microsoft wants to cooperate with serenityos to use vscode as an ide on serenityos, then Microsoft cannot find a suitable general API interface, web server and required data structures, and the development language only has the option of C++, access to rust or Java also needs to be extended by itself. At the same time, the third party has to participate in the version iteration as a contributor rather than a cooperative identity, so there is also a slow review process, and the resolution of issues is also inefficient. ## Proposal for architecture changes As an operating system that does not use third-party code,Serenity OS has its own kernel, shell, desktop, libraries, etc. They are all written by developers in C++ with the kernel and user controls use custom standard libraries[<sup>3</sup>](#refer-anchor-3).Since it dose not depend on the third-party libraries,the process is complicated for other developers to add their own libraries or functional applications.For example,they often need to write the complete code for the module or function they want to implement according to the project's code submission policy[<sup>5</sup>](#refer-anchor-5),and then add the module to the system architecture. In order to achieve better modularity and extensibility of the system, we propose to allow the import of third-party libraries or code to implement certain features in the system architecture. Installing third-party libraries in the operating system is simplified as follows: first find the required library source, then add it to the folder path, and finally compile, test and run it. Currently developers use CMake to manage and compile project, which also provides a standardized procedure for adding external libraries, which also facilitates the addition of external libraries[<sup>4</sup>](#refer-anchor-4). ## Depicting the “as is” and the “to be” architectural designs SerenityOS is a *nix-like system. One of the goals of SerenityOS is to develop an operating system that can be used independently as the main operating system of the host computer.[^Blog] But SerenityOS is an open-source project with no management operations team who will plan the project's development roadmap but only project maintainers. Currently, the architectural design of the future version is not settled for the SerenityOS project. Many functions and features are only raised as issues to develop when some contributors need some features in the library or the main project contributor, and project maintainers who have ideas on the difference between the general structure of the current structure and what they want will post some features that need to be implemented as a task list in the issue. As one of the issue policies of the SerenityOS, when some features are wanted on the SerenityOS, one should develop them himself. From the project description, we can make a feature diagram with a basic structure similar to the Linux system, Kernel space user space structure. Even the project doesn't have a clear development plan, due to the final goal of developing an independent operating system that can use as the main operating system, we can still use a structure of a Linux system as a future design to compare with and learn about the difference between the current version and the target. ![Current Features of SerenityOS](https://i.imgur.com/T9FEQVF.png) ![Features of the Linux[^Linux Wiki]](https://i.imgur.com/RZiLea4.png) We can see that most of the kernel functions of the SerenityOS have been realized compared to the Linux system. But one can see that the System call interface is not listed in the description. These system calls are actually implemented in the library LibMain. We can find some of these features still haven't been realized in an open issue of the project. This also indicates the current situation of the project that there is no clear development roadmap for SerenityOS. Some features are only raised as an issue and start to develop when developers run into the scenario that they need a certain function but find out it hasn't been implemented yet. ![Open issue list of Systemcall need to be implemented](https://i.imgur.com/D9BXG6g.png) ## Argument on how the proposed changes will address the identified scalability issues Here we will indicate the reason why we propose the architecture change that allows third-party library and code to be used in the SerenityOS. By analyzing an open issue that was raised for developing a new application in SerenityOS. This open issue is actually to implement the SerenityOS version of Discord. The open issue provides a checklist of the features that need to be implemented for Discord as an application itself. But it also raises some requirements for new features or functions in the LibWeb -- the HTML/CSS engine library. This library is currently listed in the readme document as a feature or library that can be directly used in the SerenityOS like the library of the C++ templates and containers AK, where AK library is already be implemented as a base library for all the applications. This means key libraries the project provides have to be modified frequently to expand its support features if there is a new application that has the requirement for using some features they haven't considered before. Before the functions or features have been implemented in the library, the development of the application in the SerenityOS can not push on. However, by allowing third-party libraries, such as WebKit[^WebKit], which is a mature open-source web browser engine, the development of the Userland application like Discord won't need to wait until the features in the library are implemented by some contributor who is interested in developing library. We do notice that the project sponsor intends to develop the SerenityOS with no third-party code.[^Blog] But from the business view, without third-party code, the goal of developing the SerenityOS into an independent operating system that can be used as a main operating system will be hard to realize. Because as a host operating system, it should be able to handle new applications from new user requirements. In this development pattern, with the project growing, project contributors will have to learn more details about the operating system and library features to see whether there are features they need but are not supported. The project maintainer must learn more details from upper-level kernel function to bottom-level application development. This increases the hardness of developing SerenityOS into a main operating system. Therefore, from the view of developing the SerenityOS into a usable main operating system for the host computer, we propose to add the third-party code. But of course, SerenityOS can still work as a project that provides practicing opportunities for developers who are interesting in the operating system and application from scratch. ![](https://i.imgur.com/EA9kWGX.png) ## Reference - [1] [Wikipedia](https://en.wikipedia.org/wiki/SerenityOS) - [2] [What is a Modular Design? Everything You Want to Know in 8 Easy Answers!](https://www.jigsawacademy.com/blogs/product-management/modular-design/) - [3] [Wikipedia](https://en.wikipedia.org/wiki/Reusability) - [4] [Configurability](https://www.thwink.org/soft/article/future_app_dev/Configurability.html#:~:text=Configurability%20is%20that%20quality%20allowing,this%20the%20user%20can%20do.) - [5] [Why Design Consistency Is Crucial?](https://medium.com/nyc-design/why-design-consistency-is-crucial-4e7b117bbef6) - [3] [Blog](https://blog.jetbrains.com/clion/2021/11/talking-to-serenityos-contributors/) - [4] [Cmake](https://www.selectiveintellect.net/blog/2016/7/29/using-cmake-to-add-third-party-libraries-to-your-project-1) - [5] [Github Codeing Style ](https://github.com/SerenityOS/serenity/blob/master/Documentation/CodingStyle.md) - [9][^Linux Wiki](https://en.wikipedia.org/wiki/Linux) - [10][^WebKit](https://webkit.org/)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully