Other than malloc/free does a program need the OS to provide anything else?

后端 未结 7 2047
逝去的感伤
逝去的感伤 2021-02-02 02:34

I\'m working on designing the kernel (which I\'m going to actually call the \"core\" just to be different, but its basically the same) for an OS I\'m working on. The specifics o

7条回答
  •  青春惊慌失措
    2021-02-02 03:23

    Compulsory reading: Knuth - Art of Computer Programming, Volume 1, Chapter 2, Section 2.5. Otherwise, you could read Kernighan & Ritchie "The C Programming Language" to see an implementation; or, you could read Plauger "The Standard C Library" to see another implementation.

    I believe that what you need to do inside your core will be somewhat different from what the programs outside the core see. In particular, the in-core memory allocation for programs will be dealing with virtual memory, etc, whereas the programs outside the code simply see the results of what the core has provided.

提交回复
热议问题