Την Δευ, 22-04-2002 στις 16:42, ο/η Javier Sedano έγραψε: > Harry Kalogirou wrote: > > > '> Yesterday I commited to the CVS some experimental swap support code, > > based on Alan's work on the subject. Ofcourse this code is not included > > in the default configuration and is not for _actual_ use, since as I > > said is experimental. Apart from that if you set the swap partition in > > malloc.c you and enable swapping you can enjoy an 8086 system use > > _virtual_ memory! > > > > Great! > > I've been looking for it in the code, and found nothing about it's > configuration (setting the partition and the size, activating it...)... > can someone (Harry, Alan) give us a few words about how to do so? I will focus on making it easily configurable at run time later along with documenting it a bit. Basicaly the code now is a 4 hour brain storm. To configure it you basicaly change this part of the code : holep = &swap_holes[0]; holep->flags = HOLE_FREE; holep->page_base = 0; holep->extent = 128; holep->refcount = 0; holep->next = NULL; swap_dev = 0x0100; The extent is the size in kilobytes and the swap_dev is the block device to swap to. In the example 0x0100 is /dev/ram0 > And by the way... can you write a technical description about how is it > done? The main problem with swap in minix was (is) that processes It's on my TODO list... > waiting for IO (waiting for a message from FS) can not be swapped in, > because they would meet a deadlock when trying to swap out (for FS is > needed again to do the swapping out, but it is frozen sending the > message to the process, because FS is not reentrant/concurrent in > minix)... and obviously processes waiting for IO are those best suited > to be swapped in. > As you might already noticed we don't use the FS layer, we only support swapping to a device at the momment. Once the think works we can add swapping to file easily. For the minix matter now - our FS is reentrant so we will have no problem... Harry