Date: Wed, 4 Jul 2001 20:37:11 -0700 (PDT) From: Manas Bhatt <bhatt_manas@yahoo.com> To: freebsd-questions@FreeBSD.ORG Subject: how a context switch happens FreeBSD Message-ID: <20010705033711.6522.qmail@web10702.mail.yahoo.com>
next in thread | raw e-mail | index | archive | help
hi all, I am still hazy about the operation of a context switch in FreeBSD or as a matter of fact any unices like OS(even after reading relevant books). My questions are the following :-- 1. In all timesharing OS, there is a fixed time slice allocated to each process. When the time expires and the process hasn't finished execution , a context switch happens. Now while the process is executing it receives a interrupt, "the time remains the same as it was before the interrupt happened and after the handling of interrupt OR the time reduces ie. it includes the time required for handling the interrupt". 2. System calls are executed in kernel mode , which AFAIK can't be context switched because the kernel data structures would then be in an inconsistent state. But i have seen while writing network programs that read,write and accept system calls being context switched. How is the consistency of kernel data structures maintained?? anyhow actual code digging would be of great help. only directions are required. thanks manas __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010705033711.6522.qmail>