"매 deadline 의 miss 의 failure". Real-time 의 fast 와 X — predictable latency budget 의 within. Hard RT (RTOS, avionics) 의 missed deadline 의 catastrophic; soft RT (video, LLM streaming) 의 degraded UX.
매 핵심
매 분류
Hard RT: 매 deadline 의 absolute (pacemaker, ABS brake). RTOS — VxWorks, QNX, Zephyr.
Firm RT: 매 occasional miss 의 OK but useless after deadline (live video frame).
Soft RT: 매 best-effort, degraded quality on miss (LLM token stream, web UI).
fromvllmimportLLM,SamplingParamsllm=LLM(model="meta-llama/Llama-3.3-70B",tensor_parallel_size=4,enable_prefix_caching=True)params=SamplingParams(max_tokens=512,temperature=0.7)# Continuous batching — 매 새 request 의 mid-batch 의 join.outputs=llm.generate(prompts,params)
K_THREAD_DEFINE(ctrl_tid,1024,control_loop,NULL,NULL,NULL,K_PRIO_PREEMPT(2),0,0);voidcontrol_loop(void*p1,void*p2,void*p3){while(1){read_sensors();compute_pid();actuate();k_sleep(K_MSEC(10));// 100Hz hard deadline
}}
매 결정 기준
상황
Approach
Safety-critical (medical, auto)
Hard RT — RTOS, formal verification
LLM chat
SSE streaming + prompt cache
Multiplayer game
UDP + WebRTC / custom protocol
Voice/video call
WebRTC
HFT
Kernel bypass (DPDK), FPGA
Robotics
ROS 2 + Zephyr/PREEMPT_RT Linux
기본값: SSE + Anthropic streaming for LLM, WebSocket for bidirectional chat.