Commit graph

96 commits

Author SHA1 Message Date
Ben Gras
eae250dea4 . load average calculation changed to calculate it all over every tick
instead of keeping a running total of enqueued processes
   (because somehow the load average was broken)
 . added SI_KPROC_TAB to get a copy of kernel process table from PM, for
   a top implementation
 . fixed arg to sys_nice() to make it an endpoint, not a slot number
2006-03-16 09:33:35 +00:00
Ben Gras
557d865b35 Removed some debug prints 2006-03-15 15:16:16 +00:00
Philip Homburg
454dc8a180 Disabled special processing of KILL signals that are passed to pm by the kernel 2006-03-15 11:35:53 +00:00
Philip Homburg
57ed4b2bf7 Pass endpoint to sys_trace instead of slot number. 2006-03-15 11:32:00 +00:00
Ben Gras
1a7f7d6333 at_wini: removed RO_BIT misfeature, not used any more
pm: fixed rebooting by making a copy of the monitor code from the user
    process. this is necessary because that process is dead by the time
    sys_abort() is called.

    also added more info to the "can't reply" panic.
2006-03-13 13:21:13 +00:00
Ben Gras
cd8905f906 Don't need this change with new reboot 2006-03-13 10:36:52 +00:00
Ben Gras
9b1d4ef233 special case when exiting FS - don't core dump and don't tell FS about it
Because if FS is hanging in a signal, the exit won't work.
This way FS gets exited on e.g. SIGSEGV.
2006-03-10 17:35:55 +00:00
Ben Gras
c236121692 Let reboot work again by making PM check for RBT_REBOOT 2006-03-10 16:50:27 +00:00
Jorrit Herder
021e3234d8 Jorrit's ... "progress?" 2006-03-10 16:10:05 +00:00
Ben Gras
925dd3321f Don't blindly skip 0-group processes in signals 2006-03-08 14:46:42 +00:00
Ben Gras
b31d93aaa4 Comment fixes mailed to bugs@ 2006-03-04 22:51:52 +00:00
Ben Gras
b103bf5dc7 Fix of endpointless slot message in FS
Removed some leftover '#if 0'ed debug code in PM
2006-03-03 10:25:28 +00:00
Ben Gras
7967177710 endpoint-aware conversion of servers.
'who', indicating caller number in pm and fs and some other servers, has
been removed in favour of 'who_e' (endpoint) and 'who_p' (proc nr.).

In both PM and FS, isokendpt() convert endpoints to process slot
numbers, returning OK if it was a valid and consistent endpoint number.
okendpt() does the same but panic()s if it doesn't succeed. (In PM,
this is pm_isok..)

pm and fs keep their own records of process endpoints in their proc tables,
which are needed to make kernel calls about those processes.

message field names have changed.

fs drivers are endpoints.

fs now doesn't try to get out of driver deadlock, as the protocol isn't
supposed to let that happen any more. (A warning is printed if ELOCKED
is detected though.)

fproc[].fp_task (indicating which driver the process is suspended on)
became an int.

PM and FS now get endpoint numbers of initial boot processes from the
kernel. These happen to be the same as the old proc numbers, to let
user processes reach them with the old numbers, but FS and PM don't know
that. All new processes after INIT, even after the generation number
wraps around, get endpoint numbers with generation 1 and higher, so
the first instances of the boot processes are the only processes ever
to have endpoint numbers in the old proc number range.

More return code checks of sys_* functions have been added.

IS has become endpoint-aware. Ditched the 'text' and 'data' fields
in the kernel dump (which show locations, not sizes, so aren't terribly
useful) in favour of the endpoint number. Proc number is still visible.

Some other dumps (e.g. dmap, rs) show endpoint numbers now too which got
the formatting changed.

PM reading segments using rw_seg() has changed - it uses other fields
in the message now instead of encoding the segment and process number and
fd in the fd field. For that it uses _read_pm() and _write_pm() which to
_taskcall()s directly in pm/misc.c.

PM now sys_exit()s itself on panic(), instead of sys_abort().

RS also talks in endpoints instead of process numbers.
2006-03-03 10:20:58 +00:00
Ben Gras
040cebcefe Don't kill processes by signals in process group 0, and do a sync before
killing all processes in FS reboot.
2006-02-03 15:21:00 +00:00
Ben Gras
bcb67841a5 Give init process group 1. 2006-02-03 14:54:20 +00:00
Philip Homburg
8aa8552e95 Added SIGCONT to the list of signal that are to be ignored by default. 2006-01-30 16:27:49 +00:00
Ben Gras
50b06261b6 Implementation of truncate(), ftruncate() and the F_FREESP fcntl().
Implemented by changing write_map to accept a WMAP_FREE flag. In that
case, it doesn't update the datablock (creating indirect zones as
necessary) pointer, but it frees the datablock if present. Also it
frees the single and double indirect blocks if unused.

This makes the implementation of truncate_inode() simpler.
truncate_inode() now accepts a truncation length which makes
implementing truncate() and ftruncate() simple.

This also allowed implementing the F_FREESP fcntl().
2006-01-11 17:14:51 +00:00
Ben Gras
6a911b5284 Merge of minix-vmd symlink code.
. new_node() now returns inode of parent dir as argument that
	  has to be put_node()d again by the caller of new_node().
	  it can also return the name of the last component as last_dir()
	  did.
	. advance() takes a pointer to a pointer of an inode as the
	  parent now. This parent can change, in which case the old
	  one is put_node()d and a new one is put there.
	. eat_path() replaced by more flexible parse_path()
	. last_dir() replaced by call to parse_path().
	. do_slink(), do_readlink(), do_lstat() and slink_traverse() added.

Also added some truncate()/ftruncate()-introduction related changes.
(e.g. renamed truncate() to truncate_inode().)
2005-12-20 14:23:44 +00:00
Ben Gras
f6e5052597 seteuid() and setegid() 2005-12-13 09:48:29 +00:00
Ben Gras
2f23951221 SIGSTOP can't be masked (report by Jaap Weel). 2005-12-12 13:11:22 +00:00
Ben Gras
87f2236ad2 load average measurement implementation, accessable through
getloadavg() system call in the library.
2005-11-14 15:50:46 +00:00
Ben Gras
7104974cb5 Optionalize memory and vm verbose prints 2005-10-21 19:37:31 +00:00
Ben Gras
629453fba8 Added explanation of SIGKILL, REBOOT order. 2005-10-21 11:10:16 +00:00
Ben Gras
5333d4f4e4 . don't kill tty, send it messages on signals
. kill processes first, then tell fs to reboot (otherwise fs will have
  exited its processes and be confused when they exit again)
2005-10-21 11:07:33 +00:00
Ben Gras
4bae163d37 High watermark memory usage feature 2005-10-18 17:21:11 +00:00
Ben Gras
b1ca4d2d42 Check for ZOMBIE flag with findproc 2005-10-17 13:20:07 +00:00
Ben Gras
abd0b53e0a PM: added possibility to copy hole list from alloc.c to outside, for
misc.c to copy it away by getsysinfo
IS: prints out hole list + stats such as largest contiguous chunk
2005-10-13 12:48:43 +00:00
Jorrit Herder
5a9dec8bd2 New signal handling behaviour at PM (services can be killed).
New Shift-F6 dump for RS server at IS.
New getnpid, getnproc, getpproc library calls at PM.
New reincarnation server (basic functionality is there now).
2005-10-12 15:07:38 +00:00
Ben Gras
8c4166ee85 Add SIGWINCH signal and functionality in tty and support in PM. 2005-10-03 12:03:57 +00:00
Philip Homburg
42e1dad99c Hack to provide kernel with space for page table. 2005-09-30 12:56:00 +00:00
Ben Gras
231488dd1c Al's patch 2005-09-23 20:46:17 +00:00
Ben Gras
42fbd9aced Andy's formatting changes. 2005-09-11 16:45:46 +00:00
Ben Gras
c1de7758b7 Jorrit's fixes after reviewing Al's PM chapter 2005-09-01 10:16:07 +00:00
Ben Gras
911ff6a873 Formatting fixes for the book 2005-08-29 16:47:18 +00:00
Jorrit Herder
46c8884e36 Cleanup with gcc. Removed unused variables.
Fixed some uninitialized problems.
2005-08-25 12:05:09 +00:00
Jorrit Herder
7bf400a709 *** empty log message *** 2005-08-23 11:31:32 +00:00
Ben Gras
d11b2e4b8c Al's double-blank-line removal request 2005-08-22 15:23:47 +00:00
Jorrit Herder
872687ddfc Scheduling updates to the kernel. Sched() function now is single point for
policy. Actual policy not yet implemented.

PM calculates nice values for processes in boot image.

IS debug dumps improved (Shift+F1-F4).
2005-08-22 15:14:11 +00:00
Ben Gras
f4402bd129 Al's patch of fri 19 aug 2005 2005-08-22 12:54:11 +00:00
Ben Gras
b4d4450d2d Al's patch sent mon 15 aug. 2005-08-16 11:37:33 +00:00
Jorrit Herder
79ade04187 Put boot device memory initialization with #ifdef ENABLE_BOOTDEV ... #endif 2005-08-10 09:45:49 +00:00
Jorrit Herder
ab732a37e8 Renamed mm_exit to pm_exit (requested by Al)
Small cleanup in pm_init.
2005-08-10 09:37:54 +00:00
Ben Gras
5d2588aedf Al's patch sent Fri aug 5 2005-08-05 16:56:02 +00:00
Jorrit Herder
e396496d8c Fixed small bug in alarm code.
Kernel timer count was not reset after expiry.
2005-08-05 16:46:27 +00:00
Ben Gras
abb7157175 Merged do_gettimeofday with do_time to save one function call;
adjusted table.c accordingly
2005-08-05 12:44:06 +00:00
Jorrit Herder
7e74927cdc Cleanup of PM. 2005-08-05 10:45:54 +00:00
Jorrit Herder
8d66f755c3 Fixed type.
Added patch from Al Woodhull.
2005-08-04 22:01:50 +00:00
Jorrit Herder
74711a3b14 Check if kernel calls is allowed (from process' call mask) added. Not yet
enforced. If a call is denied, this will be kprinted. Please report any such
errors, so that I can adjust the mask before returning errors instead of
warnings.

Wrote CMOS driver. All CMOS code from FS has been removed. Currently the
driver only supports get time calls. Set time is left out as an exercise
for the book readers ... startup scripts were updated because the CMOS driver
is needed early on. (IS got same treatment.) Don't forget to run MAKEDEV cmos
in /dev/, otherwise the driver cannot be loaded.
2005-08-04 19:23:03 +00:00
Jorrit Herder
3f28baac83 Disabled comments from FXP driver with #define VERBOSE 0.
Fixed all troubles reported at shutdown.
No more illegal FS calls by dead processes.
2005-08-03 16:58:22 +00:00
Jorrit Herder
89cf745fe2 Single boot driver loaded, while multiple can be included in the boot image.
The user needs to set label=... to choose the driver of his or her choice.
This driver will be mapped onto the controller that is set in controller=...

Minor cleanup of kernel source code (boot image table now is static).
2005-08-03 16:06:35 +00:00