feat: Aurora Neural OS v2.6 x86_64 microkernel, white theme GUI, and page replacement research
d097788 verified Download CA6_Rust_Micro_OS_Project/scripts/analyze_trace.py from vedraj1309/oslab: direct link, hf CLI and curl.
- Browser
- Download file 809 Bytes
-
https://huggingface.co/datasets/vedraj1309/oslab/resolve/main/CA6_Rust_Micro_OS_Project/scripts/analyze_trace.py
- Command line
-
hf download hf://datasets/vedraj1309/oslab/CA6_Rust_Micro_OS_Project/scripts/analyze_trace.py
-
curl -L -o analyze_trace.py https://huggingface.co/datasets/vedraj1309/oslab/resolve/main/CA6_Rust_Micro_OS_Project/scripts/analyze_trace.py
809 Bytes
| from pathlib import Path | |
| import re | |
| import sys | |
| SCHEDULER = re.compile(r"\[SCHED\] tick=(\d+) task=(\d+) \(([^)]+)\)") | |
| def main() -> None: | |
| path = Path(sys.argv[1] if len(sys.argv) > 1 else "traces/demo.log") | |
| text = path.read_text(encoding="utf-8") | |
| events = SCHEDULER.findall(text) | |
| if not events: | |
| raise SystemExit(f"No scheduler events found in {path}") | |
| task_counts = {} | |
| for _, task_id, _ in events: | |
| task_counts[task_id] = task_counts.get(task_id, 0) + 1 | |
| print(f"trace: {path}") | |
| print(f"timer_ticks: {events[-1][0]}") | |
| print(f"scheduler_switches: {len(events)}") | |
| print(f"task_turns: {task_counts}") | |
| print(f"fairness_range: {max(task_counts.values()) - min(task_counts.values())}") | |
| if __name__ == "__main__": | |
| main() | |