Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
System call
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Processor mode and context switching == System calls in most [[Unix-like]] systems are processed in [[kernel mode]], which is accomplished by changing the processor execution mode to a more privileged one, but no ''process'' [[context switch]] is necessary{{snd}} although a ''privilege'' context switch does occur. The hardware sees the world in terms of the execution mode according to the processor [[status register]], and processes are an abstraction provided by the operating system. A system call does not generally require a context switch to another process; instead, it is processed in the context of whichever process invoked it.<ref name="Bach1986pp15-16">Bach, Maurice J. (1986), ''The Design of the UNIX Operating System'', Prentice Hall, pp. 15β16.</ref><ref>{{cite web |url=http://www.progclub.org/pipermail/list/2011-October/000150.html |title=Discussion of system call implementation at ProgClub including quote from Bach 1986 |year=2011<!-- 1 October --> |first=John |last=Elliot |access-date=1 October 2011 |archive-date=24 July 2012 |archive-url=https://web.archive.org/web/20120724153438/https://www.progclub.org/pipermail/list/2011-October/000150.html |url-status=dead }}</ref> In a [[Multithreading (computer architecture)|multithreaded]] process, system calls can be made from multiple [[Thread (computing)|threads]]. The handling of such calls is dependent on the design of the specific operating system kernel and the application runtime environment. The following list shows typical models followed by operating systems:<ref>{{cite web |url=http://www.cs.uic.edu/~jbell/CourseNotes/OperatingSystems/4_Threads.html |title=Threads}}</ref><ref>{{cite web |url=http://kevinmarquet.net/wp-content/uploads/threading.pdf |title=Threading Models}}</ref> * ''Many-to-one'' model: All system calls from any user thread in a process are handled by a single kernel-level thread. This model has a serious drawback{{snd}} any blocking system call (like awaiting input from the user) can freeze all the other threads. Also, since only one thread can access the kernel at a time, this model cannot utilize multiple cores of processors. * ''One-to-one'' model: Every user thread gets attached to a distinct kernel-level thread during a system call. This model solves the above problem of blocking system calls. It is found in all major [[Linux distribution]]s, [[macOS]], [[iOS]], recent [[Microsoft Windows|Windows]] and [[Solaris (operating system)|Solaris]] versions. * ''Many-to-many'' model: In this model, a pool of user threads is mapped to a pool of kernel threads. All system calls from a user thread pool are handled by the threads in their corresponding kernel [[thread pool]]. * ''Hybrid'' model: This model implements both many-to-many and one-to-one models depending upon the choice made by the kernel. This is found in old versions of [[IRIX]], [[HP-UX]] and [[Solaris (operating system)|Solaris]].
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
System call
(section)
Add topic