Skip to content
GitLab
    • Explore Projects Groups Topics Snippets
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • O OSKernel2023-NutOS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 51
    • Issues 51
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Muzi
  • OSKernel2023-NutOS
  • Issues
  • #20
Something went wrong while setting issue due date.
Closed
Open
Issue created 2 years ago by xu_zh@2020k8009970003Maintainer
  • New related issue

  • New related issue

mmap的数据一致性问题

Closed

mmap的数据一致性问题

由于目前实现中mmap采用独立的缓存,会遇到:

  • 两个以上mmap打开重叠的区域
  • 一个以上mmap与一个open打开重叠的区域

在以上情况,难以mmap缓冲区之间的数据一致性问题:

  • 每个mmap描述符记在自己的pcb中,如果要判断重叠,就必须遍历所有pcb_t的mmap_list中所有mmap_t的sectors列表
  • 找到重叠后重新建立页的映射也是个麻烦事
  • 如果先open(创建512字节的缓冲区),再mmap(需要4K对齐的缓冲区)就需要修改open的buf_t中的指针
  • 如果先mmap,再open,同1

考虑的解决方案是:

  • 重构buf的机制,允许外部提供缓冲区指针,若为nullptr再自行分配512字节的缓冲区
  • 重构mmap的机制,分配页以后复用上述重构后的buf结构

从而可以利用buf_read()中的引用计数功能

但仍然无法解决两个以上mmap打开重叠的区域时的地址对齐问题

Edited 2 years ago

    Tasks

    0

    No tasks are currently assigned. Use tasks to break down this issue into smaller parts.

    Linked items
    0

    Link issues together to show that they're related. Learn more.

    Related merge requests

    Activity


    • xu_zh changed milestone to %基本文件系统 2 years ago

      changed milestone to %基本文件系统

    • xu_zh assigned to @2020k8009970003 2 years ago

      assigned to @2020k8009970003

    • xu_zh mentioned in merge request !42 (merged) 2 years ago

      mentioned in merge request !42 (merged)

    • xu_zh changed the description 2 years ago

      changed the description

    • xu_zh changed the description 2 years ago

      changed the description

    • xu_zh mentioned in commit c8fede52 2 years ago

      mentioned in commit c8fede52

    • xu_zh closed via merge request !42 (merged) 2 years ago

      closed via merge request !42 (merged)

    Please register or sign in to reply
    Assignee
    xu_zh's avatar
    xu_zh
    Assign to
    Labels
    0
    None
    0
    None
      Assign labels
    • Manage project labels

    Milestone
    No milestone
    None
    Due date
    None
    None
    None
    Time tracking
    No estimate or time spent
    Confidentiality
    Not confidential
    Not confidential

    You are going to turn on confidentiality. Only project members with at least the Reporter role, the author, and assignees can view or be notified about this issue.

    Lock issue
    Unlocked
    0
    0 Participants
    Reference:

    Menu

    Explore Projects Groups Topics Snippets