warming up your workspace

C practice in Operating Systems

Browse the rooms before signing in. Opening a room requires an account and follows your existing access. Practice does not issue certificates.

  • Count the CPUs

    A CPU-availability mask stores many yes/no flags in one integer; population count measures how many are set.

    bits. Free room.

  • Count the Forks

    Starting from one process, n complete duplication rounds produce 2 to the power n processes.

    fork. Free room.

  • Name the State

    Map the five model states to distinct characters and use ? for an unknown value.

    states. Free room.

  • The Turnaround Desk

    Waiting = completion - arrival - CPU burst, for this no-I/O model.

    metrics. Free room.

  • Ring Around the Buffer

    Accept an operation only when occupancy permits it; otherwise count a failure without changing occupancy.

    ring. Account access required.

  • Round the Robin

    On each turn, execute min(quantum, remaining work), then record completion exactly when the remaining work reaches zero.

    rr. Account access required.

  • Spin the Lock

    Remember the old value, store one, then return the old value.

    locks. Account access required.

  • Wait on the Semaphore

    A wait consumes one permit only when capacity is available.

    semaphores. Account access required.

  • Catch the Cycle

    A cycle exists if some node can follow one or more dependency links back to itself.

    deadlock. Account access required.

  • Split the Address

    With a power-of-two page size, the high address bits identify the virtual page.

    paging. Account access required.

  • The Tightest Hole

    Filter eligible free blocks, then choose the smallest size with earliest-index ties.

    fit. Account access required.

  • Walk the Table

    Physical address = mapped frame times page size + original page offset.

    pagetable. Account access required.

  • Evict the Stale

    On every access record its time; on a miss use the first empty slot or the least-recently-used occupied slot.

    lru. Account access required.

  • Raise the Dead Disk

    Missing value = parity XOR every surviving data value.

    raid. Account access required.

  • Sweep the Disk

    At each step, serve the nearest remaining request from the current head position.

    elevator. Account access required.

  • XOR the Stripe

    XOR parity summarizes a stripe and can help reconstruct one missing data word.

    raid. Account access required.

  • Ask the Oracle

    On a full-memory miss, replace the page needed farthest after the current request.

    optimal. Account access required.

  • Banker's Hours

    Repeatedly finish any eligible unfinished process and add its allocation to a private work vector.

    deadlock. Account access required.

  • Boot to Idle

    Run round-robin once, then report makespan, identity changes and mean completion time scaled by 100.

    fullrun. Account access required.

  • Hand Out the FD

    The lowest free descriptor is a hole in an occupancy mask, not the number of open descriptors.

    files. Account access required.