zampierilucas/scx_horoscope
소개
점성술 CPU 스케줄러
기타 프로젝트What you can do
- Real Planetary Calculations: Uses the astro crate for accurate geocentric planetary positions
- Zodiac-Based Task Classification: Tasks are classified by their astrological affinities
- Retrograde Detection: Real retrograde motion detection by comparing day-to-day positions - negative influences trigger 50% time slice penalties
- Lunar Phase Scheduling: Moon phases affect Interactive tasks (shells, editors) with Full Moon giving 1.4x boost
측정된 스타 증가
- in 24h
- 0
- in 7 days
- -1
- in 15 days
- 0
- in 1 month
- +4
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalscx_horoscope - Astrological CPU Scheduler
"Why let mere mortals decide CPU priorities when the cosmos can guide us?"
A fully functional sched_ext scheduler that makes real CPU scheduling decisions based on real-time planetary positions, zodiac signs, and astrological principles. This actually loads into the Linux kernel and schedules your system tasks. Because if the universe can influence our lives, why not our CPU scheduling too?

Features
- Real Planetary Calculations: Uses the
astrocrate for accurate geocentric planetary positions - Zodiac-Based Task Classification: Tasks are classified by their astrological affinities
- Retrograde Detection: Real retrograde motion detection by comparing day-to-day positions - negative influences trigger 50% time slice penalties
- Lunar Phase Scheduling: Moon phases affect Interactive tasks (shells, editors) with Full Moon giving 1.4x boost
- Element Boosts & Debuffs: Fire signs boost CPU tasks (1.5x), Water signs debuff them (0.6x) - elemental oppositions create cosmic chaos
- Cosmic Weather Reports: Get real-time astrological guidance for your system with moon phase tracking
- Actually Works: Loads into the Linux kernel via sched_ext and schedules real system processes
- Real BPF Integration: Uses scx_rustland_core framework for kernel-userspace communication
- Dynamic Time Slicing: Adjusts CPU time based on astrological priority (100-1000)
Astrological Scheduling Rules
Planetary Domains
Each planet rules specific types of system tasks:
- ☀️ Sun (Life Force): Critical system processes (PID 1, init)
- 🌙 Moon (Emotions): Interactive tasks (shells, editors, terminals)
- 💬 Mercury (Communication): Network and I/O tasks
- 💖 Venus (Harmony): Desktop and UI processes
- ⚔️ Mars (Energy): CPU-intensive tasks (compilers, video encoding)
- 🎯 Jupiter (Expansion): Memory-heavy applications (databases, browsers)
- ⚙️ Saturn (Structure): System daemons and kernel threads
Element Effects
Zodiac sign elements create elemental affinities and oppositions:
Boosted Combinations (tasks thrive under compatible elements):
- 🔥 Fire (Aries, Leo, Sagittarius, Ophiuchus*) × CPU tasks: 1.5x boost
- 🌬️ Air (Gemini, Libra, Aquarius) × Network tasks: 1.5x boost
- 🌍 Earth (Taurus, Virgo, Capricorn) × System tasks: 1.4x boost
- 💧 Water (Cancer, Scorpio, Pisces) × Memory tasks: 1.3x boost
Debuffed Combinations (elemental oppositions):
- 💧 Water × CPU tasks: 0.6x (water dampens fire)
- 🌍 Earth × Network tasks: 0.6x (earth blocks air)
- 🌬️ Air × System tasks: 0.7x (air disrupts earth's structure)
- 🔥 Fire × Memory tasks: 0.7x (fire evaporates water)
All other combinations are neutral (1.0x).
*Ophiuchus (the 13th sign) is available with --ophiuchus flag, using IAU constellation boundaries.
Retrograde Effects
When a planet is in retrograde motion, tasks under its domain suffer a 50% time slice penalty. Retrograde is detected by comparing daily planetary positions - when a planet moves backward through the zodiac (negative delta in ecliptic longitude), it's retrograde.
Key retrograde effects:
- Mercury Retrograde: Network and interactive tasks suffer
- Mars Retrograde: CPU tasks crawl like molasses
- Venus Retrograde: UI becomes disharmonious
- Note: Sun and Moon never go retrograde
Priority Formula
final_priority = base_priority × planetary_influence × element_boost
time_slice = min_slice + (base_slice - min_slice) × (priority / 1000)
if retrograde: time_slice × 0.5
Base Priorities:
- Critical (PID 1): 1000
- System tasks: 200
- Interactive tasks: 150
- Desktop/UI: 120
- CPU/Network: 100
- Memory: 80
Planetary Influence (when planet is direct):
- Fire signs: 1.3x
- Air signs: 1.2x
- Earth signs: 1.1x
- Water signs: 1.0x
- Retrograde: -1.0 (triggers time slice penalty)
Installation
NOTE: userspace schedulers require kernels 6.12 or later.
cargo build --release
If you're using NixOS, you can also add provided flake like this (25.11+ required):
# Include this flake
inputs.scx_horoscope.url = "github:zampierilucas/scx_horoscope";
...
# Include module
outputs = { self, nixpkgs, scx_horoscope, ... }@inputs: {
nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {
modules = [
scx_horoscope.nixosModules.default
];
};
};
And then somewhere later in your system configuration:
services.scx_horoscope = {
enable = true;
# Add options as needed
extraArgs = [ "--cosmic-weather" ];
};
Usage
Requires root privileges to load into the kernel as a sched_ext scheduler.
Running the Scheduler
# Build
cargo build --release
# Run with cosmic weather report and verbose output
sudo target/release/scx_horoscope --cosmic-weather -v
# Run with debug decisions to see individual task scheduling
sudo target/release/scx_horoscope --debug-decisions
# Stop: Press Ctrl+C for graceful shutdown
Command-Line Options
Astrological Options:
-w, --cosmic-weather- Display planetary positions and astrological guidance on startup-d, --debug-decisions- Watch the cosmos make scheduling decisions in real-time--ophiuchus- Use 13-sign zodiac with Ophiuchus (IAU constellation boundaries)--no-retrograde- Boring mode (disables retrograde chaos)-u, --update-interval <SECS>- Update planetary positions every N seconds (default: 60)
Performance Tuning:
-s, --slice-us <MICROSECONDS>- Base time slice duration (default: 5000)--slice-us-min <MICROSECONDS>- Minimum time slice (default: 500)-v, --verbose- Display detailed statistics
Run --help to see all options.
Disclaimer
This scheduler is 100% for educational and entertainment purposes. While the astronomical calculations are real and the scheduler actually works (it really does load into the kernel and schedule tasks!), using astrology to schedule CPU tasks is:
- Scientifically dubious
- Cosmically hilarious
- Fully functional with real retrograde detection and lunar phase scheduling
- Not recommended for production systems (but it boots and runs stably)
- Perfect for conference talks, hackathons, and proving that anything is possible
License
GPL-2.0-only (as required by sched_ext)
Contributing
Contributions welcome! The core scheduler is working, but there's always room for more cosmic chaos:
- Add more planetary aspects (conjunctions, oppositions, trines)
- Add birth chart generation for processes (based on creation time)
- Horoscope predictions for task completion times
- Per-CPU affinity based on astrological compatibility
- Extend moon phase effects to other task types (I/O, memory operations)
Acknowledgments
- Norm for the hilarious and brilliant idea to schedule by the stars
- sched_ext team for the amazing BPF scheduler framework
- The cosmos, for providing endless entertainment
"In space, no one can hear you schedule."
Comments from people:
- "You've made it work, but at what cost!"
관련 프로젝트 살펴보기
불러오는 중…