{
    "api": "YAML JSON TOON Database",
    "version": "1.0.0",
    "format": "json",
    "category": {
        "id": 10,
        "slug": "operating-systems",
        "name": "Operating Systems",
        "description": "Operating system concepts, kernels, and process management.",
        "icon": "cpu",
        "created_at": 1783090350,
        "topic": {
            "overview": "Operating-systems reference data covers what the kernel does between programs and hardware: running many processes on few CPUs (scheduling), giving each a private view of memory (paging and virtual memory), keeping them from deadlocking over shared resources, and storing data durably (file systems). The concepts come from textbooks and are implemented differently in Linux, Windows and macOS, so the entries explain the idea and the examples show where real systems apply it.",
            "key_ideas": [
                {
                    "term": "Process vs thread",
                    "meaning": "A process owns an address space and resources; threads are schedulable flows of control that share them. Switching between threads is cheaper than between processes."
                },
                {
                    "term": "Context switch",
                    "meaning": "Saving one task's CPU state and loading another's. It is pure overhead, so schedulers try not to do it too often."
                },
                {
                    "term": "Preemptive vs non-preemptive",
                    "meaning": "A preemptive scheduler can take the CPU away from a running task; a non-preemptive one waits until the task yields or finishes."
                },
                {
                    "term": "Virtual memory",
                    "meaning": "Each process sees a contiguous private address space that the OS and hardware map onto physical memory and disk."
                },
                {
                    "term": "Page fault",
                    "meaning": "An access to a page that is not currently mapped to physical memory, handled by the OS, sometimes by reading from disk."
                },
                {
                    "term": "Journaling",
                    "meaning": "Recording intended file-system changes in a log first so the file system can be repaired consistently after a crash."
                },
                {
                    "term": "Deadlock",
                    "meaning": "A state where processes wait on each other forever. It needs mutual exclusion, hold-and-wait, no preemption and circular wait all at once."
                }
            ],
            "pitfalls": [
                "Assuming textbook scheduling algorithms are what a real OS uses. Linux, Windows and macOS combine priorities, fairness and heuristics.",
                "Equating high memory use with a problem. Operating systems use spare memory for caches and release it on demand.",
                "Confusing thrashing with simple memory shortage; thrashing is constant paging that leaves little time for useful work.",
                "Choosing a file system by feature list alone, ignoring platform support, maximum file size and recovery behavior."
            ],
            "agent_tips": [
                "Name the algorithm and say whether it is preemptive when explaining a scheduler.",
                "Distinguish the concept (paging) from a specific OS implementation (Linux's page cache) when answering.",
                "For file-system questions, ask which operating system and use case; the right answer differs for removable media, servers and desktops."
            ],
            "start_with": [
                "process-management",
                "memory-management"
            ]
        }
    },
    "datasets": [
        {
            "id": 1,
            "slug": "cpu-scheduling-algorithms",
            "title": "CPU Scheduling Algorithms",
            "description": "Algorithms used by the OS to allocate CPU time.",
            "tags": "os,scheduling,cpu",
            "view_count": 0,
            "created_at": 1783090350,
            "entry_count": 13,
            "summary": "The classic CPU scheduling algorithms, each marked preemptive or non-preemptive with a one-line description, from first-come first-served to multilevel feedback queues, plus real-time schedulers such as earliest-deadline-first and the Linux Completely Fair Scheduler."
        },
        {
            "id": 2,
            "slug": "deadlock-handling",
            "title": "Deadlock Handling",
            "description": "Conditions and strategies for dealing with deadlocks.",
            "tags": "os,deadlock,concurrency",
            "view_count": 0,
            "created_at": 1783090350,
            "entry_count": 15,
            "summary": "The four necessary conditions for deadlock, the strategies for dealing with it (prevention, avoidance, detection and recovery) and related hazards such as livelock and starvation. Each entry is a one-line definition suitable for exam review or design discussion."
        },
        {
            "id": 3,
            "slug": "file-systems",
            "title": "File Systems",
            "description": "Common file systems and their characteristics.",
            "tags": "os,filesystems,storage",
            "view_count": 0,
            "created_at": 1783090350,
            "entry_count": 15,
            "summary": "Common file systems with their type and headline features: FAT32, NTFS, ext4, APFS, ZFS and NFS, plus exFAT, Btrfs, XFS, ReFS, F2FS and others. It answers which file system fits which platform and which have journaling, copy-on-write, snapshots or network semantics."
        },
        {
            "id": 4,
            "slug": "memory-management",
            "title": "Memory Management",
            "description": "Techniques for allocating and protecting memory.",
            "tags": "os,memory,paging,virtual-memory",
            "view_count": 0,
            "created_at": 1783090350,
            "entry_count": 17,
            "summary": "The core ideas of operating-system memory management: paging and segmentation, virtual memory and page faults, and the mechanisms that make them fast or slow, including page tables, the TLB, replacement policies, copy-on-write and fragmentation."
        },
        {
            "id": 5,
            "slug": "process-management",
            "title": "Process Management",
            "description": "Core concepts of process and thread management.",
            "tags": "os,process,thread,scheduler",
            "view_count": 0,
            "created_at": 1783090350,
            "entry_count": 16,
            "summary": "The vocabulary of process and thread management: processes, threads, control blocks, context switches, fork and exec, and the zombie and orphan states, plus process states, inter-process communication primitives and daemons."
        }
    ]
}
