- 4
- 0
- 约2.87万字
- 约 78页
- 2015-08-15 发布于湖北
- 举报
分布式系统与管理chapter_Processes.ppt
Distributed SystemsProcesses Yingchi Mao Outline Threads in distributed systems Virtualization Thin-client computing Servers Code migration Threads Introduction to Threads Threads in Distributed Systems What Is A Process? Broadly speaking, what is a process? Some notion of execution. Something that has a sequence of instructions, and changes the state of the system as a result of those instructions. Some notion of containment. A process is usually thought of as “owning” certain resources. A process has a set of instructions (the “program”). “A program in execution”. What is a thread then? Has a minimal execution context, but everything else belongs to the containing process. Context Switching Switch execution between caller and callee: The minimal collection of values stored in the registers of a processor. Switch execution between threads: The minimal collection of values stored in registers plus maybe some thread state. Switch between processes: Thread context plus address space values. Observation 1: Threads share the same address space. Observation 2: Process switching is generally more expensive. OS is involved. Observation 3: Creating and destroying threads is cheaper than doing it for a process. Context Switching in Large Apps A large app is commonly a set of cooperating processes, communicating via IPC, which is expensive. Why use threads? Do multiple things at once, like maintain responsiveness. Easier to structure Do we have to use threads? Why not processes? How do you do multiple things at once? Why prefer processes to threads? Take advantage of multicores Processes and threads Processes offer concurrency transparency, but at a relatively high price on performance Threads offer concurrency without much less transparency Applications with better performance that are harder to code/debug Advantages of multithreading No need to block with every system call Easy to exploit available parallelism in multiprocessors Cheaper communication between
您可能关注的文档
- 偏导数与全微分华南理工大学高数课件.ppt
- 偏导数与高阶偏导数.ppt
- 偏导数与高阶偏导数。胡.ppt
- 偏导数和高阶偏导数.ppt
- 偏导数的概念.ppt
- 偏导数课件.ppt
- 做一个Exchange管理员必须掌握的技术软件篇.ppt
- 傅里叶变换经典ppt.ppt
- 傅里叶快速变换.ppt
- 傅里叶教程.ppt
- 浙江省温州市2024-2025学年七年级上学期语文期末考查卷.docx
- 精品解析:北京市建华实验学校2024-2025学年七年级下学期期中英语试题(原卷版).docx
- 精品解析:北京市通州区2024-2025学年七年级下学期期末考试英语试卷(原卷版).docx
- 精品解析:北京市回民学校2024-2025学年九年级上学期期中语文试题(解析版).docx
- 精品解析:北京市海淀区2025-2026学年九年级上学期期末语文试题(解析版).docx
- 精品解析:北京市东城区汇文中学2025-2026学年八年级上学期期中语文试题(原卷版).docx
- 精品解析:北京市回民学校2024-2025学年九年级上学期期中语文试题(原卷版).docx
- 精品解析:2024-2025学年广东省广州市从化区街口镇中心小学人教版五年级上册期中测试数学试卷(解析版).docx
- 精品解析:北京市通州区2024-2025学年七年级下学期期末考试英语试卷(解析版).docx
- 精品解析:北京市建华实验学校2024-2025学年七年级下学期期中英语试题(解析版).docx
原创力文档

文档评论(0)