Housekeeping (computing)
Encyclopedia
In computer programming
Computer programming
Computer programming is the process of designing, writing, testing, debugging, and maintaining the source code of computer programs. This source code is written in one or more programming languages. The purpose of programming is to create a program that performs specific operations or exhibits a...

, housekeeping can refer either to a standard entry or exit routine appended to a user written block of code (such as a subroutine
Subroutine
In computer science, a subroutine is a portion of code within a larger program that performs a specific task and is relatively independent of the remaining code....

 or function, sometimes known as a function prologue and epilogue
Function prologue
In assembly language programming, the function prologue is a few lines of code at the beginning of a function, which prepare the stack and registers for use within the function...

) at its entry and exit or, alternatively, to any other automated or manual software process whereby a computer is cleaned-up after usage (e.g. freeing resources such as virtual memory
Virtual memory
In computing, virtual memory is a memory management technique developed for multitasking kernels. This technique virtualizes a computer architecture's various forms of computer data storage , allowing a program to be designed as though there is only one kind of memory, "virtual" memory, which...

). This might include such activities as removing or archiving logs that the system has made as a result of the users activities, or deletion of temporary files which may otherwise simply take up space. Housekeeping can be described as a necessary chore, required to perform a particular computers normal activity but not necessarily part of the algorithm. For cleaning up computer disk storage
Disk storage
Disk storage or disc storage is a general category of storage mechanisms, in which data are digitally recorded by various electronic, magnetic, optical, or mechanical methods on a surface layer deposited of one or more planar, round and rotating disks...

, utility software usually exists for this purpose such as data compression
Data compression
In computer science and information theory, data compression, source coding or bit-rate reduction is the process of encoding information using fewer bits than the original representation would use....

 software - to "shrink" files and release disk space, defragmentation
Defragmentation
In the maintenance of file systems, defragmentation is a process that reduces the amount of fragmentation. It does this by physically organizing the contents of the mass storage device used to store files into the smallest number of contiguous regions . It also attempts to create larger regions of...

 programs - to improve disk performance.

Examples

Housekeeping could include (but is not limited to) the following activities:
  • Saving and restoring program state
    Program state
    One of the key concepts in computer programming is the idea of state, essentially a snapshot of the measure of various conditions in the system. Most programming languages require a considerable amount of state information in order to operate properly - information which is generally hidden from...

     for called functions (including general purpose registers and return address)
  • Obtaining local memory on the stack
    Stack (data structure)
    In computer science, a stack is a last in, first out abstract data type and linear data structure. A stack can have any abstract data type as an element, but is characterized by only three fundamental operations: push, pop and stack top. The push operation adds a new item to the top of the stack,...

  • Initializing local variables at the start of a program or function
  • Freeing local memory on the stack
    Stack (data structure)
    In computer science, a stack is a last in, first out abstract data type and linear data structure. A stack can have any abstract data type as an element, but is characterized by only three fundamental operations: push, pop and stack top. The push operation adds a new item to the top of the stack,...

     on exit from a function
  • Garbage collection
    Garbage collection (computer science)
    In computer science, garbage collection is a form of automatic memory management. The garbage collector, or just collector, attempts to reclaim garbage, or memory occupied by objects that are no longer in use by the program...

  • data conversion
    Data conversion
    Data conversion is the conversion of computer data from one format to another. Throughout a computer environment, data is encoded in a variety of ways. For example, computer hardware is built on the basis of certain standards, which requires that data contains, for example, parity bit checks....

  • Backup
    Backup
    In information technology, a backup or the process of backing up is making copies of data which may be used to restore the original after a data loss event. The verb form is back up in two words, whereas the noun is backup....

     and/or removal of un-needed files and software
  • Execution of Disk maintenance utilities (e.g. ScanDisk
    SCANDISK
    SCANDISK or ScanDisk is a utility in MS-DOS and Microsoft Windows systems which checks and repairs file systems and bad clusters on the hard drive. It was introduced in MS-DOS version 6.2...

    , Harddrive Defragmenters, Virus
    Virus
    A virus is a small infectious agent that can replicate only inside the living cells of organisms. Viruses infect all types of organisms, from animals and plants to bacteria and archaea...

    Scanner)
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK