What is a Lisp image? -


Actually, I would like to know what the LisP image is? Is it a lisps interpreter and a piece of memory with one or more programs or what?

Lisp image as a left memory

The image is usually a file, it is a dump of memory of a Lisp system. It includes all functions of Lisp System (often compiled for machine code), Variable value, symbols etc. This is a snapshot of the ongoing Lisp.

To create an image, a Lisp starts, uses it for a while and then crashes an image (name of the function to rely on implementation) .

Use of a Lisp image

The next time someone restarts Lisp, then she can use a strong image and return a state Can come where the first one was. When dumping the image, it can also tell Lisp what to do when the discarded picture begins. In this way, anybody can connect to the server again, open the file again, etc.

To start such a lisp system, one needs a kernel and an image. Sometimes Lisp can put one file in both, so that an executable file has both the kernel (with some runtime functionality) and image data.

A Lisp Machine (on a computer, a Lisp operating system running) can load a boot loader (FEP, Front End Processor) image (called 'World') in memory And then start this image. There is no kernel in this case and the computer running on it is the Lisp image, which includes all the functionality (interpreter, compiler, memory management, GC, network stack, driver, ...). Actually it has an OS in a file.

Some Lisp systems will optimize memory before dumping the image. They can store a garbage, order objects in memory, etc.

Why use images?

Why would an image be used? It saves time to load things, and can give a user a lisp system pre-configured with application code and data. Normal Lisp implementation with a saved image is usually faster - some milliseconds on the current computer.

Since Lisp image can have many functionality (a compiler, even a development environment, very debugging information, ...) it usually has several megabytes in size.

It is very rare to use images in Lisp, which does the Smalltalk system. For example, Squeak also uses Smalltalk code and image of data and a runtime executable. There is a practical difference: most current Lisp systems use compiled machine codes. Thus the image is not portable between different processor architectures (x86, x86-64, SPARC, power, ARM, ...) or operating system.

History

Such lisp pictures have been in use for a long time. For example, in the BBN Lisp from 1967, the function SYSOUT has created such an image. SYSIN Such image will be read in the beginning.

Examples of work to save images

For an example, see the manual.


Comments