xv6-public | A disconected fork of MIT xv6 OS
kandi X-RAY | xv6-public Summary
kandi X-RAY | xv6-public Summary
xv6 is a re-implementation of dennis ritchie's and ken thompson's unix version 6 (v6). xv6 loosely follows the structure and style of v6, but is implemented for a modern x86-based multiprocessor using ansi c. xv6 is inspired by john lions's commentary on unix 6th edition (peer to peer communications; isbn: 1-57398-013-7; 1st edition (june 14, 2000)). see also which provides pointers to on-line resources for v6. xv6 borrows code from the following sources: jos (asm.h, elf.h, mmu.h, bootasm.s, ide.c, console.c, and others) plan 9 (entryother.s, mp.h, mp.c, lapic.c) freebsd (ioapic.c) netbsd (console.c). the following people have made contributions: russ cox (context switching, locking), cliff frey (mp), xiao yu (mp), nickolai zeldovich, and austin clements. we are also grateful for the bug reports and patches contributed by silas boyd-wickizer, cody cutler, mike cat, nelson elhage, nathaniel filardo, peter froehlich, yakir goaron, shivam handa, bryan henry, jim huang, anders kaseorg, kehao95, wolfgang keller, eddie kohler, imbar marinescu, yandong mao, hitoshi mitake, carmi merimovich, joel nider, greg price, ayan shafqat, eldar sehayek, yongming shen, cam tenny, rafael ubal, warren toomey, stephen tu,
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of xv6-public
xv6-public Key Features
xv6-public Examples and Code Snippets
Community Discussions
Trending Discussions on xv6-public
QUESTION
I'm using VMware Workstation 15 Pro on Windows 10. The guest OS is Linux 18.04.5 LTS. In guest Linux, I downloaded xv6 using command: git clone git://github.com/mit-pdos/xv6-public.git
. After building xv6 using make
, I run make qemu-nox-gdb
. However, the xv6 freezes inside qemu. No prompt printed out. No response to any key input. But if I remove gdb
, everything works well.
output image
PS: I have update and upgrade everything in Linux, including qemu, git, gdb, nasm, etc.
...ANSWER
Answered 2021-Mar-29 at 18:07That QEMU commandline tells QEMU "don't run anything, instead, stop and wait for a connection from gdb". The makefile printed a message for you: "Now run 'gdb'". Have you run gdb and connected it to QEMU? (Probably there should be some tutorial or other info with xv6 that explains more about how to do this.)
QUESTION
I am currently exploring xv6 source code and found this line in the code of function getcmd (booklet: line 8688):
...ANSWER
Answered 2020-Jan-16 at 14:13Check in ulib.c file in the same repo. It is defined as
QUESTION
As part of my OS course I will need to write my own tiny OS kernel run under QEMU with UEFI (OSVF). The UEFI spec seems to be pretty complex, and one thing that is slipping away from me is if it is possible to have a static (compile-time defined) physical memory layout, so that my kernel has a reasonable amount of physical memory available while also preserving the UEFI-used areas.
Let me clarify using xv6 as an example. It has a simple hand-made bootloader run by legacy BIOS. According to the xv6 book, this OS allocates physical memory as follows:
...ANSWER
Answered 2019-Jun-21 at 15:54So is there a way to achieve a static physical memory layout in my UEFI-booted kernel?
No. You can try to statically allocate an area of physical memory that happens to work for one computer (the memory manager built into UEFI does have an "allocate page/s at this specific physical address" functionality), but there's no guarantee that the range of physical addresses won't be reserved by UEFI on any other computer; and it makes no difference which physical address range it is.
Instead, before your boot code enables paging it can happily use pages allocated from UEFI's memory manager and/or memory pre-allocated in your boot loader's ".bss" section without caring about what the physical addresses are; and after your boot code enables paging the physical addresses become irrelevant for almost everything (and you can use your virtual address spaces however you like, including statically allocating virtual address ranges in kernel space if you don't like security/KASLR).
Mostly, for UEFI, if it was possible/supported there'd be no benefit to statically allocated physical addresses and it wouldn't make anything simpler.
QUESTION
The printf
function calls write
(re. forktest.c):
ANSWER
Answered 2018-Apr-22 at 23:29fd==1
refers to stdout
, or Standard Out. It's a common feature of Unix-like Operatin Systems. The kernel knows that it's not a real file. Writes to stdout
are mapped to terminal output.
QUESTION
I came across the following line of code, and I can't figure out what it does.
...ANSWER
Answered 2017-Dec-04 at 01:10switch(0)
will always execute the block of code associated with the case 0:
block; still, here there's no actually executed code - both cases are empty.
The point here is to make the compiler angry at compile time if the asserted expression (a
) is not verified: in this case, the expanded macro will have two case 0:
- the one provided explicitly, and the one that uses the result of the asserted expression (so, 0 in case it failed); this results in a switch
with two identical case
, which is not allowed and makes the compiler stop with an error at compile time.
This will also fail if the passed expression is not a constant evaluated at compile time (as you cannot have runtime-determined case
values), which is also expected from a static_assert
.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install xv6-public
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page