《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 3 Process Concepts & Operations(part2)from Kernel's Perspective

OperatingSystemsCh3 - Process Operations-fromkernel'sperspective
Operating Systems Ch3 - Process Operations -from kernel’s perspective

Processin MemoryUserspaceGlobalDynamically-variableallocatedCode+memoryconstantsLocal一variableInvoking systemProcesscalls. E.g., fork(),exec*(), wait().AccessProcessprocess'structureKernel codeinternal(PCB)with systemcallsKernelSpace2
Global variable Local variable Dynamicallyallocated memory Code + constants Process structure (PCB) Kernel code with system calls 2 Process in Memory Kernel Space User space Process Invoking system calls. E.g., fork(), exec*(), wait(). Access process’ internal

Kernel-space vs User-spaceSystemMemoryUser-spacememoryKernel-spacememory3
Kernel-space VS User-space 3 System Memory Kernel-space memory User-space memory

Kernel-space vs User-spaceSystemMemoryKernel-space memoryUser-space memoryUser-spacememoryStoringwhatAccessedby whomKernel-spacememorya
Kernel-space VS User-space 4 System Memory Kernel-space memory User-space memory Kernel-space memory User-space memory Storing what Accessed by whom

Kernel-space vs User-spaceSystemMemoryKernel-space memoryUser-spacememoryUser-spacememoryProcess'memoryKernel data structureStoringKernel codeProgram code of thewhatDevice driversprocessAccessedby whomKernel-spacememory5
Kernel-space VS User-space 5 System Memory Kernel-space memory User-space memory Kernel-space memory User-space memory Storing what Kernel data structure Kernel code Device drivers Process’ memory Program code of the process Accessed by whom

Kernel-space vs User-spaceSystemMemoryKernel-spacememoryUser-space memoryUser-spacememoryProcess'memory.Kerneldata structureStoringKernel codeProgram code of thewhatDevicedriversprocessAccessedUserprogramcode+Kernelcodeby whomkernelcodeKernel-spacememoryThekernel isinvincible!6
Kernel-space VS User-space 6 System Memory Kernel-space memory User-space memory Kernel-space memory User-space memory Storing what Kernel data structure Kernel code Device drivers Process’ memory. Program code of the process Accessed by whom Kernel code User program code + kernel code The kernel is invincible!

Process is going back and forth..Aprocesswill switchitsexecutionSystemMemoryfrom user space to kernel spaceUser-space.How?memory-throughinvokingsystemcallKernel-spacememory
Process is going back and forth. • A process will switch its execution from user space to kernel space • How? – through invoking system call 7 System Memory Kernel-space memory User-space memory

Process is going back and forth..ExampleSystemMemory- Say, the CPU is running a programcode of a processUser-spacememory-Where is the code?.User-spacememory.Recall theprocess structure in memory-Whereshouldtheprogram counterpoint to?(intel)Core"i7Kernel-spacememoryProgramcounter8
Process is going back and forth. • Example – Say, the CPU is running a program code of a process – Where is the code? • User-space memory • Recall the process structure in memory – Where should the program counter point to? 8 System Memory Kernel-space memory User-space memory Program counter

Process is going back and forth..What happens...SystemMemory- When the process is calling the system call"getpid()"User-spacememoryWhere toget the PID- PCB (in kernel-space memory)The CPU switches from the user-space tothe kernel-space, and reads the PiD日(intelCore"i7Kernel-spacememoryProgramcounter9
Process is going back and forth. • What happens. – When the process is calling the system call “getpid()” • Where to get the PID – PCB (in kernel-space memory) • The CPU switches from the user-space to the kernel-space, and reads the PID 9 System Memory Kernel-space memory User-space memory Program counter

Process is going back and forth..: After finished executing getpid()System Memory-Whathappens?User-space-CPU switches back to theuser-spacememorymemory, and continues running thatprogram code日CintelCore"i7Kernel-spacememoryProgramcounter10
Process is going back and forth. • After finished executing getpid() – What happens? – CPU switches back to the user-space memory, and continues running that program code 10 System Memory Kernel-space memory User-space memory Program counter
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 3 Process Concepts & Operations(part1).pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 2 Operating System Structures.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 1 Overview of an Operating System.pdf
- 《计算机网络》课程教学资源(PPT课件)第六章 应用层.pptx
- 《计算机网络》课程教学资源(PPT课件)第五章 传输层.pptx
- 《计算机网络》课程教学资源(PPT课件)第四章 网络层.pptx
- 《计算机网络》课程教学资源(PPT课件)第三章 数据链路层.pptx
- 《计算机网络》课程教学资源(PPT课件)第二章 物理层.pptx
- 《计算机网络》课程教学资源(PPT课件)第一章 概述.pptx
- 《智能算法设计与应用》课程教学大纲 Intelligent Algorithm Design and Application.docx
- 《数字导航技术》课程教学资源(书籍文献)计算机视觉-马颂德.pdf
- 《C语言程序设计》课程参考文献:Programming languages — C(PDF电子书,英文版).pdf
- 《操作系统》课程教学资源(PPT课件)课程简介 Operating System.pptx
- 《操作系统》课程教学资源(PPT课件)第1章 操作系统引论.pptx
- 《操作系统》课程教学资源(PPT课件)第2章 进程的描述和控制.pptx
- 《操作系统》课程教学资源(PPT课件)第3章 处理机调度与死锁.pptx
- 《操作系统》课程教学资源(PPT课件)第5章 虚拟存储器.pptx
- 《操作系统》课程教学资源(PPT课件)第6章 输入输出系统.pptx
- 《操作系统》课程教学资源(PPT课件)第7章 文件管理.pptx
- 《操作系统》课程教学资源(PPT课件)第8章 磁盘存储器的管理.pptx
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 4 Threads.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 5 Process Communication & Synchronization(part1).pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 5 Process Communication & Synchronization -Part 2.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 6 Process Scheduling.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 7 Memory Management part1.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 7 Memory Management part2.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 8 Mass Storage.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 9 File Systems part1.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 9 File Systems part2.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 10 Details of FAT32.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 10 Details of Ext2/3 File System.pdf
- 北京工业大学:信息科学技术学院《C#程序设计基础》课程教学大纲 Fundamentals of Programming Principle and Practice in C#.pdf
- 北京工业大学:计算机学院本科课程教学大纲汇编(2024).pdf
- 揭阳职业技术学院:《计算机应用基础》课程授课教案(讲义,2025).pdf
- 《C语言程序设计》课程教学课件(PPT讲稿)第10章 对文件的输入输出.pptx
- 《C语言程序设计》课程教学课件(PPT讲稿)第01章 程序设计和C语言.pptx
- 《C语言程序设计》课程教学课件(PPT讲稿)第02章 算法——程序的灵魂.pptx
- 《C语言程序设计》课程教学课件(PPT讲稿)第03章 最简单的C程序设计——顺序程序设计.pptx
- 《C语言程序设计》课程教学课件(PPT讲稿)第04章 选择结构程序设计.pptx
- 《C语言程序设计》课程教学课件(PPT讲稿)第05章 循环结构程序设计.pptx
