Giter Site home page Giter Site logo

leejb1988 / mos Goto Github PK

View Code? Open in Web Editor NEW

This project forked from he11oliu/mos

0.0 1.0 0.0 7.91 MB

Homemade OS based on MIT6.828 JOS with a GUI and some new features.

Makefile 0.47% Assembly 1.14% C 97.90% Perl 0.17% Objective-C 0.28% Shell 0.01% C++ 0.03%

mos's Introduction

Micro homemade OS

MOS是一个基于MIT 6.828 JOS的自制操作系统。在完成JOS实验的基础上添加了很多新特性,并提供了基础的图形界面与应用程序接口。关于此操作系统的详细设计与实现文档见./documents

CGA 显示界面

图像显示界面

在启动后msh中输入$ applauncher启动图形化界面应用启动器

====Graph mode on====
   scrnx  = 1024
   scrny  = 768
MMIO VRAM = 0xef800000
=====================
SMP: CPU 0 found 1 CPU(s)
enabled interrupts: 1 2 4
FS is running
FS can do I/O
Device 1 presence: 1
block cache is good
superblock is good
bitmap is good

# msh in / [10:02:07]
$ applauncher

运行环境

运行需要安装QEMU,请到image文件夹下查看。

编译环境

需要配置/conf/env.mk下的qemu所在路径

$ i386-elf-gcc -v
使用内建 specs。
COLLECT_GCC=i386-elf-gcc
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/i386-elf/4.7.2/lto-wrapper
目标:i386-elf
配置为:/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_cross_i386-elf-gcc/i386-elf-gcc/work/gcc-4.7.2/configure --prefix=/opt/local --target=i386-elf --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/i386-elf-gcc --with-system-zlib --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --enable-stage1-checking --enable-multilib --with-newlib --enable-languages=c,c++
线程模型:single
gcc 版本 4.7.2 (GCC)

MIT课程中使用linux的环境,这里配置了macOS下的开发环境。

具体配置方法见./documents/[finish] macOS编译运行配置.md

MIT6.828 JOS lab 完成列表

  • lab1 Booting a PC
  • lab1 challenge: VGA GUI
  • lab2 Memory Management
  • lab2 challenge
  • lab3 User Environments
  • lab3 challenge: single step debug
  • lab4 Preemptive Multitasking
  • lab4 challenge
  • Lab 5: File system, Spawn and Shell
  • lab5 challenge

实验中已支持的特性

  • 段页式内存管理 (详见\lab_record\lab2.md
  • 支持进程(Environments)
    • 进程切换
    • 进程间通讯,通过syscall实现
    • 进程单独地址空间
    • spawn创建进程,fork使用Read Copy Update策略
    • 支持抢断式任务调度
  • 支持多核CPU
    • 支持IPI,提供IPI接口
    • 支持大内核锁(基于自旋锁)
  • 系统服务syscall
    • 打印字符
    • 获取字符
    • 获取进程编号
    • 回收进程
    • 主动调度
    • fork
    • 设置进程状态
    • 申请页,映射页,取消映射
    • 用户空间页错误处理入口设置
    • IPC进程间通讯
    • 用户空间异常处理栈设置
  • 支持页错误用户空间处理
  • 支持简易文件系统 (CS结构)
  • 支持文件描述符
  • 支持pipe
  • 用户空间工具
    • sh简易shell

新特性

  • 支持原子操作

  • 支持读写锁

  • 支持针对单一核心IPI

  • 支持PRWLock

  • 支持基本图形显示

  • 支持中英文显示(中英文点阵字库)

  • 支持进程工作目录 提供getcwdchdir

  • 新的syscall

    • SYS_env_set_workpath 修改工作路径
  • 新的用户程序

    • ls 功能完善
    • pwd 输出当前工作目录
    • cat 接入工作目录
    • touch 由于文件属性没啥可改的,用于创建文件
    • mkdir 创建目录文件
    • msh 更高级的shell 还未完全完工 支持cd 支持默认二进制路径为 bin
  • 调整目标磁盘生成工具

  • 支持从RTC读取时间

  • 支持kmalloc/kfree,支持分配连续空间

  • 提供RW/RW用户内核共享framebuffer/palette

  • 提供用户GUI接口

  • 提供调色板预设

  • 提供Applauncher

    • 日历应用
    • 系统信息应用
    • 模拟CGA显示模式的终端程序(基于pipe)

计划完成的特性

  • mmap

mos's People

Contributors

he11oliu avatar jonhoo avatar

Watchers

James Cloos 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.