喝什么茶减肥效果最好| 办离婚需要什么手续和证件| 睫角守宫吃什么| 四维彩超主要检查什么| 本科属于什么学位| 大德是什么意思| 肠胀气是什么原因引起的怎么解决| 吃什么长胎不长肉| 06年是什么年| 没有什么了不起| 朗姆酒是什么酒| 左肩膀疼是什么原因| 一什么知什么成语| 玄米是什么米| 什么不| 男人洁身自好什么意思| 灵枢是什么意思| 吃豌豆有什么好处| 二氧化硅是什么氧化物| 百家姓第一个姓是什么| 起诉离婚需要什么材料| 金蝉脱壳比喻什么| 戊肝是什么病| 来姨妈喝什么比较好| 洋葱有什么功效| 10月20日什么星座| 什么是血压| 骨折长骨痂有什么反应| 吃什么会拉肚子| 霄字五行属什么| 牙齿黑是什么原因| 吃什么降糖| 河蚌吃什么食物| 朱砂属于五行属什么| 经常口腔溃疡吃什么维生素| 粉饼和散粉有什么区别| 用牙膏洗脸有什么好处和坏处| 孕妇适合吃什么鱼| 男性hpv挂什么科| 老汉推车是什么意思| 素鸡是什么| 12月20日是什么星座| 蜂蜜芥末酱是什么味道| 肺与什么相表里| 麻蛇是什么蛇| 孩子老是流鼻血是什么原因| 全科医生是什么意思| 男士感染霉菌用什么药| lac是什么意思| 宫外孕和宫内孕有什么区别| 青蒜炒什么好吃| 脂溢性皮炎用什么药膏| 甲状腺手术后有什么后遗症| 不让看朋友圈显示什么| 毒龙什么意思| 胆固醇为什么会高| 手足口疫苗叫什么名字| 中蛊的人有什么症状| 四级军士长是什么级别| 常温保存是什么意思| 白癜风的症状是什么| 正月十九是什么日子| 经常胃疼是什么原因| 冷喷机喷脸有什么好处| 青梅竹马什么意思| 三点水山今读什么| 世界上最多笔画的字是什么字| 98年一月属什么生肖| 胃气上逆吃什么中成药| 发烧反反复复是什么原因| 石榴花什么时候开花| 快递什么时候停运| 胃热吃什么药最有效| 风湿性心脏病吃什么药| 缪斯是什么意思| 眼白发青是什么原因| 痛风吃什么水果最好| 小孩吃鼻屎是什么原因| 抨击是什么意思| 世袭罔替是什么意思| 耳朵大代表什么| 甲胎蛋白偏高说明什么| 荔枝是什么季节的水果| 什么汤| tvb为什么演员都走了| 大鱼际发青是什么原因| 急得很什么| 吃什么清理血管| 小虾吃什么| 吃完虾不能吃什么水果| 女大十八变是什么意思| 1989年出生是什么命| 预祝是什么意思| 迷糊是什么原因| 半月板是什么意思| s 是什么意思| 奖励是什么意思| 茹是什么意思| 动脉抽血是做什么检查| eicu是什么意思| 依西美坦最佳服用时间是什么时间| 过氧化氢是什么意思| 经常打嗝是什么原因| 渴望是什么意思| 李子树苗什么品种好| 小孩喉咙发炎吃什么药好| 碳14呼气试验阳性是什么意思| 特效药是什么意思| 煎中药用什么锅| dsa是什么| 月经粉红色是什么原因| 鳞状上皮炎症反应性改变是什么意思| 张良和刘邦是什么关系| rj是什么意思| 蚊子的天敌是什么| 脚趾起水泡是什么原因| 今年是什么生肖年| 谷维素片治什么病| 飞代表什么生肖| 求租是什么意思| 白球比低是什么原因| 肚子左边是什么器官| 中宫是什么意思| 十1是什么意思| 乳糖不耐受是什么原因导致的| 胃窦黄斑瘤是什么病| 靶向治疗是什么| 打嗝是什么原因引起的| 脑梗是什么症状| 感染是什么意思| 天生一对是什么意思| 人尽可夫是什么意思| 因果关系是什么意思| 输钾为什么会痛| 吃什么油对心脑血管好| 上课什么坐姿可以瘦腿| 基础代谢率是什么意思| 智商135是什么水平| 眼角红肿用什么药| 官杀混杂是什么意思| 低筋面粉可以用什么代替| 宝宝尿少是什么原因| 蛊是什么意思| 双相是什么意思| 立秋日有什么禁忌| 井柏然原名叫什么| 乙肝表面抗体定量偏高什么意思| 1969年是什么年| 脸上掉皮是什么原因| 腿有淤青是什么原因| 零点是什么| 肝郁化火吃什么药| 老夫聊发少年狂什么意思| 潜能是什么意思| 书五行属性是什么| abc是什么药| 老妹是什么意思| 托帕石是什么宝石| 泌乳素是什么意思| 偏头疼挂什么科室| 咽喉炎吃什么水果好| 荷花是什么生肖| 蔻驰和古驰有什么区别| 4月10日什么星座| 梦见猪下崽预兆什么| 生殖器疱疹吃什么药| 泌尿科看什么病| 看近视眼挂什么科| 安陵容为什么恨甄嬛| pku是什么意思| 鸡配什么生肖最好| 荷叶加什么减肥最快| 二次元文化是什么意思| 格格不入什么意思| 撕漫男是什么意思| 为什么老是放屁| 家财万贯是什么生肖| 上学是为了什么| 手脚发热是什么原因| 甲醛闻多了有什么症状| 为什么小鸟站在电线上不会触电| 肋骨中间是什么器官| 2月18日是什么星座| 一日之计在于晨是什么生肖| 打嗝吃什么中成药| 红色加紫色是什么颜色| 守宫砂是什么| 二十年是什么婚| 乐趣是什么意思| 晚生是什么意思| 投影仪什么牌子好| 免冠是什么意思| 形态各异的异是什么意思| 智齿什么时候拔合适| 四大发明是什么| 发髻是什么意思| 多巴胺分泌是什么意思| 手上为什么长湿疹| 为什么会打呼噜| 肝斑一般在脸上的什么地方| 嘴唇不红润是什么原因| 痛经是什么意思| 苏轼是什么派诗人| 什么的落日| 孕妇适合吃什么| 怀孕血压高对胎儿有什么影响| 狮子长什么样| 香榧是什么东西| 短发适合什么脸型| 一个雨一个散念什么| 红颜知己代表什么关系| 褶皱是什么意思| 北顶娘娘庙求什么灵验| 一个木一个西读什么| 左侧附件区囊性占位是什么意思| 脑梗是什么| 鱼跃龙门是什么意思| 姑婆的儿子叫什么| 起风疹的原因是什么引起的| 农历闰月有什么规律| 什么原因造成高血压| 顶针什么意思| 三色堇的花语是什么| 武则天属什么生肖| 挺尸 是什么意思| 用牛奶敷脸有什么好处和坏处| 法脉是什么意思| 埋线是什么意思| 龟龟是什么意思| 梦见打碎碗是什么预兆| 神经病吃什么药效果好| 吃什么补维生素| 梦见明星是什么预兆| 乳腺结节3类什么意思| 金童玉女是什么意思| 张良和刘邦是什么关系| 左眼皮一直跳是什么意思| 哈工大全称是什么| 升米恩斗米仇什么意思| 肠化生是什么症状| 尿维生素c阳性是什么意思| 毕生是什么意思| 祖字五行属什么| 真空什么意思| 什么水解酒| 细胞是什么| 肉包子打狗的歇后语是什么| 图号是什么| 肚脐眼上方是什么器官| 女人味是什么| 为什么有钱人不去植发| 毛脚女婿是什么意思| 眼红是什么意思| 养胃吃什么| 相位是什么意思| 囧途什么意思| 结核抗体弱阳性什么意思| 大学有什么专业适合女生| 甘油三酯高有什么危害| 抗衡是什么意思| 尿急吃什么药效果最好| 什么是酵素| 罡什么意思| 泰山石敢当是什么意思| 百度Jump to content

From Wikipedia, the free encyclopedia
(Redirected from Software update system)
百度 《人民日报海外版》(2018年03月23日第11版)责编:王亚男

A patch is data for modifying an existing software resource such as a program or a file, often to fix bugs and security vulnerabilities.[1][2] Patch is also the process of applying the data to the existing resource. Patching a system involves applying a patch. A patch may be created to improve functionality, usability, or performance. A patch may be created manually, but commonly it is created via a tool that compares two versions of the resource and generates data that can be used to transform one to the other.

Typically, a patch needs to be applied to the specific version of the resource it is intended to modify, although there are exceptions. Some patching tools can detect the version of the existing resource and apply the appropriate patch, even if it supports multiple versions. As more patches are released, their cumulative size can grow significantly, sometimes exceeding the size of the resource itself. To manage this, the number of supported versions may be limited, or a complete copy of the resource might be provided instead.

Patching allows for modifying a binary executable. Although this can be technically challenging (requires a thorough understanding of the workings of the executable), it may be feasible when the source code is unavailable to build a full executable, and it allows for a smaller distribution which can be more economical than distributing full files.

Although often intended to fix problems, a patch can introduce new problems. In some cases, an update intentionally disables functionality, for instance, by removing aspects for which the consumer is no longer licensed. Patch management is a part of lifecycle management, and involves a strategy and planning of what patches should be applied to which systems and at what times. Typically, a patch is applied in a permanent way (i.e. to storage), but in some cases, a patch is applied to memory (i.e. via a tool such as a debugger) in which case the change is lost when the resource is reloaded from storage.

Software update is sometimes conflated with patch even though they are not synonyms. An update can be implemented using patch files and the patching process. Also, some may contend that patching is not limited to modifying file content; that adding, removing and replacing whole files is patching. Typically, patch connotates a relatively small change, so a patch that is large in size or scope may be called the more general software update or another more specific name such as service pack. Windows NT and its successors (including Windows 2000, Windows XP, Windows Vista and Windows 7) use service pack.[3] Historically, IBM used the terms FixPak and Corrective Service Diskette for such updates.[4]

History

[edit]
A program tape for the 1944 Harvard Mark I, one of the first digital computers. Note physical patches used to correct punched holes by covering them.

Historically, software suppliers distributed patches on paper tape or on punched cards, expecting the recipient to cut out the indicated part of the original tape (or deck), and patch in (hence the name) the replacement segment. Later patch distributions used magnetic tape. Then, after the invention of removable disk drives, patches came from the software developer via a disk or, later, CD-ROM via mail. With widely available Internet access, downloading patches from the developer's web site or through automated software updates became often available to the end-users. Starting with Apple's Mac OS 9 and Microsoft's Windows ME, PC operating systems gained the ability to get automatic software updates via the Internet.

Computer programs can often coordinate patches to update a target program. Automation simplifies the end-user's task – they need only to execute an update program, whereupon that program makes sure that updating the target takes place completely and correctly. Service packs for Microsoft Windows NT and its successors and for many commercial software products adopt such automated strategies.

Some programs can update themselves via the Internet with very little or no intervention on the part of users. The maintenance of server software and of operating systems often takes place in this manner. In situations where system administrators control a number of computers, this sort of automation helps to maintain consistency. The application of security patches commonly occurs in this manner.

With the advent of larger storage media and higher Internet bandwidth, it became common to replace entire files (or even all of a program's files) rather than modifying existing files, especially for smaller programs.

Use

[edit]

Binary patching

[edit]

Patches for proprietary software are typically distributed as executable files instead of source code. When executed these files load a program into memory which manages the installation of the patch code into the target program(s) on disk.

Patches for other software are typically distributed as data files containing the patch code. These are read by a patch utility program which performs the installation. This utility modifies the target program's executable file—the program's machine code—typically by overwriting its bytes with bytes representing the new patch code. If the new code will fit in the space (number of bytes) occupied by the old code, it may be put in place by overwriting directly over the old code. This is called an inline patch. If the new code is bigger than the old code, the patch utility will append load record(s) containing the new code to the object file of the target program being patched. When the patched program is run, execution is directed to the new code with branch instructions (jumps or calls) patched over the place in the old code where the new code is needed. On early 8-bit microcomputers, for example the Radio Shack TRS-80, the operating system includes a PATCH/CMD utility which accepts patch data from a text file and applies the fixes to the target program's executable binary file(s).

The patch code must have place(s) in memory to be executed at runtime. Inline patches are no difficulty, but when additional memory space is needed the programmer must improvise. Naturally if the patch programmer is the one who first created the code to be patched, this is easier. Savvy programmers plan in advance for this need by reserving memory for later expansion, left unused when producing their final iteration. Other programmers not involved with the original implementation, seeking to incorporate changes at a later time, must find or make space for any additional bytes needed. The most fortunate possible circumstance for this is when the routine to be patched is a distinct module. In this case the patch programmer need merely adjust the pointers or length indicators that signal to other system components the space occupied by the module; he is then free to populate this memory space with his expanded patch code. If the routine to be patched does not exist as a distinct memory module, the programmer must find ways to shrink the routine to make enough room for the expanded patch code. Typical tactics include shortening code by finding more efficient sequences of instructions (or by redesigning with more efficient algorithms), compacting message strings and other data areas, externalizing program functions to mass storage (such as disk overlays), or removal of program features deemed less important than the changes to be installed with the patch.

Small in-memory machine code patches can be manually applied with the system debug utility, such as CP/M's DDT or MS-DOS's DEBUG debuggers. Programmers working in interpreted BASIC often used the POKE command to alter the functionality of a system service routine or the interpreter itself.

Source code patching

[edit]

A patch for source code defines how to modify the text of code files. Such a patch is usually a text file that encodes the differences between two versions of a file. As this type of patch is often created via the diff command, the patch file is also a diff file.

Source code patching is common for a open-source software project. Maintainers receive patches or people publish patches that fix problems and add functionality; like support for local languages outside the project's locale. In an example from the early development of the Linux kernel (noted for publishing its complete source code), Linus Torvalds, the original author, received hundreds of thousands of patches from many programmers to apply against his original version.

The Apache HTTP Server originally evolved as a number of patches that Brian Behlendorf collated to improve NCSA HTTPd, hence a name that implies that it is a collection of patches ("a patchy server"). The FAQ on the project's official site states that the name 'Apache' was chosen from respect for the Native American Indian tribe of Apache. However, the 'a patchy server' explanation was initially given on the project's website.[5]

See also

[edit]

References

[edit]
  1. ^ "Microsoft issues biggest software patch on record". Reuters. 2025-08-06. Archived from the original on 16 October 2009. Retrieved 14 October 2009.
  2. ^ "What is a Bug Fix? – Definition from Techopedia". techopedia.com. Archived from the original on 2025-08-06. Retrieved 2025-08-06.
  3. ^ "Service Pack and Update Center". windows.microsoft.com. Archived from the original on 2025-08-06. Retrieved 2025-08-06.
  4. ^ "Glossary of terms". www.tavi.co.uk. Archived from the original on 2025-08-06. Retrieved 2025-08-06.
  5. ^ "Apache HTTP Server Project". 15 June 1997. Archived from the original on 15 June 1997.{{cite web}}: CS1 maint: bot: original URL status unknown (link)
[edit]
湿气重会有什么症状 闭合性跌打损伤是什么意思 采阴补阳是什么意思 尿酸ua偏高是什么意思 皮质醇是什么意思
琪五行属什么 什么叫人彘 中药一般什么时候喝最好 现在是什么星座 梦到挖坟墓是什么意思
什么叫生理需求 vb是什么意思 七七年属什么生肖 tpc是什么意思 NT是什么钱
梦见亲人去世是什么意思 霸屏是什么意思 蛔虫是什么意思 什么叫网红 癫痫是什么病
讲解是什么意思hcv7jop6ns1r.cn 不动明王是什么意思hcv9jop3ns9r.cn 一什么饭hcv8jop7ns5r.cn 孕妇什么时候吃dha效果比较好hcv8jop1ns2r.cn 心悸心慌焦虑吃什么药能缓解hcv8jop4ns6r.cn
什么是老赖hcv8jop2ns4r.cn 小二阳是什么意思hcv8jop8ns5r.cn 头晕四肢无力是什么原因hcv8jop9ns7r.cn 蒲公英和什么相克致死hcv8jop1ns7r.cn 激素吃多了对身体有什么副作用hcv8jop0ns7r.cn
新疆是什么民族travellingsim.com 足三里在什么位置图片hanqikai.com 68属什么生肖hcv9jop1ns5r.cn 缺点是什么意思hcv8jop2ns1r.cn 西洋参有什么作用96micro.com
新生儿前面头发稀少是什么原因hcv9jop8ns3r.cn 手淫过度有什么症状hcv8jop7ns2r.cn 智能手环是干什么用的hcv8jop6ns3r.cn 儿童牙龈肿痛吃什么药hcv9jop1ns3r.cn 什么食物对眼睛视力好hcv9jop7ns1r.cn
百度