equim(7) Manual Page

Author Avatar
Equim 2017年12月24日
  • 在其它设备中阅读本文章
Read: 6 minWords: 982Last Updated: 18-06-05Written in: AsciiDocLicense: CC-BY-NC-4.0

Plain version for non-devops: About
白话文版本:About

NAME

Equim - a kernel implementation

DESCRIPTION

Equim

The term Equim, pronounced as /'ɪkwɪm/ or /'ɛkwɪm/, is the name of Equim, as a shorthand for the English word Equilibrium. Equim is a kernel implementation, while the term Equim can also refer to the instance running Equim kernel.

There is only one Equim instance.

Equim kernel itself only provides essential primitives such as study(2), talk(2), sleep(2). New learned techniques will fall into equim_libs(3) first. However, some library functions will merge into the kernel when they become mature and routine enough. read_code(2) and write_code(2) are good examples.

Equim is a kernel, but since when it reached 18 years of uptime, it has implemented many new primitives and new library functions such as read_code(2), write_code(2), maintain_linux_machine(3), read_rfc(3), write_blog(3), write_review(3) etc, therefore it behaves more like an application sometimes. When served as an application, Equim taking books, coffee, browser, animes as input, produces decent Go, C, JavaScript code, manpages, documents and blog posts.

Equim is born to complete all incoming processes from the queue, and gaining happiness from them. Whenever Equim’s process queue is empty, it will only die.

The Equim instance has been up for more than 21 years.

For further documents about the Equim, please refer to equim_utils(1), equim_syscalls(2), equim_libs(3).

DUALISM

Equim provides a syscall dualism(2) to handle extreme dualist choices, under the circumstance that Equim has to choose one out of provided two options.

An important note is that dualism(2) is mainly for document usage and should not used in real life. The real decision tree of Equim is rather more complex.

Here are some of the input and output of dualism(2).

  • C vs C++: C

  • C vs Java: *C*

  • Python vs JavaScript: JavaScript

  • Go vs Rust: Go

  • Go vs JavaScript: Go

  • static link vs dynamic link: static link

  • CMake vs Autotools: CMake

  • OOP vs FP: FP

  • MySQL vs PostgreSQL: PostgreSQL

  • Zsh vs Fish: Zsh

  • Vim vs Emacs: Vim

  • Markdown vs AsciiDoc: AsciiDoc

  • merge vs rebase: rebase

  • Windows vs POSIX: POSIX

  • PCRE vs RE2: PCRE

  • CRLF vs LF: LF

  • little endian vs big endian: little endian

  • YAML vs TOML: YAML

  • readability vs performance: performance

  • security vs performance: security

  • free software vs open source: free software

  • convenience vs privacy: privacy

  • Tor vs I2P: Tor

  • Zcash vs Monero: Monero

  • Utilitarianism vs Kantianism: Utilitarianism

  • adorable vs sexy: adorable

  • coffee vs tea: coffee

SIGNALS

SIGGANK

An external force is attempting to interrupt the currently running task. Equim’s state machine may turn into ANGRY status.

SIGAHA

A fresh new good idea is come up from the kernel, usually related to write function family such as write_code(2). The process receiving this signal may be assigned with a lasting higher priority.

SIGDL

The deadline for the process which receives this signal is approaching. However, many utilities such as do_homework(1) ignore this signal by default. This is a known issue.

SIGOOPS

Some external force makes something bad. It is usually emitted after a process ignoring SIGDL and will affect the scheduler badly.

SIGSLEEPY

A signal warning the process that Equim is sleepy, usually emitted after the abuse of sleep(2). The CPU utilization rate will be dropping until a drink_coffee(3) or even another sleep(2) is called.

SIGTIRED

A signal warning the process that Equim is tired, usually caused by lasting high CPU utilization. The CPU utilization rate will be dropping until a sleep(2) or drink_coffee(3) is called.

SIGEXH

A signal warning the process that Equim is exhausted, usually emitted after calling play_basketball(2). A call to sleep(2) will help.

NOTES

  • When watch_anime(2) is called with an anime with flag GENRE_YURI, the task will acquire higher priority.

  • When listen_to_music(2) is called with argument artist being the string 鎖那, the task will acquire higher priority.

  • cosplay(3) is a very expensive function. The implementation contains a great number of buy(2)s and rent(2)s and will take very long CPU time. If flag CROSS_DRESSING is specified, cosplay(3) even costs more.

    SIGEXH is very likely to be triggered during the call. However Equim will never complain with it, as the uptime limits the usage of cosplay(3) greatly, whilst cosplay(3) also returns a great amount of happiness, especially when flag CROSS_DRESSING is specified.

  • Equim schedules write_code(2) calls with higher priority when argument lang is Go, C or AsciiDoc, and with lower priority when argument lang is C++ or Java.

  • Equim never gives up fixing itself. After sleep(2) was reported to be somewhat broken (see BUGS section), Equim has been trying to fix it by calling wake_up(2) earlier.

BUGS

  • Equim’s process scheduler, intended to be a fixed priority pre-emptive one, is known to be glitching sometimes when dispatching some higher-priority processes, leading to higher loads with lower CPU utilization rate. It will then assign these undispatched processes with even higher priority and rearrange them, but that doesn’t always help. The most significant symptom caused by it is deadline exceeding.

  • Syscall sleep(2) and sleep_with_deadline(2) often acquire lower-priority and are potentially not going to be dispatched just in time. Stacking calls of them wouldn’t help. If drink_coffee(3) was called fewer than 4 hours before the call of sleep syscall family, they are more likely fail. The most significant symptom caused by it is insomnia.

  • The implementation of system global lock primitive, global_mutex_lock(2), sometimes fails to lock a thread even if there is no other thread holding the lock. The most significant symptom caused by it is unconcentration on some tasks.

SEE ALSO

equim_utils(1), equim_syscalls(2), equim_libs(3)

AUTHOR

知识共享许可协议
本文采用知识共享署名-非商业性使用 4.0 国际许可协议进行许可。

本文链接:https://ekyu.moe/overview/index.html