Giter Site home page Giter Site logo

oscomp-kernel-training-chyyuu's Introduction

oscomp kernel training

基于2022全国大学生OS比赛内核赛道的训练邀请

注:训练基于Github Classroom,在线编程,在线自动评测,在线显示排行榜

内核赛道OS训练repo说明

目前支持 os 比赛相关测例的测试,采用形式与 os 比赛相同,选手需要在根目录添加一个 Makefile 文件,使用 make all 命令在根目录生成 kernel-qemu 文件,由评测机自动执行。

目前已经支持 libc-testbusybox, lua, lmbench 相关测例,测试过程无人工干预,需要由内核自动运行,所有测例文件放在镜像中,内核需要支持 fat32 文件系统来读取文件。 镜像文件

本地测试

如你写好OS后,想在在本地测试,评测运行指令如下:

qemu-system-riscv64 \
    -machine virt \
    -bios default \
    -device loader,file=kernel-qemu,addr=0x80200000 \
    -drive file=fat32.img,if=none,format=raw,id=x0 \
    -device virtio-blk-device,drive=x0,bus=virtio-mmio-bus.0 \
    -kernel kernel-qemu \
    -nographic \
    -smp 4 -m 2G

在线测试

github的CI对内核进行测试的执行时间设置为 300 秒(5分钟),超时后程序会被终止,不再继续执行,所得分数为超时前完成的部分的分数。

github的CI执行完毕后,会在你的repo中的 gp-pages 分支下生成相关的 log 文件和 README 文件,在 README 文件中可以看到当前得到的分数,在 log 文件中能看到详细的得分情况。

注意事项

  • QEMU 版本为 7.0.0
  • RUST ToolChain 版本为 nightly-2022-08-08
  • 编译目标架构为 riscv64imac-unknown-none-elf
  • 内核执行时间为 5 分钟
  • 内核可用内存大小为 2G
  • 只有 main 分支的提交可以被Github 上的CI评测机处理
  • Github 上的CI评测机在初次运行时需要编译 qemu,可能需要花费一些时间,请耐心等待
  • 如果在实践中碰到问题,请在本repo的 issues 栏中发帖子
  • 如果有进一步的改进,请给本repo提 Pull requests

学习资源

2022OS比赛内核实现赛道一等奖的仓库(包含从初赛到决赛全过程的文档/代码等)

训练与比赛信息(丰富的学习与训练资源)

致谢

  • 杨金博:oscomp-kernel-training github classroom/CI/kernel demo
  • 王明健:设计实现测试用例和评测方法等
  • 闭浩扬:kernel demo&testing

oscomp-kernel-training-chyyuu's People

Contributors

chyyuu avatar github-classroom[bot] avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.