Grablo Help Grablo Help
  • User Manual
  • Tips
  • News
  • Go to
    • Grablo Home
    • Grablo App
  • 한국어
Grablo Help Grablo Help
문의하기
Grablo Help Grablo Help
  • User Manual
  • Tips
  • News
  • Go to
    • Grablo Home
    • Grablo App
  • 한국어
loading
  1. Home
  2. Tips
  3. Basics
  4. Multi Thread
Updated on August 11, 2025

Tips

  • Folder icon closed Folder open iconBasics
    • Bits and Bytes
    • Digital Input/Output
    • Digital/Analog Signals
    • Calculating LED Resistor Values
    • Pull-up/down Resistors
    • 3.3V ↔ 5V Conversion
    • Serial Communication (UART)
    • DC Motor, Servo Motor, Stepper Motor
    • Multi Thread
    • Relay
  • Folder icon closed Folder open iconHardware
    • Raspberry Pi
      • GPIO
      • Installing Operating System
      • How to Change 1-Wire Pin
      • How to Find I2C Device Addresses
      • Raspberry Pi vs Arduino
      • Serial (UART) Port
      • Using Desktop Environment with VNC
    • Beagle Bone
      • GPIO
      • Installing Operating System
    • Jetson Nano
      • GPIO
      • Installing Operating System
    • GPIO Expander
      • FT232H/FT2232H/FT4232H
      • MCP2221A
      • NUMATO USB-GPIO
  • Folder icon closed Folder open iconLinux
    • Linux Directory Structure
    • Configuring Linux Auto Login
    • Installing Linux on Windows (Virtual Machine)
    • Installing Linux on macOS (Virtual Machine)
    • Installing SSH Server
    • Finding Your Controller’s IP Address
    • Connecting via SSH
    • Transferring Files Between PC and Controller
    • Fixing “User is not in the sudoers file” Error
  • Folder icon closed Folder open iconAudio/Video
    • Fixing Audio Stuttering and Latency Issues
    • Playing Audio Through Bluetooth Speakers
    • Selecting Instruments from SoundFont Files
    • Fixing “Failed to create new vlc instance” Error
  • Folder icon closed Folder open iconDatabase
    • Setting Up Firebase Database
  • Folder icon closed Folder open iconIoT
    • Setting Up Google Cloud TTS/STT
    • Setting Up OpenAI TTS/STT
    • Setting Up ElevenLabs TTS
    • Setting Up Telegram Bot
    • Getting Data from WeatherAPI.com

Multi Thread

Estimated reading: 3 minutes 282 views

Multi-threading refers to dividing a single process into multiple pieces (threads) and executing them simultaneously. Most computer programs today use multi-threading to divide tasks and execute them concurrently, making them run faster and more efficiently.

For example, when using a web browser, even while downloading files or opening multiple web pages, users can continue with other tasks without waiting for previous tasks to complete. This is because the web browser program (process) is composed of multiple threads that can perform several tasks simultaneously.

In fact, if you open Windows Task Manager, you can see that a single program runs with multiple threads.


One CPU core can only execute one task at a time. For example, an Intel i5-12400 CPU has 6 cores, so it can execute a maximum of 6 tasks simultaneously.

So in this case, can only a maximum of 6 processes or threads be executed? No. We can play games while watching videos or browsing the web simultaneously, and in this case, dozens of processes or hundreds of threads are running concurrently.

While one CPU core can only execute one task at a time, operating systems like Windows or Linux allocate multiple processes or threads to the CPU alternately and execute them. Since this happens at very high speed, it appears as if they are running simultaneously.

Determining the allocation order and method for the CPU is called scheduling, and changing the task assigned to the CPU is called context switching.

https://www.techtarget.com/whatis/definition/multithreading


Since Grablo’s software runs on a Linux operating system, Grablo’s logic runs as individual threads, enabling simultaneous execution.

However, since multi-threading doesn’t actually execute simultaneously but alternates at very high speed, execution time can vary depending on CPU performance or task content. This is also why the overall speed decreases when running heavy programs like Photoshop on low-spec PCs or when executing many programs simultaneously.

Therefore, Grablo’s logic execution cycle may sometimes be longer than the set cycle. For example, if logic is set to execute every 0.1 seconds (100 milliseconds), the actual execution cycle may exceed 100 milliseconds. The error becomes larger with lower hardware specifications or higher CPU usage, and smaller with higher hardware specifications or lower CPU usage. Error levels can vary depending on the execution environment, but under general usage conditions, it’s 0~3 milliseconds, which is acceptable for most use cases.

If the implementation requires very precise timing within 1 millisecond, Grablo is not suitable, and a real-time operating system should be used.

찾으시는 내용이 없나요? 문의하기

문의하기

공유하기

Multi Thread

Or copy link

Clipboard Icon
콘탠츠

ㅤ

Grablo Inc.
support@grablo.co

Site Links

  • Grablo Home
  • Grablo App

이 사이트의 모든 컨텐츠는 저작권법에 보호받는 저작물로서, 무단으로 복제, 배포하는 경우에는 저작권법에 의하여 처벌을 받을 수 있습니다. Copyright 2024 grablo.co. All Rights Reserved.