michaelmelanson / michaelmelanson/panda-os

Service manager step 4: Service scheme (kernel-side service: namespace)

Open
#30 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement ipc kernel
Dominant language
Rust
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Summary

Implement a kernel-side service: scheme with a flat namespace (service:/{name}) that brokers channel connections between service providers and clients. Protocol UUID handshake provides the real type safety.

This is step 4 of the service manager implementation (#26). Depends on step 3 (#29) for the protocol framework.

Desired behaviour

  • Services register themselves at service:/{name} (e.g., service:/terminal, service:/keyboard)
  • Clients open service:/{name} to get a channel endpoint connected to the service
  • The kernel brokers the connection: creates a channel pair, gives one end to the client and one to the service
  • The service and client then perform the protocol handshake over the channel
  • Per-process registration: a process can register as a service provider, generalizing to future userspace drivers

Key files

  • panda-kernel/src/vfs/ — new service scheme implementation
  • panda-kernel/src/resources/ — service registry data structures
  • panda-abi/src/lib.rs — any new opcodes for service registration
  • libpanda/src/register_service() and connect_service() helpers

Design notes

  • The service: scheme is intentionally simple — flat namespace, no hierarchy
  • Type safety comes from the protocol handshake, not the scheme itself
  • Registration is exclusive: only one process can register a given name at a time
  • When a service process exits, its registration is automatically removed

Testing

  • Kernel test: register a service, open it from another process, verify channel connection
  • Kernel test: try to register a duplicate name, verify rejection
  • Kernel test: service process exits, verify registration is cleaned up
  • Userspace test: full round-trip — register, connect, handshake, exchange messages

Documentation

  • Document the service: scheme in VFS documentation
  • Add examples of service registration and client connection
  • Document the relationship between scheme names and protocol UUIDs

Part of #26

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing step 3 (#29) and the protocol framework, then inspect panda-kernel/src/vfs/, panda-kernel/src/resources/, panda-abi/src/lib.rs, and libpanda/src/. Implement the service registry, scheme operations, registration cleanup, and helpers described in the issue. Done means the kernel registration, duplicate rejection, exit cleanup, and userspace round-trip tests pass, with VFS documentation and examples added.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.