CSE 421/521作业代写、Operating Systems作业代做、代写C++程序设计作业、C++语言作业代做
The easiest way to get an overview of the programming you will be doing is to simply goover each part you'll be working with. In `userprog', you'll find a small number of files, but here iswhere the bulk of your work will be:`process.c'`process.h'Loads ELF binaries and starts processes.`pagedir.c'`pagedir.h'A simple manager for 80x86 hardware page tables. Although you probably won't want tomodify this code for this project, you may want to call some of its functions. See Section 4.1.2.3[Page Tables] from Pintos Manual, for more information.`syscall.c'`syscall.h'Whenever a user process wants to access some kernel functionality, it invokes a systemcall. This is a skeleton system call handler. Currently, it just prints a message and terminates theuser process. In part 2 of this project you will add code to do everything else needed by systemcalls.`exception.c'Page: 3/19`exception.h'When a user process performs a privileged or prohibited operation, it traps into the kernelas an “exception" or “fault." These files handle exceptions. Currently all exceptions simply print1a message and terminate the process. Some, but not all, solutions to project 2 require modifyingpage_fault() in this file.`gdt.c'`gdt.h'The 80x86 is a segmented architecture. The Global Descriptor Table (GDT) is a table thatdescribes the segments in use. These files set up the GDT. You should not need to modify thesefiles for any of the projects. You can read the code if you're interested in how the GDT works.`tss.c'`tss.h'The Task-State Segment (TSS) is used for 80x86 architectural task switching. Pintos usesthe TSS only for switching stacks when a user process enters an interrupt handler, as does Linux.You should not need to modify these files for any of the projects. You can read the code if you'reinterested in how the TSS works.4.3 Using the File SystemYou will need to interface to the file system code for this project, because user programsare loaded from the file system and many of the system calls you must implement deal with thefile system. However, the focus of this project is not the file system, so we have provided asimple but complete file system in the `filesys' directory. You will want to look over the`filesys.h' and `file.h' interfaces to understand how to use the file system, and especially its manylimitations.There is no need to modify the file system code for this project, and so we recommendthat you do not. Working on the file system is likely to distract you from this project's focus.You will have to tolerate the following limitations of the file system:● No internal synchronization. Concurrent accesses will interfere with one another. Youshould use synchronization to ensure that only one process at a time is executing filesystem code.● File size is fixed at creation time. The root directory is represented as a file, so thenumber of files that may be created is also limited.● File data is allocated as a single extent, that is, data in a single file must occupy acontiguous range of sectors on disk. External fragmentation can therefore become aserious problem as a file system is used over time.● No subdirectories.● File names are limited to 14 characters.● A system crash mid-operation may corrupt the disk in a way that cannot be repaired1 We will treat these terms as synonyms. There is no standard distinction between them, although Intel processormanuals make a minor distinction between them on 80x86.Page: 4/19automatically. There is no file system repair tool anyway.One important feature is included:● Unix-like semantics for filesys_remove() are implemented. That is, if a file is open whenit is removed, its blocks are not deallocated and it may still be accessed by any threadsthat have it open, until the last one closes it. See Section 3.4.2 FAQ [Removing an OpenFile] from Pintos Manual for more information.You need to be able to create a simulated disk with a file system partition. Thepintos-mkdisk program provides this functionality. From the `userprog/build' directory, executepintos-mkdisk filesys.dsk --filesys-size=2. This command creates a simulated disk named`filesys.dsk' that contains a 2 MB Pintos file system partition. Then format the file systempartition by passing `-f -q' on the kernel's command line: pintos -f -q. The `-f' option causes thefile system to be formatted, and `-q' causes Pintos to exit as soon as the format is done.You'll need a way to copy files in and out of the simulated file system. The pintos `-p'(“put") and `-g' (“get") options do this. To copy `file' into the Pintos file system, use the command`pintos -p file -- -q'. (The `--' is needed because `-p' is for the pintos script, not for the simulatedkernel.) To copy it to the Pintos file system under the name `newname', add `-a newname': `pintos-p file -a newname -- -q'. The commands for copying files out of a VM are similar, but substitute`-g' for `-p'.Incidentally, these commands work by passing special commands extract and append onthe kernel's command line and copying to and from a special simulated “scratch" partition. Ifyou're very curious, you can look at the pintos script as well as `filesys/fsutil.c' to learn theimplementation details.Here's a summary of how to create a disk with a file system partition, format the filesystem, copy the echo program into the new disk, and then run echo, passing argument x.(Argument passing won't work until you implemented it.) It assumes that you've already built theexamples in `examples' and that the current directory is `userprog/build':pintos-mkdisk filesys.dsk --filesys-size=2pintos -f -qpintos -p ../../examples/echo -a echo -- -qpintos -q run 'echo x'The three final steps can actually be combined into a single command:pintos-mkdisk filesys.dsk --filesys-size=2pintos -p ../../examples/echo -a echo -- -f -q run 'echo x'If you don't want to keep the file system disk around for later use or inspection, you caneven combine all four steps into a single command. The --filesys-size=n option creates atemporary file system partition approximately n megabytes in size just for the duration of thepintos run. The Pintos automatic test suite makes extensive use of this syntax:pintos --filesys-size=2 -p ../../examples/echo -a echo -- -f -q run 'echo x'You can delete a file from the Pintos file system using the rm file kernel action, e.g.pintos -q rm file. Also, ls lists the files in the file system and cat file prints a file's contents to thedisplay.Page: 5/194.4 How User Programs WorkPintos can run normal C programs, as long as they fit into memory and use only thesystem calls you implement. Notably, malloc() cannot be implemented because none of thesystem calls required for this project allow for memory allocation. Pintos also can't run programsthat use floating point operations, since the kernel doesn't save and restore the processor'sfloating-point unit when switching threads.The `src/examples' directory contains a few sample user programs. The `Makefile' in thisdirectory compiles the provided examples, and you can edit it to compile your own programs aswell. Some of the example programs will only work once projects 3 or 4 have been implemented.Pintos can load ELF executables with the loader provided for you in `userprog/process.c'.ELF is a file format used by Linux, Solaris, and many other operating systems for object files,shared libraries, and executables. You can actually use any compiler and linker that output 80x86ELF executables to produce programs for Pintos. (We've provided compilers and linkers thatshould do just fine.)You should realize immediately that, until you copy a test program to the simulated filesystem, Pintos will be unable to do useful work. You won't be able to do interesting things untilyou copy a variety of programs to the file system. You might want to create a clean reference filesystem disk and copy that over whenever you trash your `filesys.dsk' beyond a useful state, whichmay happen occasionally while debugging.4.5 Virtual Memory LayoutVirtual memory in Pintos is divided into two regions: user virtual memory and kernelvirtual memory. User virtual memory ranges from virtual address 0 up to PHYS_BASE, which isdefined in `threads/vaddr.h' and defaults to 0xc0000000 (3 GB). Kernel virtual memory occupiesthe rest of the virtual address space, from PHYS_BASE up to 4 GB.User virtual memory is per-process. When the kernel switches from one process toanother, it also switches user virtual address spaces by changing the processor's page directorybase register (see pagedir_activate() in `userprog/pagedir.c'). struct thread contains a pointer to aprocess's page table.Kernel virtual memory is global. It is always mapped the same way, regardless of whatuser process or kernel thread is running. In Pintos, kernel virtual memory is mapped one-to-one tophysical memory, starting at PHYS_BASE. That is, virtual address PHYS_BASE accessesphysical address 0, virtual address PHYS_BASE + 0x1234 accesses physical address 0x1234, andso on up to the size of the machine's physical memory.A user program can only access its own user virtual memory. An attempt to access kernelvirtual memory causes a page fault, handled by page_fault() in `userprog/exception.c', and theprocess will be terminated. Kernel threads can access both kernel virtual memory and, if a userprocess is running, the user virtual memory of the running process. However, even in the kernel,an attempt to access memory at an unmapped user virtual address will cause a page fault.Page: 6/194.6 Typical Memory LayoutConceptually, each process is free to lay out its own user virtual memory however itchooses. In practice, user virtual memory is laid out like this:In this project, the user stack is fixed in size. Traditionally, the size of the uninitializeddata segment can be adjusted with a system call, but you will not have to implement this.The code segment in Pintos starts at user virtual address 0x08048000, approximately 128MB from the bottom of the address space. This value is specified in [SysV-i386] and has no deepsignificance.The linker sets the layout of a user program in memory, as directed by a “linker script"that tells it the names and locations of the various program segments. You can learn more aboutlinker scripts by reading the \Scripts" chapter in the linker manual, accessible via `info ld'.To view the layout of a particular executable, run objdump (80x86) or i386-elf-objdump(SPARC) with the `-p' option.Page: 7/194.7 Accessing User MemoryAs part of a system call, the kernel must often access memory through pointers providedby a user program. The kernel must be very careful about doing so, because the user can pass anull pointer, a pointer to unmapped virtual memory, or a pointer to kernel virtual address space(above PHYS_BASE). All of these types of invalid pointers must be rejected without harm to thekernel or other running processes, by terminating the offending process and freeing its resources.There are at least two reasonable ways to do this correctly. The first method is to verifythe validity of a user-provided pointer, then dereference it. If you choose this route, you'll want tolook at the functions in `userprog/pagedir.c' and in `threads/vaddr.h'. This is the simplest way tohandle user memory access.The second method is to check only that a user pointer points below PHYS_BASE, thendereference it. An invalid user pointer will cause a \page fault" that you can handle by modifyingthe code for page_fault() in `userprog/exception.c'. This technique is normally faster because ittakes advantage of the processor's MMU, so it tends to be used in real kernels (including Linux).In either case, you need to make sure not to “leak" resources. For example, suppose thatyour system call has acquired a lock or allocated memory with malloc(). If you encounter aninvalid user pointer afterward, you must still be sure to release the lock or free the page ofmemory. If you choose to verify user pointers before dereferencing them, this should bestraightforward. It's more difficult to handle if an invalid pointer causes a page fault, becausethere's no way to return an error code from a memory access. Therefore, for those who want to trythe latter technique, we'll provide a little bit of helpful code:/* Reads a byte at user virtual address UADDR.UADDR must be below PHYS_BASE.Returns the byte value if successful, -1 if a segfaultoccurred. */static intget_user (const uint8_t *uaddr){ int result;asm ("movl $1f, %0; movzbl %1, %0; 1:": "=&a" (result) : "m" (*uaddr));return result;}/* Writes BYTE to user address UDST.UDST must be below PHYS_BASE.Returns true if successful, false if a segfault occurred.*/static boolput_user (uint8_t *udst, uint8_t byte){ int error_code;asm ("movl $1f, %0; movb %b2, %1; 1:"Page: 8/19: "=&a" (error_code), "=m" (*udst) : "q" (byte));return error_code != -1;}4.8 Suggested Order of ImplementationWe suggest first implementing the following, which can happen in parallel:● Argument passing (see Section 3.3.3 [Argument Passing] from Pintos Manual). Everyuser program will page fault immediately until argument passing is implemented.For now, you may simply wish to change*esp = PHYS_BASE;to*esp = PHYS_BASE - 12;in setup_stack(). That will work for any test program that doesn't examine its arguments, althoughits name will be printed as (null). Until you implement argument passing, you shouldonly run programs without passing command-line arguments. Attempting to passarguments to a program will include those arguments in the name of the program, whichwill probably fail.● User memory access (see Section 3.1.5 [Accessing User Memory] from Pintos Manual).All system calls need to read user memory. Few system calls need to write to usermemory.● System call infrastructure (see Section 3.3.4 [System Calls] from Pintos Manual).Implement enough code to read the system call number from the user stack and dispatchto a handler based on it.● The exit system call. Every user program that finishes in the normal way calls exit. Evena program that returns from main() calls exit indirectly (see _start() in `lib/user/entry.c').● The write system call for writing to fd 1, the system console. All of our test programswrite to the console (the user process version of printf() is implemented this way), so theywill all malfunction until write is available.● For now, change process_wait() to an infinite loop (one that waits forever). The providedimplementation returns immediately, so Pintos will power off before any processesactually get to run. You will eventually need to provide a correct implementation.After the above are implemented, user processes should work minimally. At the very least, theycan write to the console and exit correctly. You can then refine your implementation so that someof the tests start to pass.Page: 9/194.9 Requirements4.9.1 Process Termination MessagesWhenever a user process terminates, because it called exit or for any other reason, printthe process's name and exit code, formatted as if printed by printf ("%s: exit(%d)\n", ...);. Thename printed should be the full name passed to process_execute(), omitting command-linearguments. Do not print these messages when a kernel thread that is not a user process terminates,or when the halt system call is invoked. The message is optional when a process fails to load.Aside from this, don't print any other messages that Pintos as provided doesn't alreadyprint. You may _nd extra messages useful during debugging, but they will confuse the gradingscripts and thus lower your score.4.9.2 Argument PassingCurrently, process_execute() does not support passing arguments to new processes.Implement this functionality, by extending process_execute() so that instead of simply taking aprogram file name as its argument, it divides it into words at spaces. The _rst word is the programname, the second word is the _rst argument, and so on. That is, process_execute("grep foo bar")should run grep passing two arguments foo and bar.Within a command line, multiple spaces are equivalent to a single space, so thatprocess_execute("grep foo bar") is equivalent to our original example. You can impose areasonable limit on the length of the command line arguments. For example, you could limit thearguments to those that will _t in a single page (4 kB). (There is an unrelated limit of 128 bytes oncommand-line arguments that the pintos utility can pass to the kernel.)You can parse argument strings any way you like. If you're lost, look at strtok_r(),prototyped in `lib/string.h' and implemented with thorough comments in `lib/string.c'. You can_nd more about it by looking at the man page (run man strtok_r at the prompt).See Section 3.5.1 [Program Startup Details] from Pintos Manual, for information onexactly how you need to set up the stack.Page: 10/194.9.3 System CallsImplement the system call handler in `userprog/syscall.c'. The skeleton implementationwe provide \handles" system calls by terminating the process. It will need to retrieve the systemcall number, then any system call arguments, and carry out appropriate actions.Implement the following system calls. The prototypes listed are those seen by a userprogram that includes `lib/user/syscall.h'. (This header, and all others in `lib/user', are for use byuser programs only.) System call numbers for each system call are defined in `lib/syscall-nr.h':[System Call] void halt (void)Terminates Pintos by calling shutdown_power_off() (declared in `devices/shutdown.h').This should be seldom used, because you lose some information about possible deadlocksituations, etc.[System Call] void exit (int status)Terminates the current user program, returning status to the kernel. If the process's parentwaits for it (see below), this is the status that will be returned. Conventionally, a status of 0indicates success and nonzero values indicate errors.[System Call] pid_t exec (const char *cmd_line)Runs the executable whose name is given in cmd line, passing any given arguments, andreturns the new process's program id (pid). Must return pid -1, which otherwise should not be avalid pid, if the program cannot load or run for any reason. Thus, the parent process cannot returnfrom the exec until it knows whether the child process successfully loaded its executable. Youmust use appropriate synchronization to ensure this.[System Call] int wait (pid t pid)Waits for a child process pid and retrieves the child's exit status. If pid is still alive, waitsuntil it terminates. Then, returns the status that pid passed to exit. If pid did not call exit(), but wasterminated by the kernel (e.g. killed due to an exception), wait(pid) must return -1. It is perfectlylegal for a parent process to wait for child processes that have already terminated by the time theparent calls wait, but the kernel must still allow the parent to retrieve its child's exit status, orlearn that the child was terminated by the kernel. wait must fail and return -1 immediately if anyof the following conditions is true:● pid does not refer to a direct child of the calling process. pid is a direct child of thecalling process if and only if the calling process received pid as a return value from asuccessful call to exec.Note that children are not inherited: if A spawns child B and B spawns child process C,then A cannot wait for C, even if B is dead. A call to wait(C) by process A must fail. Similarly,orphaned processes are not assigned to a new parent if their parent process exits before they do.● The process that calls wait has already called wait on pid. That is, a process may waitfor any given child at most once.Processes may spawn any number of children, wait for them in any order, and may evenexit without having waited for some or all of their children. Your design should consider all theways in which waits can occur. All of a process's resources, including its struct thread, must befreed whether its parent ever waits for it or not, and regardless of whether the child exits before orPage: 11/19after its parent.You must ensure that Pintos does not terminate until the initial process exits. Thesupplied Pintos code tries to do this by calling process_wait() (in `userprog/process.c') frommain() (in `threads/init.c'). We suggest that you implement process_wait() according to thecomment at the top of the function and then implement the wait system call in terms ofprocess_wait(). Implementing this system call requires considerably more work than any of therest.[System Call] bool create (const char *file, unsigned initial_size)Creates a new file called ‘file’ initially initial_size bytes in size. Returns true ifsuccessful, false otherwise. Creating a new file does not open it: opening the new file is a separateoperation which would require a open system call.[System Call] bool remove (const char *file)Opens the file called `file’. Returns a nonnegative integer handle called a “file descriptor"(fd), or -1 if the file could not be opened. File descriptors numbered 0 and 1 are reserved for theconsole: fd 0 (STDIN_FILENO) is standard input, fd 1 (STDOUT_FILENO) is standard output.The open system call will never return either of these file descriptors, which are valid as systemcall arguments only as explicitly described below.Each process has an independent set of file descriptors. File descriptors are not inheritedby child processes. When a single file is opened more than once, whether by a single process ordifferent processes, each open returns a new file descriptor. Different file descriptors for a singlefile are closed independently in separate calls to close and they do not share a file position.[System Call] int filesize (int fd)Returns the size, in bytes, of the file open as fd.[System Call] int read (int fd, void *buffer, unsigned size)Reads size bytes from the file open as fd into buffer. Returns the number of bytes actuallyread (0 at end of file), or -1 if the file could not be read (due to a condition other than end of file).Fd 0 reads from the keyboard using input_getc().[System Call] int write (int fd, const void *buffer, unsigned size)Writes size bytes from buffer to the open file fd. Returns the number of bytes actuallywritten, which may be less than size if some bytes could not be written.Writing past end-of-file would normally extend the file, but file growth is notimplemented by the basic file system. The expected behavior is to write as many bytes as possibleup to end-of-file and return the actual number written, or 0 if no bytes could be written at all.Fd 1 writes to the console. Your code to write to the console should write all of buffer inone call to putbuf(), at least as long as size is not bigger than a few hundred bytes. (It isreasonable to break up larger buffers.) Otherwise, lines of text output by different processes mayend up interleaved on the console, confusing both human readers and our grading scripts.[System Call] void seek (int fd, unsigned position)Changes the next byte to be read or written in open file fd to position, expressed in bytesfrom the beginning of the file. (Thus, a position of 0 is the file's start.) A seek past the current endPage: 12/19of a file is not an error. A later read obtains 0 bytes, indicating end of file. A later write extendsthe file, filling any unwritten gap with zeros. (However, in Pintos files have a fixed length bydefault, so writes past end of file will return an error.) These semantics are implemented in thefile system and do not require any special effort in system call implementation.[System Call] unsigned tell (int fd)Returns the position of the next byte to be read or written in open file fd, expressed inbytes from the beginning of the file.[System Call] void close (int fd)Closes file descriptor fd. Exiting or terminating a process implicitly closes all its open filedescriptors, as if by calling this function for each one.The file defines other syscalls, but you can ignore them for this project.To implement syscalls, you need to provide ways to read and write data in user virtualaddress space. You need this ability before you can even obtain the system call number, becausethe system call number is on the user's stack in the user's virtual address space. This can be a bittricky: what if the user provides an invalid pointer, a pointer into kernel memory, or a blockpartially in one of those regions? You should handle these cases by terminating the user process.We recommend writing and testing this code before implementing any other system callfunctionality. See Section 3.1.5 [Accessing User Memory] from Pintos Manual, for moreinformation.You must synchronize system calls so that any number of user processes can make themat once. In particular, it is not safe to call into the file system code provided in the `filesys'directory from multiple threads at once. Your system call implementation must treat the filesystem code as a critical section. Don't forget that process_execute() also accesses files. For now,we recommend against modifying code in the `filesys' directory.We have provided you a user-level function for each system call in `lib/user/syscall.c'.These provide a way for user processes to invoke each system call from a C program. Each uses alittle inline assembly code to invoke the system call and (if appropriate) returns the system call'sreturn value.When you're done with this part, and forevermore, Pintos should be bulletproof. Nothingthat a user program can do should ever cause the OS to crash, panic, fail an assertion, orotherwise malfunction. It is important to emphasize this point: our tests will try to break yoursystem calls in many, many ways. You need to think of all the corner cases and handle them. Thesole way a user program should be able to cause the OS to halt is by invoking the halt system call.If a system call is passed an invalid argument, acceptable options include returning anerror value (for those calls that return a value), returning an undefined value, or terminating theprocess.See Section 3.5.2 [System Call Details] from Pintos Manual, for details on how systemcalls work.4.9.4 Denying Writes to ExecutablesAdd code to deny writes to files in use as executables. Many OSes do this because of thePage: 13/19unpredictable results if a process tried to run code that was in the midst of being changed on disk.You can use file_deny_write() to prevent writes to an open file. Callingfile_allow_write() on the file will re-enable them (unless the file is denied writes by anotheropener).Closing a file will also re-enable writes. Thus, to deny writes to a process's executable,you must keep it open as long as the process is still running. Please also read Section 3.4 [FAQ]and Section 3.5 [80x86 Calling Convention] from Pintos manual for more information.5. TestingYour project grade will be based on our tests. Each project has several tests, each ofwhich has a name beginning with “tests”. To completely test your submission, invoke “makecheck” from the project “build” directory. This will build and run each test and print a "pass" or"fail" message for each one. When a test fails, make check also prints some details of the reasonfor failure. After running all the tests, make check also prints a summary of the test results.You can also run individual tests one at a time. A given test t writes its output to“t.output”, then a script scores the output as "pass" or "fail" and writes the verdict to “t.result”. Torun and grade a single test, make the “.result” file explicitly from the “build” directory, e.g. maketests/userprog/args-none.result. If make says that the test result is up-to-date, butyou want to re-run it anyway, either run make clean or delete the “.output” file by hand.By default, each test provides feedback only at completion, not during its run. If youprefer, you can observe the progress of each test by specifying “VERBOSE=1” on the makecommand line, as in make check VERBOSE=1. You can also provide arbitrary options to thepintos run by the tests with “PINTOSOPTS='...'”, e.g. make check PINTOSOPTS='-j 1' to select ajitter value of 1 (see Section 1.1.4 [Debugging versus Testing] from Pintos Manual).All of the tests and related files are in “pintos/src/tests”.Page: 14/196. Design DocumentA copy of the Project 1 Design Document (userprog.tmpl) can be found here andalso inside pintos/doc/. Copy the userprog.tmpl file to userprog.txt for your submission.Leave the header as it is. Change the “FirstName LastName <email@domain.example>” intoyour corresponding team members details.+--------------------------+| CS 140 || PROJECT 2: USER PROGRAMS || DESIGN DOCUMENT |+--------------------------+---- GROUP ---->> Fill in the names and email addresses of your group members.FirstName LastName <email@domain.example>FirstName LastName <email@domain.example>FirstName LastName <email@domain.example>---- PRELIMINARIES ---->> If you have any preliminary comments on your submission, notes for the>> TAs, or extra credit, please give them here.>> Please cite any offline or online sources you consulted while>> preparing your submission, other than the Pintos documentation, course>> text, lecture notes, and course staff.We recommend that you read the design document template before you start workingon the project. See section D. Project Documentation, for a sample design document that goesalong with a fictitious project. You will need to decide and describe the main data structures,algorithms, and synchronization mechanisms that you are using / planning to use for eachcomponent of the project.Page: 15/197. GradingThe grading of the project will be done according to the following rubric :● (108 points) A completely working system call implementation that passes all twenty eight(28) tests.● (88 points) A fully code for robustness of system calls that passes all thirty-four (34) tests.● (1 point) A working functionality of features that VM might break that passes one (1) test.● (30 points) Passing the functionalities of the base system, passing all thirteen (13) tests.Run “make check” and “make grade” to see how many total points you receives fromimplementation (out of 227) and what is the grade.Functionality of system calls (tests/userprog/Rubric.functionality):3/ 3 tests/userprog/args-none3/ 3 tests/userprog/args-single3/ 3 tests/userprog/args-multiple3/ 3 tests/userprog/args-many3/ 3 tests/userprog/args-dbl-space3/ 3 tests/userprog/create-empty3/ 3 tests/userprog/create-long3/ 3 tests/userprog/create-normal3/ 3 tests/userprog/create-exists3/ 3 tests/userprog/open-missing3/ 3 tests/userprog/open-normal3/ 3 tests/userprog/open-twice3/ 3 tests/userprog/read-normal3/ 3 tests/userprog/read-zero3/ 3 tests/userprog/write-normal3/ 3 tests/userprog/write-zero3/ 3 tests/userprog/close-normal5/ 5 tests/userprog/exec-once5/ 5 tests/userprog/exec-multiple5/ 5 tests/userprog/exec-arg5/ 5 tests/userprog/wait-simple5/ 5 tests/userprog/wait-twice5/ 5 tests/userprog/exit3/ 3 tests/userprog/halt15/15 tests/userprog/multi-recurse3/ 3 tests/userprog/rox-simple3/ 3 tests/userprog/rox-child3/ 3 tests/userprog/rox-multichildPage: 16/19Robustness of system calls (tests/userprog/Rubric.robustness):2/ 2 tests/userprog/close-stdin2/ 2 tests/userprog/close-stdout2/ 2 tests/userprog/close-bad-fd2/ 2 tests/userprog/close-twice2/ 2 tests/userprog/read-bad-fd2/ 2 tests/userprog/read-stdout2/ 2 tests/userprog/write-bad-fd2/ 2 tests/userprog/write-stdin2/ 2 tests/userprog/multi-child-fd3/ 3 tests/userprog/create-bad-ptr3/ 3 tests/userprog/exec-bad-ptr3/ 3 tests/userprog/open-bad-ptr3/ 3 tests/userprog/read-bad-ptr3/ 3 tests/userprog/write-bad-ptr3/ 3 tests/userprog/create-bound3/ 3 tests/userprog/open-boundary3/ 3 tests/userprog/read-boundary3/ 3 tests/userprog/write-boundary2/ 2 tests/userprog/create-null2/ 2 tests/userprog/open-null2/ 2 tests/userprog/open-empty3/ 3 tests/userprog/sc-bad-arg3/ 3 tests/userprog/sc-bad-sp5/ 5 tests/userprog/sc-boundary5/ 5 tests/userprog/sc-boundary-25/ 5 tests/userprog/exec-missing5/ 5 tests/userprog/wait-bad-pid5/ 5 tests/userprog/wait-killed1/ 1 tests/userprog/bad-read1/ 1 tests/userprog/bad-write1/ 1 tests/userprog/bad-jump1/ 1 tests/userprog/bad-read21/ 1 tests/userprog/bad-write21/ 1 tests/userprog/bad-jump2Functionality of features that VM might break (tests/userprog/no-vm/Rubric):1/ 1 tests/userprog/no-vm/multi-oomFunctionality of base file system (tests/filesys/base/Rubric):Page: 17/191/ 1 tests/filesys/base/sm-create2/ 2 tests/filesys/base/sm-full2/ 2 tests/filesys/base/sm-random2/ 2 tests/filesys/base/sm-seq-block3/ 3 tests/filesys/base/sm-seq-random1/ 1 tests/filesys/base/lg-create2/ 2 tests/filesys/base/lg-full2/ 2 tests/filesys/base/lg-random2/ 2 tests/filesys/base/lg-seq-block3/ 3 tests/filesys/base/lg-seq-random4/ 4 tests/filesys/base/syn-read4/ 4 tests/filesys/base/syn-write2/ 2 tests/filesys/base/syn-remove● The source code score break downSystem Call implementation - 35%Robustness of system calls - 25%Functionality of features which VM might break - 10%Functionality of the base system - 30%● This score is scaled down from 100% to 90% to be your “source code score”.● Your “design document” is the remaining 10% of your Project-2 grade.● Check autograder submission score to be consistent with what you get on your VM.● You’ll have unlimited submission, submit early and re-submit.Page: 18/198. What to Submit?1. You need to write a design document for your project as described in section 6. A soft copyof this design document (as text file) should be submitted before the source code deadline.The design document is due April 5th @11:59 pm.(NO LATE SUBMISSION)2. You need to submit the complete source tree (all source files) of your project. The wholepackage should compile when the tester simply types make in the source code directory.The project source code submission is due April 19th@11:59 pm.(NO LATE SUBMISSION)The submission of the design document and the project source code will be done using ourdepartment’s AutoLab (https://autograder.cse.buffalo.edu/) system, which will allow you to seeyour grade. The detailed instructions on this will be provided later.REFERENCES● Manual adopted from T. Kosar from University at Buffalo● Pintos Reference ManualPage: 19/19
因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:
微信:codinghelp