summaryrefslogtreecommitdiff
path: root/sys/kern/kern_exit.c
AgeCommit message (Collapse)Author
2000-11-16support kernel event queues, from FreeBSD by Jonathan Lemon,Niels Provos
okay art@, millert@
2000-06-06If the process is P_NOZOMBIE free it's resources in the reaper.Artur Grabowski
Noone will wait for it (because noone is allowed to wait for it).
2000-06-05No need to use curproc here. We already know who we are.Artur Grabowski
2000-06-05Changes to exit handling.Artur Grabowski
cpu_exit no longer frees the vmspace and u-area. This is now handled by a separate kernel thread "reaper". This is to avoid sleeping locks in the critical path of cpu_exit where we're not allowed to sleep. From NetBSD
2000-05-05Don't set filesize limit to infinity on exit.Artur Grabowski
This is only needed in accounting and has to be done carefully because the limit structures are shared between processes. Found by Denis A. Doroshenko, analysed by Hannah Schroeter.
2000-04-20Add a function "ktrsettracevnode", that changes the ktrace vnode for a processArtur Grabowski
in a correct way. Use it in all places where the vnode was changed. (most of the earlier code was incorrect and had races).
2000-03-23Use the new timeout facilities for ITIMER_REAL.Artur Grabowski
2000-02-21dead code and symbol pollution.Artur Grabowski
1999-08-15Adopt NetBSD fix for scheduler problems (nice was broken). From the NetBSDPaul Janzen
commit messages: Scheduler bug fixes and reorganization * fix the ancient nice(1) bug, where nice +20 processes incorrectly steal 10 - 20% of the CPU, (or even more depending on load average) * provide a new schedclock() mechanism at a new clock at schedhz, so high platform hz values don't cause nice +0 processes to look like they are niced * change the algorithm slightly, and reorganize the code a lot * fix percent-CPU calculation bugs, and eliminate some no-op code === nice bug === Correctly divide the scheduler queues between niced and compute-bound processes. The current nice weight of two (sort of, see `algorithm change' below) neatly divides the USRPRI queues in half; this should have been used to clip p_estcpu, instead of UCHAR_MAX. Besides being the wrong amount, clipping an unsigned char to UCHAR_MAX is a no-op, and it was done after decay_cpu() which can only _reduce_ the value. It has to be kept <= NICE_WEIGHT * PRIO_MAX - PPQ or processes can scheduler-penalize themselves onto the same queue as nice +20 processes. (Or even a higher one.) === New schedclock() mechanism === Some platforms should be cutting down stathz before hitting the scheduler, since the scheduler algorithm only works right in the vicinity of 64 Hz. Rather than prescale hz, then scale back and forth by 4 every time p_estcpu is touched (each occurance an abstraction violation), use p_estcpu without scaling and require schedhz to be generated directly at the right frequency. Use a default stathz (well, actually, profhz) / 4, so nothing changes unless a platform defines schedhz and a new clock. [ To do: Define these for alpha, where hz==1024, and nice was totally broke.] === Algorithm change === The nice value used to be added to the exponentially-decayed scheduler history value p_estcpu, in _addition_ to be incorporated directly (with greater weight) into the priority calculation. At first glance, it appears to be a pointless increase of 1/8 the nice effect (pri = p_estcpu/4 + nice*2), but it's actually at least 3x that because it will ramp up linearly but be decayed only exponentially, thus converging to an additional .75 nice for a loadaverage of one. I killed this: it makes the behavior hard to control, almost impossible to analyze, and the effect (~~nothing at for the first second, then somewhat increased niceness after three seconds or more, depending on load average) pointless. === Other bugs === hz -> profhz in the p_pctcpu = f(p_cpticks) calcuation. Collect scheduler functionality. Try to put each abstraction in just one place.
1999-07-15Don't destroy sysvshm if the vmspace is shared (only affects uvm)Artur Grabowski
1999-06-23Improved sysv shared memory. Works with UVM.Artur Grabowski
Original work done in FreeBSD, but this code was ported from NetBSD by Chuck Cranor.
1999-03-12in scheduler, bias parents for child cpu usage; ross@ghs.comTheo de Raadt
1999-03-02RFNOWAIT does not dissociate the child from its parent in any otherNiklas Hallqvist
way than that the parent wait call will never get the status of this child, says Rob
1999-02-26vm allocation changes for uvmArtur Grabowski
1999-01-11comment typoNiklas Hallqvist
1999-01-10Make RFNOWAIT work in rfork(2)Niklas Hallqvist
1997-11-06Updates for VFS Lite 2 + soft update.Constantine Sapuntzakis
1997-10-06back out vfs lite2 till after 2.2Theo de Raadt
1997-10-06VFS Lite2 ChangesConstantine Sapuntzakis
1997-09-15From FreeBSD (joerg@freebsd.org):Todd C. Miller
Implement SA_NOCLDWAIT by reparenting kids of processes that have the appropriate bit set to PID 1, and let PID 1 handle the zombie. This assumes that PID 1 will wait for its kids (which is true of init). This also includes some FreeBSD sigaction.2.
1996-10-26Verify that options to wait4() are legalThorsten Lockert
1996-08-15Clear p_pctcpu when a process exitThorsten Lockert
1996-05-02sync syscalls, no sys/cpu.hTheo de Raadt
1996-03-03From NetBSD: 960217 mergeNiklas Hallqvist
1995-12-30from netbsd:Theo de Raadt
Remove the process from zombproc and its parent's child list before freeing its resources.
1995-12-14from netbsd; limfree()Theo de Raadt
1995-11-22release text vnode before releasing credentials. vnode releasing canTheo de Raadt
block, but credentials should be alive until the process is really dead. from tegge@idt.unit.no; netbsd pr#1767
1995-10-18initial import of NetBSD treeTheo de Raadt