2
Chain loading From Wikipedia, the free encyclopedia Chain loading is a method used by computer programs to replace the currently executing program with a new program, using a common data area (a so-called core common area) to pass information from the current program to the new program. It occurs in several areas of computing. Chain loading is similar to the use of overlays. Like the use of overlays, the use of chain loading increases the I/O load of an application. Unlike overlays, however, chain loading replaces the currently executing program in its entirety. Overlays usually replace only a portion of the running program. Contents 1 Chain loading in boot manager programs 2 Chain loading in Unix 3 Chain loading in BASIC programs 4 References Chain loading in boot manager programs In operating system boot manager programs, chain loading is used to pass control from the boot manager to a boot sector. The target boot sector is loaded in from disk, replacing the in-memory boot sector from which the boot manager itself was bootstrapped, and executed. Chain loading in Unix In Unix (and in Unix-like operating systems), the exec() system call is used to perform chain loading. The program image of the current process is replaced with an entirely new image, and the current thread begins execution of that image. The common data area comprises data such as the process' environment variables, which are preserved across the system call. Chain loading in BASIC programs In BASIC programs, chain loading is the purview of the CHAIN statement (or, in Commodore BASIC, the LOAD statement), which causes the current program to be terminated and the chained-to program to be loaded and invoked (with, on those dialects of BASIC that support it, an optional parameter specifying the line number from which execution is to commence, rather than the default of the first line of the new program). The common data area varies according to the particular dialect of BASIC that is in use. On BBC BASIC, for example, only a specific subset of all variables are preserved across a CHAIN. On other BASICs, the COMMON statement can be used in conjunction with CHAIN to specify which variables are to be preserved as common data across a chain operation. Chain loading permits BASIC programs to execute more program code than could fit into available program and variable memory. Applications written in BASIC could thus be far larger than the size of working memory, via a set of cooperating programs that CHAIN back and forth amongst themselves as program flow moves within the overall application. References "chain loading" (http://www.gnu.org/software/grub/manual/html_node/Chain_002dloading.html). GNU GRUB manual. Página 1 de 2 Chain loading - Wikipedia, the free encyclopedia 08/06/2013 http://en.wikipedia.org/wiki/Chain_loading

Chain Loading (Operating System)

Embed Size (px)

DESCRIPTION

Chain Loading (Operating System)

Citation preview

Chain loadingFrom Wikipedia, the free encyclopediaChain loading is a method used by computer programs to replace the currently executing program with a new program, using a common data area (a so-called core common area) to pass information from the current program to the new program. It occurs in seeral areas of computing.!hain loading is similar to the use of oerlays. "ike the use of oerlays, the use of chain loading increases the I#$ load of an application. %nlike oerlays, howeer, chain loading replaces the currently executing program in its entirety. $erlays usually replace only a portion of the running program.Contents & !hain loading in boot manager programs ' !hain loading in %nix ( !hain loading in )*+I! programs , -eferencesChain loading in boot manager programs In operating system boot manager programs, chain loading is used to pass control from the boot manager to a boot sector. .he target boot sector is loaded in from disk, replacing the in-memory boot sector from which the boot manager itself was bootstrapped, and executed.Chain loading in Unix In %nix (and in %nix-like operating systems), the exec() system call is used to perform chain loading. .he program image of the current process is replaced with an entirely new image, and the current thread begins execution of that image. .he common data area comprises data such as the process/ enironment ariables, which are presered across the system call.Chain loading in BASIC programs In )*+I! programs, chain loading is the puriew of the CHAIN statement (or, in !ommodore )*+I!, the LOADstatement), which causes the current program to be terminated and the chained-to program to be loaded and inoked (with, on those dialects of )*+I! that support it, an optional parameter specifying the line number from which execution is to commence, rather than the default of the first line of the new program). .he common data area aries according to the particular dialect of )*+I! that is in use. $n ))! )*+I!, for example, only a specific subset of all ariables are presered across a !0*I1. $n other )*+I!s, the COMMON statement can be used in con2unction with CHAIN to specify which ariables are to be presered as common data across a chain operation.!hain loading permits )*+I! programs to execute more program code than could fit into aailable program and ariable memory. *pplications written in )*+I! could thus be far larger than the si3e of working memory, ia a set of cooperating programs that CHAIN back and forth amongst themseles as program flow moes within the oerall application.References 4chain loading4 (http5##www.gnu.org#software#grub#manual#html6node#!hain677'dloading.html). GNU GRUB manual.89gina & de ' !hain loading - Wikipedia, the free encyclopedia7:#7;#'7&( http5##en.wikipedia.org#wiki#!hain6loading Orlando Lee Stevenson (December 1985). "Commodore Program Chaining" (htt!""###.atarimaga$ines.com"com%te"iss%e&'"()1*1*Commodore*Program*Chaining.h). COMPUTE! (&')! 11). Chapter 7: Multiprogramming (htt!""###.+a,s.org"docs"art%"ch-'s-..html). "Sec%rit/ 0raers and 1ernstein Chaining". Taxonomy of Unix PC Metho!". in The #rt of Unix Programming.2etrieved +rom "htt!""en.#i3iedia.org"#"inde4.h5title6Chain*loading7oldid65-)-81.&&" Categories!Oerating s/stem technolog/ Process (com%ting) 8his age #as last modi+ied on .5 9%l/ .-1. at -8!1&. 8e4t is available %nder the Creative Commons :ttrib%tion;Share:li3e License< additional terms ma/ al/. 1/ %sing this site= /o% agree to the 8erms o+ >se and Privac/ Polic/. 0i3iedia? is a registered trademar3 o+ the 0i3imedia @o%ndation= Anc.= a non;ro+it organi$ation.PBgina . de . Chain loading ; 0i3iedia= the +ree enc/cloedia-8"-&".-1( htt!""en.#i3iedia.org"#i3i"Chain*loading