右眼皮一直跳什么预兆| 什么是木薯粉| 心机血缺血是什么症状| 老鼠最怕什么气味驱赶| 日昳是什么意思| 胁迫是什么意思| 有白带发黄是什么原因| 吃什么补白细胞最快| 生理期能吃什么水果| 1.4是什么星座| 汗斑是什么原因引起的| 做b超前需要注意什么| 为什么长火疖子| 阑尾炎什么症状| 性张力什么意思| 跑龙套是什么意思| 睡觉脚抽筋是什么原因引起的| 全虫是什么中药| 宫腔内高回声是什么意思| zbc什么意思| 右耳朵热代表什么意思| 花字五行属什么| 什么花是白色的| 腺肌症是什么病| vos是什么意思| 手指长倒刺是什么原因| 尿道炎吃什么| 明朝为什么会灭亡| 老是干咳什么原因| 7月14日什么星座| 孩子说话晚是什么原因是什么情况| 门神是什么意思| skr什么意思| 什么叫体制内| 女生下面出血但不是月经为什么| 小巫见大巫是什么意思| 旬空是什么意思| 什么什么生机| 腮腺炎是什么原因引起的| 恶心呕吐吃什么药| 什么鸡| 白肉是什么肉| 拿什么让你幸福| 男人精子少吃什么药| 高筋面粉和低筋面粉有什么区别| 荨麻疹可以吃什么水果| 甲亢看什么指标| 一览无余什么意思| 烽烟是什么意思| 胡萝卜与什么食物相克| 梅毒挂什么科| 白带发黄有异味用什么药| 七夕节干什么| 咽喉异物感吃什么药| 右边锁骨疼是什么原因| 幼儿园什么时候放暑假| 左手小指疼痛预兆什么| 山及念什么| 脂肪肝挂什么科| 头上两个旋代表什么| 绿色属于五行属什么| 7月7号是什么星座| 优雅是什么意思| 梦见老公穿新衣服是什么意思| 射手座女和什么星座最配| 上环后同房要注意什么| 人最重要的是什么| 69年属鸡是什么命| 尼维达手表什么档次| torch什么意思| 嘴臭是什么原因引起的| 慢心律又叫什么药| 一个木一个寿念什么| 乐色是什么意思| 浙江有什么特产| 粘假牙用什么胶| 西洋参有什么用| 复方对乙酰氨基酚片是什么药| 翻白草治什么病| 人绒毛膜促性腺激素是什么| 家有一老如有一宝是什么意思| 白带黄什么原因| 中国的四大发明是什么| 众叛亲离什么意思| 以什么为准| 什么的风采| 共济会是什么组织| 腰突挂什么科| 红米是什么米| 非典型腺细胞是什么意思| 什么是中药| crp高是什么意思| 腔梗和脑梗有什么区别| 医生为什么看瞳孔知道没救了| 意图是什么意思| 贵人是什么意思| 乳钉的作用是什么| π是什么意思| 朱元璋是什么民族| 南极被称为什么| 银手镯变黑是什么原因| 脂肪最怕什么| 警察代表什么生肖| lcc是什么意思| 叉烧肉是什么肉| 观音殿求什么| 蠓虫叮咬后涂什么药膏| 大米里放什么不生虫子| hcv阳性是什么意思| 甘薯是什么东西| 重庆什么时候解放的| 十月份是什么季节| 为什么掉头发很厉害| 山穷水尽疑无路是什么生肖| 胃主什么| 血糖高有什么症状| 常喝三七粉有什么好处| 滴滴什么意思网络用语| 什么是催眠| 4月1日什么星座| 梦见给别人剪头发是什么意思| 怀孕哭对宝宝有什么影响| 腿麻脚麻用什么药能治| 什么叫幽门螺旋杆菌| 马桶堵了用什么疏通| 什么头什么面| 梵天是什么意思| 女性下小腹痛挂什么科| 散瞳是什么意思| 不良反应是什么意思| 东北和山东有什么区别| 尿液茶色是什么原因| 空腹打嗝是什么原因引起的| 炎性增殖灶是什么意思| 什么的青蛙| 进仓是什么意思| 舌头白色是什么原因| 胰岛素高是什么意思| 器质性心脏病是什么意思| 脸上突然长斑是什么原因引起的| 脑梗塞用什么药效果好| 晚上8点是什么时辰| 淘米水洗脸有什么好处| 农村入党需要什么条件| 猪蛋是什么| 深圳副市长什么级别| 肝炎挂什么科| 授课是什么意思| 湿疹用什么药膏| 陶渊明世称什么| 手掌心发红是什么原因| 流局是什么意思| 端午节为什么吃粽子| 褒姒是什么意思| 熬夜吃什么水果好| 卸磨杀驴什么意思| 什么是结核病| 依然如故的故是什么意思| 吃辣拉肚子是什么原因| 桂圆不能和什么一起吃| 5个月宝宝吃什么辅食| 提刑官相当于现在什么官| 浅表性胃炎伴糜烂吃什么药效果好| 患难见真情的上一句是什么| 血沉高说明什么问题| 腺样体肥大是什么意思| 打完耳洞不能吃什么| 教师节应该送老师什么花| 处女座后面是什么星座| 爱吃甜食是什么原因| 什么是排卵期怎么计算| 出汗多吃什么好| 11.19是什么星座| 64年出生属什么| 逍遥丸的功效和作用是什么| 谷胱甘肽是什么| 时迁的绰号是什么| 常喝柠檬水有什么好处和坏处| 血常规血红蛋白偏高是什么原因| 为什么会长鸡眼| 黄疸高是什么原因引起的| 什么祛斑产品效果好| 上火便秘吃什么最快排便| 米诺地尔搽剂和米诺地尔酊有什么区别| 大连六院是什么医院| 2017年属什么| 4月8号什么星座| 无病呻吟是什么意思| da医学上是什么意思| 宝宝吐奶是什么原因| 男性乳头疼是什么原因| 一切有为法是什么意思| 办港澳通行证需要带什么| 财神位放什么最旺财| 弱水是什么意思| 好好好是什么语气| 契爷是什么意思| 酒干倘卖无什么意思| 利口酒是什么酒| 什么的柏树| 吃芒果有什么坏处| d2聚体高是什么原因| 夏祺是什么意思| 堂妹是什么关系| 束缚什么意思| 卷发适合什么脸型| 周到是什么意思| 牙痛用什么止痛| 神志不清是什么意思| 50岁女人出轨为了什么| 艾滋病潜伏期有什么症状| 虎的本命佛是什么佛| 满月打什么疫苗| 六十六大寿有什么讲究| 张紫妍为什么自杀| 什么驱蚊效果最好| 青椒炒什么好吃又简单| 什么牌子的辅酶q10好| 百里挑一是什么生肖| 水果皇后是什么水果| 海绵体供血不足吃什么药| air是什么牌子| 9月24日是什么星座| 大姨妈来了吃什么对身体好| 尾巴翘上天是什么意思| 做完胃肠镜后可以吃什么| 硫酸是什么| 流鼻血吃什么药效果好| 否命题和命题的否定有什么区别| 宝宝咳嗽挂什么科| 消炎药不能和什么一起吃| 换什么机油好| 太阳穴长痘痘什么原因| 荔枝有什么寓意| 孙策字什么| 片仔癀为什么这么贵| 春考是什么| 社科院是干什么的| 海蓝之谜适合什么肤质| 失去理智什么意思| 7月中旬是什么时候| 相对是什么意思| 阿胶不能和什么一起吃| 91年的属什么生肖| 脸上长痘痘是什么原因引起的| 打三个喷嚏代表什么| 张柏芝什么星座| 苦瓜不能跟什么一起吃| fu什么意思| 阳气不足吃什么中成药| 梦见好多死人是什么征兆| 血红蛋白什么意思| 60年属鼠是什么命| 胃疼吃什么药好得最快最有效| 收放自如是什么意思| 早期唐筛是检查什么| 穷是什么意思| 崩溃什么意思| 泰山石敢当什么意思| 庶母是什么意思| 悦人不如悦己什么意思| 91年的属什么生肖| 背痛是什么原因| 性功能障碍挂什么科| 百度

春天不排毒,整年身体堵!身体8个地方最易堵

(Redirected from Segmentation (memory))
百度 在此次拟收购美吉姆之前,三垒股份曾于2017年7月计划购买主营婴幼儿早期教育相关业务的北京睿优铭管理咨询有限公司51%的股权,但未能成功。

Memory segmentation is an operating system memory management technique of dividing a computer's primary memory into segments or sections. In a computer system using segmentation, a reference to a memory location includes a value that identifies a segment and an offset (memory location) within that segment. Segments or sections are also used in object files of compiled programs when they are linked together into a program image and when the image is loaded into memory.

Segments usually correspond to natural divisions of a program such as individual routines or data tables[1] so segmentation is generally more visible to the programmer than paging alone.[2] Segments may be created for program modules, or for classes of memory usage such as code segments and data segments.[3] Certain segments may be shared between programs.[1][2]

Segmentation was originally invented as a method by which system software could isolate software processes (tasks) and data they are using. It was intended to increase reliability of the systems running multiple processes simultaneously.[4]

Hardware implementation

edit

In a system using segmentation, computer memory addresses consist of a segment id and an offset within the segment.[3] A hardware memory management unit (MMU) is responsible for translating the segment and offset into a physical address, and for performing checks to make sure the translation can be done and that the reference to that segment and offset is permitted.

Each segment has a length and set of permissions (for example, read, write, execute) associated with it.[3] A process is only allowed to make a reference into a segment if the type of reference is allowed by the permissions, and if the offset within the segment is within the range specified by the length of the segment. Otherwise, a hardware exception such as a segmentation fault is raised.

Segments may also be used to implement virtual memory. In this case each segment has an associated flag indicating whether it is present in main memory or not. If a segment is accessed that is not present in main memory, an exception is raised, and the operating system will read the segment into memory from secondary storage.

Segmentation is one method of implementing memory protection.[5] Paging is another, and they can be combined. The size of a memory segment is generally not fixed and may be as small as a single byte.[6]

Segmentation has been implemented several ways on various hardware, with or without paging. Intel x86 memory segmentation does not fit either model and is discussed separately below, and also in greater detail in a separate article.

Segmentation without paging

edit

Associated with each segment is information that indicates where the segment is located in memory— the segment base. When a program references a memory location, the offset is added to the segment base to generate a physical memory address.

An implementation of virtual memory on a system using segmentation without paging requires that entire segments be swapped back and forth between main memory and secondary storage. When a segment is swapped in, the operating system has to allocate enough contiguous free memory to hold the entire segment. Often memory fragmentation results if there is not enough contiguous memory even though there may be enough in total.

Segmentation with paging

edit

Instead of a memory location, the segment information includes the address of a page table for the segment. When a program references a memory location the offset is translated to a memory address using the page table. A segment can be extended by allocating another memory page and adding it to the segment's page table.

An implementation of virtual memory on a system using segmentation with paging usually only moves individual pages back and forth between main memory and secondary storage, similar to a paged non-segmented system. Pages of the segment can be located anywhere in main memory and need not be contiguous. This usually results in a reduced amount of input/output between primary and secondary storage and reduced memory fragmentation.

History

edit

The Burroughs Corporation B5000 computer was one of the first to implement segmentation, and "perhaps the first commercial computer to provide virtual memory"[7] based on segmentation. The B5000 is equipped with a segment information table called the Program Reference Table (PRT) which is used to indicate whether the corresponding segment resides in the main memory, to maintain the base address and the size of the segment.[8] The later B6500 computer also implemented segmentation; a version of its architecture is still in use today on the Unisys ClearPath Libra servers.[citation needed]

The GE 645 computer, a modification of the GE-635 with segmentation and paging support added, was designed in 1964 to support Multics.

The Intel iAPX 432,[9] begun in 1975, attempted to implement a true segmented architecture with memory protection on a microprocessor.

The 960MX version of the Intel i960 processors supported load and store instructions with the source or destination being an "access descriptor" for an object, and an offset into the object, with the access descriptor being in a 32-bit register and with the offset computed from a base offset in the next register and from an additional offset and, optionally, an index register specified in the instruction. An access descriptor contains permission bits and a 26-bit object index; the object index is an index into a table of object descriptors, giving an object type, an object length, and a physical address for the object's data, a page table for the object, or the top-level page table for a two-level page table for the object, depending on the object type.[10]

Prime, Stratus, Apollo, IBM System/38, and IBM AS/400 (including IBM i) computers use memory segmentation.

Examples

edit

Burroughs introduced segmentation on the B5000, followed by the compatible B5500 and B5700.

The later B6500 replaced the Program Reference Table (PRT) with a Saguaro stack, changed control word formats, changed descriptor formats and changed the mechanism for referring to a control word or descriptor.

B5000, B5500 and B5700

edit

Words in the B5000, B5500 and B5700 are 48 bits long.[11] Descriptors have the uppermost bit set in the word. They reside in either the Program Reference Table (PRT) or the stack, and contain a presence bit indicating whether the data are present in memory. There are distinct data and program descriptors.[11]:?4-2–4-4?

B6500, B7500 and successors

edit

Words in the B6500 and its successors have 48 bits of data and 3 tag bits.[12]:?2-1? The tag bits indicate the type of data contained in the word; there are several descriptor types, indicated by different tag bit values.[12]:?6-5–6-10? Control words and descriptors reside in the Saguaro stack. Array segments may be paged.

The line includes the B6500, B6700, B7700, B6800, B6900, B5900, the A-series Burroughs and Unisys machines, and the current Clearpath MCP systems (Libra). While there have been a few enhancements over the years, particularly hardware advances, the architecture has changed little. The segmentation scheme has remained the same, see Segmented memory.

Multics architectures

edit

S/370 architecture

edit

In the IBM System/370 models[a] with virtual storage[13][14] (DAT) and 24-bit addresses, control register 0 specifies a segment size of either 64 KiB or 1 MiB and a page size of either 2 KiB or 4 KiB; control register 1 contains a Segment Table Designator (STD), which specifies the length and real address of the segment table. Each segment table entry contains a page table location, a page table length and an invalid bit. IBM later expanded the address size to 31 bits and added two bits to the segment table entries:

Segment-protection bit
Segment is read-only
Common-segment bit
The segment is shared between address spaces; this bit is set to optimize TLB use

Each of IBM's DAT implementations includes a translation cache, which IBM called a Translation Lookaside Buffer (TLB). While Principles of Operation discusses the TLB in general terms, the details are not part of the architecture and vary from model to model.

Starting with the 3031, 3032, and 3033 processor complexes, IBM offered a feature called Dual-address Space[14]:?5-13–5-17,?Dual-Address-Space Control?:?5-17–5-20,?DAS Authorization Mechanisms?:?5-21–5-24,?PC-Number Translation?[15] (DAS), which allows a program to switch between the translation tables for two address spaces, referred to as primary address space (CR1) and secondary address space (CR7), and to move data between the address spaces subject to protection key. DAS supports a translation table to convert a 16-bit address space number (ASN) to an STD, with privileged instructions to load the STD into CR1 (primary) or CR7 (secondary).

x86 architecture

edit

Early x86 processors, beginning with the Intel 8086, provide crude memory segmentation and no memory protection. (Every byte of every segment is always available to any program.) The 16-bit segment registers allow for 65,536 segments; each segment begins at a fixed offset equal to 16 times the segment number; the segment starting address granularity is 16 bytes. Each segment grants read-write access to 64 KiB (65,536 bytes) of address space (this limit is set by the 16-bit PC and SP registers; the processor does no bounds checking). Offset+address exceeding 0xFFFFF wraps around to 0x00000. Each 64 KiB segment overlaps the next 4,095 segments; each physical address can be denoted by 4,096 segment–offset pairs. This scheme can address only 1 MiB (1024 KiB) of physical memory (and memory-mapped i/o). (Optional expanded memory hardware can add bank-switched memory under software control.) Intel retroactively named the sole operating mode of these x86 CPU models "real mode".

The Intel 80286 and later processors add "286 protected mode", which retains 16-bit addressing, and adds segmentation (without paging) and per-segment memory protection. For backward compatibility, all x86 CPUs start up in "real mode", with the same fixed overlapping 64 KiB segments, no memory protection, only 1 MiB physical address space, and some subtle differences (high memory area, unreal mode). In order to use its full 24-bit (16 MiB) physical address space and advanced MMU features, an 80286 or later processor must be switched into "protected mode" by software, usually the operating system or a DOS extender. If a program does not use the segment registers, or only puts values into them that it receives from the operating system, then identical code can run in real mode or protected mode, but most real-mode software computes new values for the segment registers, breaking this compatibility.

The Intel i386 and later processors add "386 protected mode", which uses 32-bit addressing, retains segmentation, and adds memory paging. In these processors, the segment table, rather than pointing to a page table for the segment, contains the segment address in linear memory. When paging is enabled, addresses in linear memory are then mapped to physical addresses using a separate page table. Most operating systems did not use the segmentation capability, opting to keep the base address in all segment registers equal to 0 at all times and provide per-page memory protection and swapping using only paging. Some use the CS register to provide executable space protection on processors lacking the NX bit or use the FS or GS registers to access thread-local storage.[16][17]

The x86-64 architecture does not support segmentation in "long mode" (64-bit mode).[18] Four of the segment registers: CS, SS, DS, and ES are forced to 0, and the limit to 264. The segment registers FS and GS can still have a nonzero base address. This allows operating systems to use these segments for special purposes such as thread-local storage.[16][17]

See also

edit

Notes

edit
  1. ^ Models 115, 125, 135, 138, 145, 148, 155 II, 158, 165 II, and 168

References

edit
  1. ^ a b Holt, Anatol W. (1961). "Program Organization and Record Keeping for Dynamic Storage Allocation". Communications of the ACM. 4 (10): 422–431. doi:10.1145/366786.366795. S2CID 18973700.
  2. ^ a b Englander, Irv (2003). The architecture of computer hardware and systems software (3rd ed.). Wiley. ISBN 0-471-07325-3.
  3. ^ a b c Glaser, Edward L.; Couleur, John F.; Oliver, G. A. (1965). System Design of a Computer for Time Sharing Applications. 1965 Fall Joint Computer Conference.
  4. ^ "1.2 Memory Management". AMD64 Technology AMD64 Architecture Programmer's Manual Volume 2: System Programming (PDF). Vol. 2. Advanced Micro Devices. 2018. p. 5.
  5. ^ Arpaci-Dusseau, Remzi H.; Arpaci-Dusseau, Andrea C. (2014). "Segmentation" (PDF). Operating Systems: Three Easy Pieces. Arpaci-Dusseau Books.
  6. ^ Intel 64 and IA-32 Architectures Software Developer's Manual Volume 3 (3A, 3B & 3C): System Programming Guide (PDF). Intel Corporation. 2012. pp. 3–13.
  7. ^ Mayer, Alastair J. W. "The Architecture of the Burroughs B5000 - 20 Years Later and Still Ahead of the Times?". Retrieved 2025-08-06.
  8. ^ Hayes, John P. (1978). Computer Architecture and Organization. McGraw-Hill. p. 371. ISBN 0-07-027363-4.
  9. ^ Introduction to the IAPX 432 Architecture (PDF). Intel Corporation. 1981. p. 78.
  10. ^ BiiN CPU Architecture Reference Manual (PDF). BiiN. July 1998.
  11. ^ a b The Operational Characteristic of the Processors for the Burroughs B 5000 (PDF) (A ed.), Detroit: Burroughs, 1962, 5000-21005A
  12. ^ a b B6500 Information Processing Systems Reference Manual (PDF). Burroughs. September 1969.
  13. ^ "Dynamic Address Translation" (PDF). IBM System/370 Principles of Operation (PDF). Systems (Fourth ed.). IBM. September 1974. pp. 57–68. GA22-7000-4.
  14. ^ a b "Dynamic Address Translation". IBM System/370 Principles of Operation (Eleventh ed.). IBM. September 1987. pp. 3-20 – 3-38. GA22-7000-10.
  15. ^ "Address spaces" (PDF). IBM System/370 Extended Architecture Principles of Operation (PDF) (Second ed.). IBM. January 1987. pp. 3-13 – 3-14. SA22-7085-1.
  16. ^ a b Matt Pietrek (May 2006). "Everything You Need To Know To Start Programming 64-Bit Windows Systems". Microsoft. Retrieved 2025-08-06.
  17. ^ a b Drepper, Ulrich (2025-08-06). "ELF Handling For Thread-Local Storage" (PDF).
  18. ^ AMD64 Technology AMD64 Architecture Programmer's Manual Volume 2: System Programming (PDF). Vol. 2. Advanced Micro Devices. 2018.
edit
6月14日什么星座 吃什么降血脂最快最好 鄂尔多斯为什么叫鬼城 孩子吃什么有助于长高 泌尿外科主要检查什么
塔克是什么食物 总是口渴是什么原因 什么叫蜘蛛痣 什么是肠梗阻 碘伏遇到什么会变白
七月有什么节 扒灰是什么意思 11.20是什么星座 邪魅一笑是什么意思 心力衰竭是什么症状
什么叫包皮过长 山根有痣代表什么 糟卤对身体有什么危害 隔空打牛是什么意思 水落石出是什么生肖
梦见老虎是什么意思0297y7.com 变蛋吃多了有什么好处和坏处hcv9jop2ns6r.cn usc是什么意思hcv8jop9ns6r.cn 跳脱是什么意思hcv9jop7ns9r.cn 为什么一吃饭就胃疼hcv9jop1ns4r.cn
蝙蝠粪便是什么中药hcv8jop3ns9r.cn 梦见洗车是什么意思hcv9jop6ns4r.cn 指甲长的快是什么原因hcv9jop7ns3r.cn 女男是什么字hcv8jop1ns7r.cn 龟头炎用什么软膏最好hcv8jop7ns9r.cn
tfcc是什么hcv7jop9ns7r.cn 培坤丸有什么作用功效hcv9jop5ns6r.cn 兔儿爷是什么意思hcv7jop5ns0r.cn 属牛的生什么属相的孩子好wzqsfys.com 值机是什么hcv8jop7ns3r.cn
溢于言表是什么意思hcv8jop4ns3r.cn 什么面料不容易皱inbungee.com 香菜不能和什么一起吃bfb118.com 怀孕两个星期有什么反应hcv9jop3ns5r.cn 睡觉小腿抽筋是什么原因hcv9jop0ns3r.cn
百度