主权项 |
1. A fast speed computer system power-on & power-off method, comprising the following steps:
when a computer system having a secondary storage with fast random access enters into a hibernation, said computer system partitions a main memory into a plurality of clean pages and a plurality of dirty pages, said clean pages are swapped out without I/O access, and said dirty pages are written into a hibernation file or stored in a swap space or stored in a file system of at least a second storage device which is a high speed random access nonvolatile memory device, when said computer system is re-activated, said computer system reads said hibernation file from said swap space and said file system, and restores and stores said hibernation file into said main memory; said computer system reads data from said second storage device through random access, and loads said data into said main memory; in said step of said computer system entering into said hibernation, said main memory is provided with a kernel function, and that is used to control swapping out of said pages, and after the completion of said pages swapping out release said main memory; and said kernel function is able to calculate a number of said clean pages and said dirty pages to be swapped out, and free said main memory based on said number of said clean pages and said dirty pages. |