12 August, 2011
During this lecture, we will first go through some admin matters and answer the question: why should you learn OS? We will then briefly discuss what is an OS and its dual role as a programming interface and resource manager. Students will learn about the concepts of system calls, user mode/kernel mode, multi-programming, and time-sharing.
Download Slides: PDF
Reading:
- Section 1.1: Introduces what is an OS.
- Section 1.2, 1.3: History and Taxonomy of OS (FYI only).
- Section 1.4: Review of CS2100 (good to read to refresh your memory).
- Section 1.6 (till 1.6.1): How a system call is invoked — no details for now.
Related Wikipedia entries are listed below. These are for students who are keen to go beyond what is covered in CS2106. Read the articles with a critical mind since Wikipedia is editable by anyone.
Hi,
I was reading Section 1.6.1 and I saw Figure 1-18.
The figure says that it lists some of the major POSIX system calls. However, many of the calls are the same as you would make when writing a C program (eg., read(fd, buffer, nbytes)). Therefore, I was wondering if the figure actually shows the system calls or rather the library functions which in turn make the corresponding system calls.
I tried to investigate this issue on the web and Wikipedia (http://en.wikipedia.org/wiki/System_call) says – ‘It should be noted that the terms “system call” and “syscall” are often incorrectly used to refer to the aforementioned C standard library functions, particularly those that act as a wrapper to corresponding system calls with the same name.’
Is this what is happening here?
Thanks.
Hi Shubham,
I think the author of the textbook refers to a particular system call by the name of the corresponding procedure that invokes it. It is because the book is dealing with a specific system, i.e. POSIX. In fact, before moving to the sub-section 1.6.1, the author mentions that “In the following sections, we will examine some of the most heavily used POSIX system calls, or more specifically, the library procedures that make those system calls”.
@Shubham, Duy is right. Most of the time, there is a one-to-one mapping between a POSIX library function and a system call. We will see some cases where this is not true over the semester.
i remember there is a family of function calls called exec() that uses just one system call in the backend. i think they are exec(), execv() and execvp().
is this one example of a non-one-to-one mapping of POSIX function call to system call?
Hi Jie Shun,
I think you are correct.
http://git.kernel.org/?p=linux/kernel/git/stable/linux-3.0.y.git;a=blob;f=arch/x86/kernel/syscall_table_32.S;h=fbb0a045a1a23bc9bdc2f9dd23c6c9673e2e13f7;hb=HEAD
This is from the Linux kernel source tree. It’s basically the list of supported system calls for the x86 kernel. exec is numbered 11 (it’s at line 13). On Linux, there’s the execv* and execl* which really just differ in how arguments are being passed to the exec call (char *[] vs. variadic args). The exec*p variants take into account of PATH environment variable if I’m not wrong.
I love what you guys are up too. Such clever work and coverage!
Keep up the excellent works guys I’ve you guys to my blogroll.
I’m extremely impressed with your writing skills and also with the layout on your blog. Is this a paid theme or did you customize it yourself? Either way keep up the nice quality writing, it is rare to see a nice blog like this one these days.
Simply want to say your article is as amazing.
The clearness in your post is just great and i could assume you’re an expert on this subject. Fine with your permission allow me to grab your feed to keep updated with forthcoming post. Thanks a million and please carry on the gratifying work.
I’ve been surfing online more than 3 hours today, yet I never found any interesting article like yours. It’s pretty worth enough for me.
In my opinion, if all web owners and bloggers made good content as you did, the web will be a lot more useful than ever
before.
This post presents clear idea in favor of the new viewers of blogging, that really how to do running a blog.
Spot on with this write-up, I really believe this site needs far more attention.
I’ll probably be back again to see more, thanks for the info!
We’re a bunch of volunteers and starting a brand new scheme in our community. Your web site provided us with valuable information to work on. You have performed an impressive task and our entire group can be thankful to you.
This is the right blog for anybody who would like to understand this topic.
You understand so much its almost tough to argue with you (not that I actually will need to…HaHa).
You definitely put a brand new spin on a topic that’s been discussed for decades. Great stuff, just wonderful!
hi!,I love your writing so a lot! share we communicate extra about your post on AOL?
I need an expert in this house to solve my problem.
Maybe that’s you! Having a look forward to peer you.
Can I simply say what a relief to discover an individual who actually knows what they are discussing on the net.
You definitely understand how to bring an issue to light and make
it important. A lot more people need to check this out and understand this side of
your story. It’s surprising you are not more popular given that you surely have the gift.