nachos

Code::Blocks中搭建Nachos环境

泄露秘密 提交于 2020-03-16 20:26:00
某厂面试归来,发现自己落伍了!>>> Nachos的全称是“Not Another Completely Heuristic Operating System”,它是一个可修改和跟踪的操作系统教学软件。具体可参考百度百科。如果是在学习操作系统课程,并使用Nachos作为辅助教学,本文将会有所帮助。在网上没有找到使用Code Blocks搭建nachos的教程,只好自己琢磨,总算有所小成。 说明,以下操作都是在Ubuntu 11.10中进行的。 1、获取Nachos源码:可以在 这里 下载源码。下载后,右击,选择解压到此处,把解压得到的文件夹,修改名称为nachos,放在某一目录下,这里直接放在主文件夹下。 2、系统安装g++。 sudo apt-get install g++ 3、直接使用gcc编译。 先将nachos\nachos3-4\code\下的Makefile文件中的 MAKE = gmake 改成 MAKE = make 然后在clean:后边加上以下几行: clean: cd threads; rm *.o nachos cd network; rm *.o nachos cd filesys; rm *.o nachos cd test; rm *.o cd userprog; rm *.o nachos cd vm; rm *.o nachos rm -f *~

Nachos-Lab2-线程调度模块实现

纵然是瞬间 提交于 2020-01-08 21:12:39
源码获取 https://github.com/icoty/nachos-3.4-Lab 内容一:总体概述 本实习希望通过修改Nachos系统平台的底层源代码,达到“扩展调度算法”的目标。本次实验主要是要理解Timer、Scheduler和Interrupt之间的关系,从而理解线程之间是如何进行调度的。 内容二:任务完成情况 任务完成列表(Y/N) Exercise1 Exercise2 Exercise3 Challenge1 第一部分 Y Y Y Y 具体Exercise的完成情况 Exercise1 调研 调研Linux或Windows中采用的进程/线程调度算法。具体内容见课堂要求。 linux-4.19.23进程调度策略 : SCHED_OTHER 分时调度策略, SCHED_FIFO 实时调度策略(先到先服务), SCHED_RR 实时调度策略(时间片轮转)。 RR调度和FIFO调度的进程属于实时进程,以分时调度的进程是非实时进程。 当实时进程准备就绪后,如果当前cpu正在运行非实时进程,则实时进程立即抢占非实时进程。 RR进程和FIFO进程都采用实时优先级做为调度的权值标准,RR是FIFO的一个延伸。FIFO时,如果两个进程的优先级一样,则这两个优先级一样的进程具体执行哪一个是由其在队列中的位置决定的,这样导致一些不公正性(优先级是一样的,为什么要让你一直运行?)

Error “gnu/stubs-32.h: No such file or directory” while compiling Nachos source code

南笙酒味 提交于 2019-12-17 03:46:22
问题 I am trying to install Nachos on my laptop and I have Ubuntu 11.04 on the laptop. The code is in C and so to build it I assume I will need cross compiler. This is where my problem is. I downloaded the source code of the MIPS cross compiler using the command wget http://mll.csie.ntu.edu.tw/course/os_f08/assignment/mips-decstation.linux-xgcc.gz and I unzipped it using tar zxvf mips-decstation.linux-xgcc.gz This is okay, but when I try to build the source code of the nachos os, using make, I get

Error “gnu/stubs-32.h: No such file or directory” while compiling Nachos source code

北城以北 提交于 2019-12-17 03:46:16
问题 I am trying to install Nachos on my laptop and I have Ubuntu 11.04 on the laptop. The code is in C and so to build it I assume I will need cross compiler. This is where my problem is. I downloaded the source code of the MIPS cross compiler using the command wget http://mll.csie.ntu.edu.tw/course/os_f08/assignment/mips-decstation.linux-xgcc.gz and I unzipped it using tar zxvf mips-decstation.linux-xgcc.gz This is okay, but when I try to build the source code of the nachos os, using make, I get

Nachos实验环境搭建

匿名 (未验证) 提交于 2019-12-02 23:39:01
写于2019.06.10 本文Nachos实验环境为:Linux-Mint 19.1(Tessa) 64位VM虚拟机 参考网站: Berkeley CS162 Fall 2010 在Oracle官网下载 JDK 1.8 Linux安装包 jdk-8u211-linux-x86.tar.gz并拷贝到/opt目录下 在/opt目录下解压文件 $tar -xzvf jdk-8u211-linux-x86.tar.gz 配置全局变量:修改/etc/profile文件 新建 JAVA_HOME 变量 编辑 PATH 变量 新建 CLASS_PATH 变量 在/etc/profile文件尾部添加 # jdk export JAVA_HOME=/opt/jdk1.8.0_211 export CLASSPATH=.:$JAVA_HOME/jre/bin/lib.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export PATH=$PATH:$JAVA_HOME/bin 使用 update-alternatives 切换java版本(Mint默认安装openjdk) $sudo update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_211/bin/java 300

Segmentation Fault with Pointers in C++

 ̄綄美尐妖づ 提交于 2019-12-02 11:45:33
问题 I am trying to build an object of a struct but am getting a segmentation fault while assigning the values. After I build the object it will be passed by pointer into a list. Here is my implementation: struct clientInfo { int client, a, b; }; List *info=new List(); void thread(int which) { clientInfo *cI; cI->client=which; cI->a=4; cI->b=5; info->Append(cI); } During the execution of 'cI->client=which' a segmentation fault is produced. This project is being writting on the nachos platform for

Segmentation Fault with Pointers in C++

只谈情不闲聊 提交于 2019-11-28 14:21:52
I am trying to build an object of a struct but am getting a segmentation fault while assigning the values. After I build the object it will be passed by pointer into a list. Here is my implementation: struct clientInfo { int client, a, b; }; List *info=new List(); void thread(int which) { clientInfo *cI; cI->client=which; cI->a=4; cI->b=5; info->Append(cI); } During the execution of 'cI->client=which' a segmentation fault is produced. This project is being writting on the nachos platform for anyone that is familiar, however the definition of List is much the same as any linked list in C++. For