Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

310551038 lab5–8 #127

Open
wants to merge 51 commits into
base: 310551038
Choose a base branch
from
Open

310551038 lab5–8 #127

wants to merge 51 commits into from

Commits on Jun 1, 2023

  1. Configuration menu
    Copy the full SHA
    2c23d35 View commit details
    Browse the repository at this point in the history
  2. Lab 5 C: Remove many consistency checks

    The consistency checks were meant to guarantee the correct operation of
    the kernel by making sure that everything is loaded into the memory in a
    sensible way (e.g. the memory region used by the kernel doesn't overlap
    with other reserved regions). However, they make the code convoluted.
    Given that the probability of something being incorrectly loaded is
    exceedingly low in practice, it makes more sense not to include these
    checks.
    
    The quicksort implementation remains in the source tree, albeit becoming
    unused.
    abt8601 committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    bad36d5 View commit details
    Browse the repository at this point in the history

Commits on Jun 4, 2023

  1. Lab 5 C: Complete B1: Thread

    Other changes:
    
    - Properly handle critical sections in memory allocators.
    
    - Fixes a bug in the dynamic memory allocator that causes memory
      corruption.
    
    - Disable page frame allocator debug log.
    abt8601 committed Jun 4, 2023
    Configuration menu
    Copy the full SHA
    e9a89b2 View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2023

  1. Lab 5 C: Complete B2: User Process and System Call

    Other changes:
    
    - Scheduler:
    
      - Partial rewrite to simplify design.
    
      - The current thread no longer remains on the run queue after being
        scheduled.
    
    - Serial console:
    
      - Redesign around non-blocking primitives.
    
      - Add new non-blocking functions.
    
      - Add read/write readiness notification facility.
    
    - Dynamic memory allocator:
    
      - Fix a bug in `free` that causes the incorrect slot to be freed.
    
    - (Old) User program:
    
      - Retired. Superseded by the current scheduler.
    
    - Testers:
    
      - Retire `xcpt_test` since it no longer works.
    
      - Add `syscall_test` that tests some system calls.
    
      - Add a minimal libc.
    
    TODO:
    
    - Properly implement red-black tree in order to speed up the process of
      finding a process by its PID.
    abt8601 committed Jun 19, 2023
    Configuration menu
    Copy the full SHA
    5c70a56 View commit details
    Browse the repository at this point in the history
  2. Lab 5 C: Complete B3: Video Player

    Other changes:
    
    - Scheduler:
    
      - Disable user stack sharing by default.
    
      - Fix `get_process_by_id` and `kill_all_processes`.
    
    - System call:
    
      - Change the return values of `sys_mbox_call` to match the video
        player.
    
    - Main function:
    
      - Remove scheduler test code.
    abt8601 committed Jun 19, 2023
    Configuration menu
    Copy the full SHA
    e2e67f4 View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2023

  1. Configuration menu
    Copy the full SHA
    b8fc7ff View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c1b6c25 View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2023

  1. Configuration menu
    Copy the full SHA
    0dc4dd6 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2023

  1. Lab 6 C: Change default exception handler

    The default exception handler now starts a kernel panic instead of
    returning. This aids in debugging by avoiding cluttering the serial
    console due to repeated triggering of the same exception.
    abt8601 committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    c833acc View commit details
    Browse the repository at this point in the history
  2. Lab 6 C: Complete B1

    abt8601 committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    1760950 View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2023

  1. Lab 6 C: Complete B2, B3, A2, A3

    Other changes:
    
    - Adjust text width in the default exception handler.
    
    TODO:
    
    - Fix the release build.
    abt8601 committed Jun 27, 2023
    Configuration menu
    Copy the full SHA
    1794c1a View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2023

  1. Lab 6 C: Fix memory attributes

    - User-space memory is now mapped as normal memory instead of device
      memory.
    
    - Kernel memory now disallows non-privileged access.
    abt8601 committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    bcfa76b View commit details
    Browse the repository at this point in the history
  2. Lab 6 C: Fix sys_mbox_call

    `sys_mbox_call` now copies the mailbox buffer into the kernel before
    calling `mailbox_call`. This is because it is generally unsafe to pass
    the user-space buffer directly, since it may be discontinuous
    physically.
    abt8601 committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    f3ee536 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c5925d1 View commit details
    Browse the repository at this point in the history
  4. Lab 7 C: Complete B1

    abt8601 committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    b596fa4 View commit details
    Browse the repository at this point in the history
  5. Lab 7 C: Complete B2

    abt8601 committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    507855e View commit details
    Browse the repository at this point in the history
  6. Lab 7 C: Complete B3

    Other changes:
    
    - Disable demand paging/CoW debug log.
    
    - Fix a bug in `free` that causes an incorrect slot to be freed.
    abt8601 committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    8a64b30 View commit details
    Browse the repository at this point in the history
  7. Lab 7 C: Complete B4

    abt8601 committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    0a1b274 View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2023

  1. Lab 6 C: Fix free

    Fix a bug in `free` that causes an incorrect slot to be freed.
    
    Backported from 8a64b30.
    abt8601 committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    27b4394 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'lab6' into lab7

    abt8601 committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    c56b5bd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ee7f8b5 View commit details
    Browse the repository at this point in the history
  4. Lab 8 C: Complete B1

    abt8601 committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    4cdedb4 View commit details
    Browse the repository at this point in the history
  5. Lab 6 C: Complete A1

    Other changes:
    
    - Add a workaround for a run queue corruption but that causes terminated
      threads to be scheduled.
    abt8601 committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    138c012 View commit details
    Browse the repository at this point in the history
  6. Merge branch 'lab6' into lab7

    abt8601 committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    5ae13f6 View commit details
    Browse the repository at this point in the history
  7. Merge branch 'lab7' into lab8

    abt8601 committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    8b0fd4e View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    4f696ab View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2023

  1. Lab 6 C: Fix exec destroying memory regions

    Other changes:
    
    - Fix a bug in `_vm_drop_page_table` (called by `vm_drop_addr_space`)
      that causes memory leak by not freeing pages.
    abt8601 committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    afe1588 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'lab6' into lab7

    abt8601 committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    811b98c View commit details
    Browse the repository at this point in the history
  3. Merge branch 'lab7' into lab8

    abt8601 committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    f5012a6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1b5db3c View commit details
    Browse the repository at this point in the history
  5. Lab 5 C: Fix run queue corruption

    `deliver_signal` depends on the invariant that, if the `is_waiting`
    status bit is set on a thread, then that thread must be in a wait
    queue. However, when waking up a thread from a wait queue, the
    `is_waiting` status bit was not correctly cleared, causing
    `deliver_signal` to corrupt the run queue.
    abt8601 committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    c5d8f93 View commit details
    Browse the repository at this point in the history
  6. Merge branch 'lab5' into lab6

    abt8601 committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    7edf96f View commit details
    Browse the repository at this point in the history
  7. Merge branch 'lab6' into lab7

    abt8601 committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    a2a4890 View commit details
    Browse the repository at this point in the history
  8. Merge branch 'lab7' into lab8

    abt8601 committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    a79e5fc View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    306012e View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2023

  1. Lab 6 C: Fix shared_page_decref

    `shared_page_decref` used to dereference null pointers when called on a
    non-shared page.
    abt8601 committed Jul 1, 2023
    Configuration menu
    Copy the full SHA
    05ac4e9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    39f924e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c9354cf View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c4faa22 View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2023

  1. Lab 7 C: Complete A1

    abt8601 committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    1e6d2df View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2023

  1. Lab 7 C: Change mknod implementation

    Other changes:
    
    - Fix memory leaks in `_tmpfs_create` and `_tmpfs_mkdir`.
    abt8601 committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    cbef6e7 View commit details
    Browse the repository at this point in the history
  2. Lab 7 C: Complete A2

    Other changes:
    
    - Fix syscall number checking in `xcpt_svc_handler`.
    abt8601 committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    41019c4 View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2023

  1. Lab 7 C: Use VFS API in sys_exec

    Other changes:
    
    - Move `SEEK_*` constants around.
    
    - Properly handle setup errors in `vfs_mount`.
    
    - Add missing `static`s.
    abt8601 committed Jul 14, 2023
    Configuration menu
    Copy the full SHA
    f507026 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'lab7' into lab8

    abt8601 committed Jul 14, 2023
    Configuration menu
    Copy the full SHA
    48aab76 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bb57655 View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2023

  1. Lab 8 C: Fix issues with FAT

    - Stops assuming that the number of sectors per cluster is 1.
    
    - Fix memory leak in `_sd_fat32_read`.
    
    - Slightly clean up `_sd_fat32_read`.
    
    - Remove useless code in `_sd_fat32_lseek64`.
    
    - Adds component name check in `_sd_fat32_lookup`.
    
    - Stops assuming that directories live in 1 cluster.
    abt8601 committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    9b06086 View commit details
    Browse the repository at this point in the history
  2. Lab 8 C: Complete B2

    abt8601 committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    9bcd6ec View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2023

  1. Configuration menu
    Copy the full SHA
    c9e686f View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2023

  1. Lab 8 C: Fix write and create in sd_fat32

    - Fix file size update in `_sd_fat32_write`.
    
    - `_sd_fat32_write` now persists the file size update in the SD card.
    
    - Fix directory entries used for LFN being overwritten in
      `_sd_fat32_create_impl`.
    
    - Fix directory table persistence using the wrong LBA in
      `_sd_fat32_create_impl`.
    abt8601 committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    a41a73a View commit details
    Browse the repository at this point in the history
  2. Lab 8 C: Complete A1

    Implements block-level caching, which covers FAT caching and file
    content caching. Metadata caching (both FS-level and file-level) and the
    component name cache have been implemented, accidentally, by the
    previous commits.
    
    Also fixes signal handling due to a wrong system call number for the
    `sys_sigreturn` system call.
    abt8601 committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    44e2dad View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    db1be14 View commit details
    Browse the repository at this point in the history