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.

235 questions
-1
votes
1 answer

How can I use kbgetc in xv6

I want use kbdgetc() in user mode. I need to use it to program a vim-like software in xv6. I try to use kernel mode, but I totally don't know how to do it.
-1
votes
1 answer

XV6 Fork():Why does parent run first?

After fork() is called, why does the parent process run before the child process in most of the cases? In what scenario will the child process run before the parent process after fork()? Please explain this to me.
-1
votes
1 answer

where is fork's child process return value?

why not fork's return value 0? I know the child process making successful, then the fork return value is 0 but i tried if return value(pid) == 0 then printf code. unfortunately not print. fork(void) { int i, pid; struct proc *np; struct proc…
jun130
  • 27
  • 6
-1
votes
1 answer

What is ELF Header in xv6?

What is ELF header? Can anyone explain in detail how it works and why is it required? I can't find any good resource which provides a crisp explanation of it.
-1
votes
1 answer

Operating System Question Kernel XV6 Interrupt and Timer Interrupt

I am kind of confusing about the interrupt. Is there anyone can help to explain the difference between interrupt and time interrupt? what happened when Interrupt and time interrupt?
-1
votes
1 answer

How to know which code caused a trap in xv6 when debugging?

Here is what I suppose: When the code causes a trap (system call or exceptions), xv6 will replace the registers with certain values to transfer the control to alltraps(), in which trap() is called. But sometimes xv6 runs into trap() out of my…
Zhang Yang
  • 11
  • 2
  • 4
-1
votes
1 answer

How do I add "top" system command to xv6?

I am a beginner and don't know anything about writing system commands on my own.This is my class assignment. Any help would be great. Thanks.
-1
votes
1 answer

GDB wont recognize new files/lines

i am trying to debug xv6, using qemu emulator, with gdb kernel. How ever, gdb wont recognize any additions i do to the files. for example, it wont recognize new files, or even new lines in a existing file, for example: in file x86.h i have added…
Dinari
  • 2,247
  • 9
  • 28
-1
votes
1 answer

x86 add and addl operands are adding wrong?

I working with xv6, which implements the original UNIX on x86 machines. I wrote very simple inline assembly in a C program : register int ecx asm ("%ecx"); printf(1, "%d\n", ecx); __asm__("movl 16(%esp), %ecx\t\n"); printf(1, "%d\n",…
1729
  • 165
  • 13
-4
votes
1 answer

Compiling and building a C file from a C program

I was wondering that if it is possible to compile and build, and eventually run a C file from another C file (This C file would eventually be a system call file). i.e. ... // Calling gcc(?) or something to compile and build the executable /*…
thedarkguy
  • 55
  • 4
1 2 3
15
16