- 2
- 0
- 约5.56万字
- 约 125页
- 2018-06-24 发布于四川
- 举报
现代作业系统核心
CE6130 現代作業系統核心 Modern Operating System Kernels 許 富 皓 C Preprocessor: Stringification When a macro parameter is used with a leading #, the preprocessor replaces it with the literal text of the actual argument, converted to a string constant. Unlike normal parameter replacement, the argument is not macro-expanded first. This is called stringification. #define WARN_IF(EXP) \ do { if (EXP) \ fprintf (stderr, Warning: #EXP \n); } \ while (0) =============================================== WARN_IF (x == 0); == do { if (x == 0) fprintf (stderr, Warning: x == 0 \n); } while (0); Multiple Kernel Mode Stacks If the size of the thread_union structure is 8KB, the kernel mode stack of the current process is used for every type of kernel control path: exceptions, interrupts, and deferrable functions. If the size of the thread_union structure is 4KB, the kernel makes use of three types of kernel mode stacks. Exception Stack The exception stack is used when handling exceptions (including system calls). This is the stack contained in the per-process thread_union data structure, thus the kernel makes use of a different exception stack for each process in the system. Hard IRQ Stack The hard IRQ stack is used when handling interrupts. There is one hard IRQ stack for each CPU in the system, and each stack is contained in a single page frame. In a multiprocessor system, all hard IRQ stacks are contained in the hardirq_stack array. Structure of Hard IRQ Stack static char hardirq_stack[NR_CPUS * THREAD_SIZE] __attribute__((__aligned__(THREAD_SIZE))); Soft IRQ Stack The soft IRQ stack is used when handling deferrable functions (softirqs or tasklets). There is one soft IRQ stack for each CPU in the system, and each stack is contained in a single page frame. All soft IRQ stacks are contained in the softirq_stack array. Structure of Soft IRQ Stack static char softirq_stack[NR_CPUS * THREAD_SIZE] __attribute__((__aligned__(THREAD_SIZE))); Layou
您可能关注的文档
- 沈阳双城双创少先队入队仪式ppt_天文地理_自然科学_专业资料.ppt
- 沉淀滴定法(标液、应用与实例)-例题课件.ppt
- 沃尔玛之差异化战略.ppt.ppt
- 沉淀滴定法-Mohr法-Volhard法-滴定曲线-【沉淀滴定全集.ppt
- 沪江小学资源网_白公鹅.ppt
- 法国号四三拍课件_教学反思汇报_教学研究_教育专区.ppt
- 法学专业本科课程- 20 第二十章:罪刑各论概述.ppt
- 波士顿咨询中国的网络数字2.0一代.ppt
- 波士顿咨询-品牌管理初步研究.ppt
- 波士顿咨询的BCG矩阵.ppt
- 七年级语文上册期末模拟试卷1(解析版).docx
- 七年级语文上册期末模拟试卷1(原卷版).docx
- 七年级语文上册期末模拟试卷2(原卷版).docx
- 七年级语文上册期末模拟试卷2(解析版).docx
- 期末测试卷(二)(解析版)2024—2025学年七年级语文上册期末测试卷(全国版).docx
- 期末测试卷(三)(解析版)2024—2025学年七年级语文上册期末测试卷(全国版).docx
- 期末测试卷(二)(原卷版)2024—2025学年七年级语文上册期末测试卷(全国版).docx
- 期末测试卷(三)(原卷版)2024—2025学年七年级语文上册期末测试卷(全国版).docx
- 期末测试卷(一)(原卷版)2024—2025学年七年级语文上册期末测试卷(全国版).docx
- 期末测试卷(一)(解析版)2024—2025学年七年级语文上册期末测试卷(全国版).docx
最近下载
- 壳牌可耐压(Omala)S2G220.PDF VIP
- 东易日盛装饰公司标准化服务对策研究.doc VIP
- 光纤覆盖工程施工安全管理及风险控制方案.docx VIP
- 江苏省南京市五校联盟2024-2025学年高二上学期1月期末考试 数学 含解析.docx VIP
- 欧伟士智能电暖器 Pro2500 Pro3000 说明书.pdf
- 2020—2021人教物理必修一第4章 牛顿运动定律习题及答案.doc VIP
- 2023版中国近现代史纲要第一章 第一节鸦片战争前后的中国与世界.pptx
- PDPS培训教程_原创精品文档.pptx VIP
- 2021 年全国一级建造师考试执业资格考试法规-白金卷.docx VIP
- 光纤覆盖工程施工安全管理及风险控制方案 .pdf VIP
原创力文档

文档评论(0)