Aptivi - Deprecated Manuals
ProjectsWebsiteBlog
Nitrocid KS v0.1.0 Beta 2 - Manual
Nitrocid KS v0.1.0 Beta 2 - Manual
  • 👋Welcome!
  • Versions and Compatibility
    • 🔱Supported Versions
    • 🕘EOL Versions
    • 🗞️Version Release Notes
      • ✨v0.0.1.x series
      • 🌈v0.0.2.x series
      • 👥v0.0.3.x series
      • 🛠️v0.0.4.x series
      • 🕔v0.0.5.x series
        • ⌚v0.0.5.0 Beta Versions
      • 📕v0.0.6.x series
        • 📄v0.0.6.0 Beta Versions
      • 🔌v0.0.7.x series
        • ⚡v0.0.7.0 Beta Versions
      • 🌌v0.0.8.x series
      • 💌v0.0.9.x series
      • 📜v0.0.10.x series
      • ✏️v0.0.11.x series
      • ⚙️v0.0.12.x series
      • 🌐v0.0.13.x series
      • 🏃♀ v0.0.14.x series
      • ⏳v0.0.15.x series
      • ⭐v0.0.16.x series
      • 🌃v0.0.17.x series
      • 🥁v0.0.18.x series
      • 🔧v0.0.19.x series
      • 🍀v0.0.20.x series
      • 🧰v0.0.21.x series
      • 📱v0.0.22.x series
      • 🖥️v0.0.23.x series
      • 👾v0.0.24.x series
      • 🔮v0.1.x.x series
        • ⚠️Known issues for 0.1.0 Beta
    • 👍Compatibility Notes for KS API Revisions
      • 🔼Upgrading from API v1.0
      • 🔼Upgrading from API v1.1
      • 🔼Upgrading from API v1.2
      • 🔼Upgrading from API v1.3
      • 🔼Upgrading from API v2.0
      • 🔼Upgrading from API v2.1
      • 🔼Upgrading to API v3.0
  • Installation and Maintenance
    • 📀Installing the Kernel
      • 💻Windows
      • 🐧Linux
      • 📱Android
    • ⏫Upgrading the Kernel
      • 💻Windows
      • 🐧Linux
      • 📱Android
  • Fundamentals
    • 🌽What is the Kernel?
    • 👾What is Nitrocid KS?
    • 🌟Simulated Kernel Features
      • 👤Accounts
        • 🔓Permissions
      • 🐚Shells
      • 🌍Networking
        • 🗃️FTP Client
        • 🔒SFTP Client
        • 📰RSS Client
        • 🌐HTTP Client
        • 📧Mail Client
      • ✏️Editors
        • 📝Text Editor
        • 🖊️JSON Editor
        • 💾Hex Editor
      • 🇺🇸 Languages
      • 🌌Screensavers
      • 🎮Games and Amusements
        • 🔤Hangman
        • ☄️Meteor
        • 🐍Snaker
        • 🔢Solver
        • ⌨️SpeedPress
        • 🔠Wordle
      • 🗓️Calendar
      • ⏰Stopwatch and Timer
      • ⚖️Calculator and Converter
  • Advanced and Power Users
    • ⚒️Building the Kernel
      • 🪟Building on Windows
      • 🐧Building on Linux
    • 🧰Kernel Modifications
      • 🔧Kernel Modification Management
      • 🏗️Build your...
        • 🧪Your Mod
        • 🌌Your Screensaver
        • 🪄Your Splash
    • 🦠Diagnostics
      • 🔬Debugging
        • 🧬Local Debugging
        • 🛰️Remote Debugging
      • 🧪Testing
      • 💉Other Diagnostics
    • ⚒️Inner Workings
      • 🔧Kernel Settings
        • ⛏️Mechanics of Settings App
        • 🔩Settings Format
      • 🐚Shell Structure
        • ❔Help System
        • 🗜️Command Parsing
        • 📜Shell Scripting
      • 🪧Kernel Placeholders
      • 🔐The Permissions
      • 📞Kernel Threads
      • 🔌Kernel Drivers
      • ⚙️Multilingual Kernel Flow
      • 🌐Custom Languages
      • 📽️Presentation System
      • 🎛️Kernel Arguments
      • 📡Remote Procedure
    • 💿GRILO Bootloader and KS
  • 🧱Project Dependencies
  • Report an issue
  • Source code
  • API Reference
Powered by GitBook
On this page
  • How to make your thread
  • Task manager
  • Controls
  • Thread information
Edit on GitHub
  1. Advanced and Power Users
  2. Inner Workings

Kernel Threads

Threading at its best!

Threads are a great way to asynchronously do things in your mod! They play a huge role on preventing the block from happening on the main thread. Single-threaded aplications usually get blocked by long operations, but threads solve this problem.

Nitrocid KS manages the threads that are created by the KernelThread instances. It allows the kernel to manipulate with these threads more efficiently, and they stop each time the kernel is requested to shut down or restart by any power management functions, either locally or br remotely by RPC.

ThreadManager provides you a whole set of functions and properties to efficiently manage your threads from listing all active threads to sleeping to benchmarking the sleep function.

How to make your thread

To make your KernelThread, just call its constructor with the following parameters:

  • ThreadName

    • Thread name

  • Background

    • Whether the thread is a background thread

  • Executor

    • A function to execute in the thread

    • It can be either of the type ThreadStart or of the type ParameterizedThreadStart

You can then start the thread using the Start() function for normal threads or the Start(object) function for parameterized threads.

You can't start the kernel thread once it's stopped by Stop(false) until it's regenerated either automatically by Stop() or manually by Regen(), and you can't call Regen() before calling the Stop(false) function.

Task manager

The task manager can be called by taskman in the normal shell. It allows you to list both the Nitrocid KS threads and the unmanaged operating system threads, and it provides you with their information.

The left pane of the task manager shows you a list of threads, and the right pane shows you the selected thread info.

Controls

  • F1

    • Kills a Nitrocid KS thread and regenerates it

    • This can't be used on unmanaged OS threads

  • Tab

    • Switches between the Nitrocid KS thread listing and the unmanaged OS thread listing

  • ESC

    • Exits the program

Thread information

The selected thread information can be found on the right pane of your task manager. However, depending on the type of the thread you're currently at, it might show different information.

Nitrocid KS threads

The below information are shown:

  • Task name

    • The kernel thread name

  • Alive

    • Whether the kernel thread is running or not

  • Background

    • Whether the kernel thread is running in the background or not

  • Critical

    • Threads that are crucial to the kernel is usually set to True and thus can't be killed

  • Ready

    • Whether the thread is ready to be started or not

Unmanaged OS threads

The below information are shown:

  • Task ID

    • Unmanaged OS thread number assigned by the operating system

  • Privileged processor time

    • Amount of work a processor is completing while executing in privileged mode

  • User processor time

    • Amount of work a processor is completing while executing in user space

  • Total processor time

    • Total amount of work a processor is completing

  • Task state

  • Priority level

    • The unmanaged thread priority level

  • Task memory address

    • A hexadecimal representation of the memory address for an unmanaged thread assigned by the operating system that points to the thread entry point (start) in this format: 0x00000000

Last updated 1 year ago

The thread state holding one of the values

⚒️
📞
ThreadState