3 ms·
It's great to see resources like this popping up. When I was in school we used the Tanenbaum book, even if it was heavily skewed to his belief that microkernels
by jasonjei 13y ago
It's great to see resources like this popping up. When I was in school we used the Tanenbaum book, even if it was heavily skewed to his belief that microkernels were better (Torvalds and Tanenbaum fought in an epic flame war).
At the University of Arizona, we implemented in our class projects various stages of an operating system kernel, such as a process/thread scheduler, user/kernel mode functions, message passing (IPC/mailboxes), locking/semaphores/mutexes, signals, paged memory, and a file system in this upper division course. It wasn't as hard as a class like Automata, but it was tedious.
However, now that I am doing so much low level work, I can appreciate what we learned in class. In fact, it gives you a strong understanding how critical sections and locking work (and how this all ties in with the operating system). It makes you appreciate simple user mode delegate syscalls like fopen, fork, and malloc and realize that a bunch of things are happening in kernel mode. It makes you avoid naive design choices like while(true) loops and look for blocking/event-based equivalents.
So you might groan about taking an operating systems class. Don't! You might never ever work on operating systems, but you will be able to appreciate how to make the operating system work for you. Some self taught programmers I have met don't know the difference between blocking and non-blocking. If anything, operating systems will drill these concepts into your head to help you leverage operating systems for your benefit.
- aray 13y agoMIT has an open course on Operating systems[1]. It's the one reasource I keep going back to. The textbook for the class is available free online. I pull it out at least once a year. [1] http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-828-operating-system-engineering-fall-2006/ http://ocw.mit.edu/courses/electrical-engineering-and-comput...
- wting 13y agoMalloc is not a syscall.
- jasonjei 13y agoYou're right--if it can't find memory within the heap, it will invoke a call to brk and it will allocate it from the OS and thereby invoking a syscall. Apologies for my lumping of malloc as a syscall :)
- dcohenp 13y agoNeither is fopen, for that matter. Of course, many library functions end up doing syscalls underneath, which may be the source of the OP's confusion (e.g. malloc may do brk or mmap; fopen usually does open; etc.)