标签: pintos

如何在进程结束后自动关闭`qemu`的执行?

我希望qemu打开并显示输出后的窗口在运行后自动关闭pintOS

就像我pintos -- run alarm-multipletcshshell中运行命令一样,qemu显示该进程开始,然后一些alarm-notifications然后进程结束,但之后qemu窗口将不会关闭

我想在成功完成系统调用后退出窗口.

linux operating-system qemu pintos

6
推荐指数
1
解决办法
689
查看次数

如何解决PintOS无法识别的字符\ x16

我在家用计算机上下载并设置了PintOS和依赖项,但是当我尝试运行时pintos run alarm-multiple,我收到错误:

Unrecognized character \x16; marked by <-- HERE after if ($<-- HERE near column 7 at ~/code/pintos/src/utils/pintos line 911.

该行上有^V同步空闲控制字符.我无法找到有关此问题的任何信息; 看起来我是唯一一个体验它的人.

我安装了Perl v5.26.0.

perl pintos

6
推荐指数
2
解决办法
2443
查看次数

安装 Pint-OS 并尝试运行多个警报后,我收到以下错误。我使用 bochs 作为模拟器。任何可能的解决方法?

Prototype mismatch: sub main::SIGVTALRM () vs none at /home/abhijay/pintos-os/pintos/src/utils/pintos line 934.
Constant subroutine SIGVTALRM redefined at /home/abhijay/pintos-os/pintos/src/utils/pintos line 926.
warning: can't find squish-pty, so terminal input will fail
bochs -q
========================================================================
                       Bochs x86 Emulator 2.4.6
             Build from CVS snapshot, on February 22, 2011
                   Compiled at Jun  8 2013, 05:16:04
========================================================================
00000000000i[     ] LTDL_LIBRARY_PATH not set. using compile time default '/usr/lib/bochs/plugins'
00000000000i[     ] BXSHARE not set. using compile time default '/usr/share/bochs'
00000000000i[     ] reading configuration from bochsrc.txt
00000000000e[     ] user_shortcut: old-style …
Run Code Online (Sandbox Code Playgroud)

operating-system bochs pintos

5
推荐指数
1
解决办法
2022
查看次数

Pintos 编程项目 2

对于第二个项目(用户程序),是否必须以不同的方式安装 Pintos?每当我尝试pintos -f -q在我的安装上运行时,我都会收到一个错误,其中 Pintos 无法识别参数“-f”。

Back to tcg accelerator.
PiLo hda1
Loading..........
Kernel command line: -f -q
Kernel PANIC at ../../threads/init.c:264 in parse_options(): unknown option `-f' (use -h for help)
Call stack: 0xc00283de.
The `backtrace' program can make call stacks useful.
Read "Backtraces" in the "Debugging Tools" chapter
of the Pintos documentation for more information.
Run Code Online (Sandbox Code Playgroud)

这是 Pintos 处理所有参数的地方:http : //www.cse.iitd.ernet.in/~sbansal/csl373/pintos/doc/pintos_html/init_8c-source.html 我找不到 FILESYS 的定义任何地方。有人可以帮我吗?

linux operating-system pintos

3
推荐指数
1
解决办法
3650
查看次数

获取信号量必须是原子的。Pintos 的 sema_down 安全吗?

这段代码来自 Pintos 源码:https : //www.cs.usfca.edu/~benson/cs326/pintos/pintos/src/threads/synch.c

void
sema_down (struct semaphore *sema) 
{
  enum intr_level old_level;

  ASSERT (sema != NULL);
  ASSERT (!intr_context ());

  old_level = intr_disable ();
  while (sema->value == 0) 
    {
      list_push_back (&sema->waiters, &thread_current ()->elem);
      thread_block ();
    }
  sema->value--;
  intr_set_level (old_level);
}
Run Code Online (Sandbox Code Playgroud)

采取信号量的事实是sema->value--;。如果它有效,它必须是一个原子操作。我们怎么知道它实际上是原子操作?我知道现代 CPU 保证对齐的内存操作(对于字/双字/四字 - 它取决于)是原子的。但是,在这里,我不相信为什么它是原子的。

x86 multithreading interrupt atomicity pintos

2
推荐指数
1
解决办法
950
查看次数

需要弄清楚以下内联汇编代码的含义

static int func_name (const uint8_t * address)
{
    int result;
    asm ("movl $1f, %0; movzbl %1, %0; 1:"
   : "=&a" (result) : "m" (*address));

    return result;
}
Run Code Online (Sandbox Code Playgroud)

我已经通过互联网浏览了内联汇编参考。但我无法弄清楚这段代码在做什么,例如。$1f 是什么?“m”是什么意思?正常的内联约定不是使用“=r”和“r”吗?

c x86 assembly inline-assembly pintos

1
推荐指数
1
解决办法
2088
查看次数