Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!snorkelwacker!bloom-beacon!eru!luth!sunic!mcsun!hp4nl!phigate!prle!prles2!cst!meulenbr From: meulenbr@cst.philips.nl (Frans Meulenbroeks) Newsgroups: comp.os.minix Subject: Re: Reboot solved? Message-ID: Date: 12 Jul 90 07:07:34 GMT References: <24219@nigel.udel.EDU> Sender: news@prles2.prl.philips.nl Lines: 46 HBO043%DJUKFA11.BITNET@cunyvm.cuny.edu (Christoph van Wuellen) writes: >Oh, no! The real problem is the memory allocation in the systask. >There is a static variable been_here that gets Memory from a TOS variable. >When you reboot, the next request for memory fails. >On my mc68000 MINIX box, when I do CTRL-ALT-DEL, the boot message appears >and MINIX asks for inserting the Floppy containing the root file system. >Then, MM says: no memory left. >I have not tried, but a solution is to make been_here in this context >global and clear it on reboot. >Your solution simply was to have a root filesystem that is less than half >the memory size, so you can request the memory twice. >C.v.W. Umm. I don't think I completely understand this. This is maybe due to the fact that I did not see a previous article on which this should be a reply. I've written the beenhere stuff, long time ago, late in the evening. What happens is the following: when minix boots mm asks for the available memory to the systask. This is asked repeatedly until m_ptr->COUNT = 0; The reason mm asks, is because on PC's memory need not te be contiguous. On the ST we only have one chunk of memory, so the static var beenhere keeps track whether or not we got such a request. If not, I return the value of some TOS var (I believe phystop). If yes, we're done, so return count=0. Notice that the value of phystop is never changed by me! Now whenever I reboot, be it with CTRL-ALT-DEL, CTRL-ALT-SHIFT-DEL (tos 1.4 only), or pressing the reset key, the system reloads the operating system from disk and everything starts again fine. I've done this zillions of times, and I really don't understand the message before. I hope someone can explain this to me. I hope I gave an explanation which answers at least part of the question. regards, -- Frans Meulenbroeks (meulenbr@cst.philips.nl) Centre for Software Technology ( or try: ...!mcsun!phigate!prle!cst!meulenbr)