os161 | ops-class.org OS/161 sources

 by   ops-class C Version: Current License: No License

kandi X-RAY | os161 Summary

kandi X-RAY | os161 Summary

os161 is a C library. os161 has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

ops-class.org OS/161 sources.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              os161 has a low active ecosystem.
              It has 102 star(s) with 169 fork(s). There are 14 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 1 open issues and 5 have been closed. On average issues are closed in 6 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of os161 is current.

            kandi-Quality Quality

              os161 has no bugs reported.

            kandi-Security Security

              os161 has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              os161 does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              os161 releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of os161
            Get all kandi verified functions for this library.

            os161 Key Features

            No Key Features are available at this moment for os161.

            os161 Examples and Code Snippets

            No Code Snippets are available at this moment for os161.

            Community Discussions

            QUESTION

            What happens when setting the O_CREAT bit but only providing two parameters for open()?
            Asked 2020-Sep-06 at 01:34

            Here, I was asking about an assignment of implementing the sys_open syscall for OS161 which will be called by the open function.

            The definition of the open function is as follows:

            ...

            ANSWER

            Answered 2020-Sep-06 at 01:34

            The POSIX documentation simply states that the:

            mode shall be set to the value of the argument following the oflag argument taken as type mode_t modified as follows: ...

            It does not specify what happens when you omit that parameter so you would be well advised to ensure it's there (on the client side). The most likely case will be that it will use what is where the parameter would be (whether in register or memory, depending on calling convention), and the chances of this being the correct value would be slim.

            The Linux documentation has this to say on the matter (my emphasis):

            The mode argument must be supplied if O_CREAT or O_TMPFILE is specified in flags; if it is not supplied, some arbitrary bytes from the stack will be applied as the file mode.

            Now, granted, that's not a standards document where the term "must" is a solid requirement that you do it (or else all bets are off as to the effect), but you should probably read it in that way. Hence, again, you should make sure you supply it.

            So I would say that the way you handle it is as follows:

            • If on the client/caller side, make sure you supply the mode. Anything else is breaking the contract.
            • On the server/callee side, assume that the caller has supplied it since, if they haven't, they're breaking the contract. There appears to be no suitable error return in POSIX (in either the "shall fail" or "may fail" section) that would be suitable for indicating this issue, even if you could detect it.

            Source https://stackoverflow.com/questions/63753992

            QUESTION

            How to add the two variations of the open syscall in OS161?
            Asked 2020-Sep-03 at 11:16

            From the man pages of OS161:

            Synopsis ...

            ANSWER

            Answered 2020-Sep-03 at 11:16

            First, that OS161 man page is wrong in incorrectly implying that there are two versions of the open() function. There is only one version of open() - C does not support function overloading like that man page implies. Per POSIX the one version of open() is

            Source https://stackoverflow.com/questions/63721977

            QUESTION

            What is the use of the type userptr_t in os161?
            Asked 2020-Aug-13 at 01:42

            I'm trying to complete an assignment for an operating systems course, Here.

            I had a question from the assignment:

            What is the purpose of userptr_t?

            When I searched the source code for userptr_t, Here, I found this:

            ...

            ANSWER

            Answered 2020-Aug-13 at 01:42

            This looks like a strong typedef, i.e. a typedef intended to increase type safety by avoiding unintended uses/conversions of the wrapped data.

            In your context, most likely intended to differentiate kernel pointers from user space pointers (usually mapped via the MMU).

            Source https://stackoverflow.com/questions/63386788

            QUESTION

            What is the use of the argument num in this code?
            Asked 2020-Aug-02 at 06:41

            The "os161" operating system contains the following code. Specifically, where the syscalls are defined:

            ...

            ANSWER

            Answered 2020-Aug-02 at 06:41

            It is used for other tools to ease the maintenance of the source code.
            The following is a quote from Understanding System Calls

            syscalls.S: This file is created from syscalls-mips.S at compile time and is the actual file assembled into the C library. The actual names of the system calls are placed in this file using a script called callno-parse.sh that reads them from the kernel's header files. This avoids having to make a second list of the system calls. In a real system, typically each system call stub is placed in its own source file, to allow selectively linking them in. OS/161 puts them all together to simplify the makefiles. Adding new entries to callno.h automatically causes new user-level system call procedures to be defined when you re-build the user-level code. Each "SYSCALL(name,num)" macro statement in this file is expanded by the C pre-processor into a declaration of the appropriate system call function.

            kern/syscall.h most likely is produce by one of those tools.

            Source https://stackoverflow.com/questions/63212933

            QUESTION

            Incompatible pointer type warning in os161
            Asked 2020-Mar-13 at 23:31

            I am implementing a fork system call in os161 kernel. I am trying to create a new process and for its thread creation I used thread_fork. I am using the function md_forkentry to allocate heap and stack to the trapframe of the new thread and switch to user mode; but I get this warning after compiling the code: passing arg 4 of 'thread_fork' from incompatible pointer type

            ...

            ANSWER

            Answered 2020-Mar-13 at 23:31

            Your prototype for md_forkentry() does not match the type of the 4th parameter of thread_fork().

            md_forkentry() must be prototyped as:

            Source https://stackoverflow.com/questions/60678360

            QUESTION

            Makefile Errors - "***missing separator" & "***recipe commences before first target"
            Asked 2017-May-21 at 10:25

            I am trying to build the userland for os161. When I type make in the command line I get the following error:

            Makefile 24: ***missing separator (did you mean TAB instead of 8 spaces?). Stop.

            I checked the Makefile at line 24 and tried adding a TAB to the start of the line, but that didn't work as I then get another error:

            Makefile 24: ***recipe commences before first target. Stop.

            Here is the full makefile for reference:

            ...

            ANSWER

            Answered 2017-May-20 at 11:37

            A separator is a . Please do not use spaces at line begin in a Makefile, Makefile.in ...

            Snippet:

            Source https://stackoverflow.com/questions/44081364

            QUESTION

            Why is the pointer changing for no reason?
            Asked 2017-Jan-12 at 04:45

            I am working on Assignment 2 of ops-class.

            The following function bootstraps a file handler array for the process that is being created (eg. user processes for test programs provided here).

            ...

            ANSWER

            Answered 2017-Jan-12 at 04:45

            The code handle->fh_vnode is setting a pointer to automatic variable ("on the stack"), function parameters are automatic variables. After the function returns this will be a dangling pointer.

            To fix this you will need to re-design your code a bit, e.g. perhaps the struct fh should just store file and not a pointer to file.

            Source https://stackoverflow.com/questions/41560685

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install os161

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/ops-class/os161.git

          • CLI

            gh repo clone ops-class/os161

          • sshUrl

            git@github.com:ops-class/os161.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link