From owner-freebsd-hackers Wed Jun 19 7:15:53 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by hub.freebsd.org (Postfix) with ESMTP id 80EDF37B403 for ; Wed, 19 Jun 2002 07:15:47 -0700 (PDT) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) (authenticated bits=0) by srv1.cosmo-project.de (8.12.3/8.12.3) with ESMTP id g5JECiSc050070 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 19 Jun 2002 16:12:49 +0200 (CEST) (envelope-from ticso@cicely5.cicely.de) Received: from cicely5.cicely.de (localhost [IPv6:::1]) by cicely5.cicely.de (8.12.1/8.12.1) with ESMTP id g5JECgFJ009177 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 19 Jun 2002 16:12:42 +0200 (CEST)?g (envelope-from ticso@cicely5.cicely.de) Received: (from ticso@localhost) by cicely5.cicely.de (8.12.1/8.12.1/Submit) id g5JECgI7009176; Wed, 19 Jun 2002 16:12:42 +0200 (CEST)?g (envelope-from ticso) Date: Wed, 19 Jun 2002 16:12:41 +0200 From: Bernd Walter To: Andrey Simonenko Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Is it possible to store process state and then restore process Message-ID: <20020619141241.GO43253@cicely5.cicely.de> Reply-To: ticso@cicely.de References: <006401c21793$30721750$6d36120a@pm5149> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <006401c21793$30721750$6d36120a@pm5149> User-Agent: Mutt/1.3.99i X-Operating-System: FreeBSD cicely5.cicely.de 5.0-CURRENT i386 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Jun 19, 2002 at 04:14:05PM +0300, Andrey Simonenko wrote: > Hello FreeBSD developers, > > I have one principal question. > > Suppose there is a process, let this process doesn't have any > childs, open sockets, it has one thread, etc. But this process > can malloc() memory, open local files. Let's take very simple case. > > Is it possible to store process state to the file (i.e. say > somehow the kernel to do this), and then after rebooting restore > from the file this process back to system and continue executing it? > > I understand that it is not very simple, but I want to know if it is > possible. Are there any problem with memory addressetion? > > Some years ago I implemented the same thing under MS-DOS, so > in general I understand the way what it should look like, and I > successfuly stored process state and restored this process in MS-DOS > to continue very long calculations on slow PC (this wasn't my software, > so I could't patch it to store results in temporary file). Of course it is > impossible to compare how I did it for MS-DOS and how it can be > done on FreeBSD. Some programms dump theirself into an obj file after initialization. If you hold global resources such as filehandles, shared memory you should know how they are used to make restoring them easier. The kernel has no support to help you here. -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message