Questions tagged [xv6]

xv6 is a small Unix-like teaching operating system made by MIT for its 6.828 OS course. It is inspired by Unix Version 6.

326 questions
0
votes
2 answers

xv6 - what does '+' mean in a switch sentence

I'm modifying XV6 and i'm trying to understand something about trap.c switch(tf->trapno){ case T_IRQ0 + IRQ_TIMER: if(cpu->id == 0){ acquire(&tickslock); ticks++; wakeup(&ticks); release(&tickslock); } …
Itay Sela
  • 942
  • 9
  • 26
0
votes
1 answer

reading from 1 pipe multiple writers

We are trying to read char* data from a pipe given to multiple child processes . each child writes a char* into a shared pipe, which the parent process reads from. what we're trying to do is parse the information on a children processes running…
Tai
  • 59
  • 5
0
votes
2 answers

transferring a pipe between parent and child within a function

I am having some difficulties in the following thing: I am trying to send a pipe to a child node within a function, and then have the child writing into it. The following code parts will explain it better: int p[2]; int…
Tai
  • 59
  • 5
0
votes
1 answer

How to retrieve the name of a system call in xv6?

Is there a way to retrieve the name of a system call being made while in syscall()? I see that we have access to the number; can I use that somehow?
Jonfor
  • 139
  • 4
  • 15
0
votes
2 answers

Need help to understand the syntax in xv6 kernel

I am reading files of xv6 kernel and I cannot understand what the following means: static int (*syscalls[])(void) = { [SYS_fork] sys_fork, [SYS_exit] sys_exit, [SYS_wait] sys_wait, [SYS_pipe] sys_pipe, ... } Can someone explain…
RUstar
  • 37
  • 5
0
votes
1 answer

CS:EIP in comparison

I'm trying to understand booting in xv6 (a teaching OS) with gdb. One of the instructions during the initial boot is (AT&T syntax): cmpl 0x0,%cs:0x65a4 And then, jne 0xfd2b9 Now, from what I understand, cmpl compares the two values and sets…
hoodakaushal
  • 1,253
  • 2
  • 16
  • 31
0
votes
3 answers

Pseudo-Random number genetor based on LCG

I want to implement the pseudo-random number generator in xv6. I am trying to implement Linear congruential generator algorithm, but I am not getting how to seed it. Here is the piece of my code. I know this code won't work because X is not changing…
Anmol Yousaf
  • 65
  • 1
  • 13
0
votes
1 answer

XV6- scheduler for loop

i am working in implementing a new scheduler in my xv6 , and to do that i need to understand how its working 1st , i am facing a wired problem which is i cant really understand how the for loop loops throw the process this is the original code…
Ahmed Bassiouny
  • 275
  • 6
  • 26
0
votes
2 answers

how to build xv6 OS on qemu

I am trying to build XV6 OS on linux using QEMU but whenever I type on the terminal make QEMU-nox it gives an error "no rule to make target qemu-nox" I know i have properly installed qemu. can anyone please tell me what is wrong ? also what will be…
aneena
  • 187
  • 1
  • 2
  • 13
0
votes
1 answer

Installing xv6 on linux mint 16 x64

I'm having an error when trying to make xv6 on linux mint 16 64bit. It is a new installation of the linux mint and thus I might be missing of some libraries, I just can't find out which.. This is the error: gcc -m32 -Werror -Wall -o mkfs…
Javi
  • 889
  • 1
  • 16
  • 41
0
votes
1 answer

can't run xv6 under Qemu

I want to boot xv6(unix based os) on Qemu.I compile It from source code and also install qemu but when I type make qemu in terminal I get the following errors: /usr/bin/qemu-system-i386 -serial mon:stdio -hdb fs.img xv6.img -smp 2 -m 512 Could not…
mojibuntu
  • 307
  • 3
  • 16
0
votes
1 answer

Cannot start xv6 in qemu

I use Debian Wheezy and I want to run a xv6 in qemu. I have installed libsdl1.2-dev and then start run make qemu. But an error occured: Could not initalize SDL(could not find the device) exiting.
-1
votes
0 answers

Encountered problem installing XV6 on my MAC OS

I am tring to install XV6 on my MacOS. These are the steps I followed: Downloaded xv6 from https://github.com/mit-pdos/xv6-public Installed qemu using brew install qemu Installed i386-elf toolchain from…
Ku-hello
  • 35
  • 5
-1
votes
1 answer

Why print the space to console?

This is the echo utility program. It reads the command-line argument from the console and prints it back to the console. In the following block of code, at line 10, why write a space to the console when there is not the end of argument…
Aries Zhao
  • 29
  • 6
-1
votes
1 answer

Having some difficulties running xv6 under qemu

I found a lot of threads listing their troubles with getting xv6 to run, but couldn't really find any that helped me, so here we go... The first step of running the make command didn't give me any problems. However when I tried to run the "make…
1 2 3
21
22