Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
JNUfeatherwit
knowledge
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
knowledge
/
computer.txt
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
43 lines (37 loc) · 2.47 KB
master
Breadcrumbs
knowledge
/
computer.txt
Copy path
Top
File metadata and controls
Code
Blame
43 lines (37 loc) · 2.47 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
阻塞非阻塞同步异步:
同步异步关注的是: 消息通信机制
阻塞非阻塞关注的是: 程序在等待调用结果时的状态
烧水例子:
同步阻塞: 我用普通水壶烧水,坐等水开
异步阻塞: 我用响水壶烧水,坐等水开,但水开时水壶有提醒
同步非阻塞: 我用普通水壶烧水,然后去干其他事,时不时看看水有没有开
异步非阻塞: 我用响水壶烧水,然后去干其他事,水开时水壶有提醒
进程线程:
进程: cpu资源分配的最小单位,计算机中已运行程序的实体,是线程的容器,单个CPU一次只能运行一个进程
线程: cpu独立调度的最小单位
工厂例子:
工厂是CPU,承担所有计算任务
进程是车间,代表cpu所能处理的单个任务,单个CPU一次只能运行一个进程
线程是车间工人,一个进程包括多个线程,多个线程协同完成一个任务
有些进程的内存空间是共享的,每个线程都能使用共享内存
互斥锁,防止多个线程同时读写某一内存区域
信号量,保证多个线程不会互相冲突
软件例子:
开了QQ,开了一个进程;QQ里传输文字开了个线程,弹出对话框开了个线程
编译器:
https://zh.wikipedia.org/wiki/編譯器
概念: 是一种计算机程序,将某种编程语言写成的源代码(原始语言),转换成另一种编程语言(目标语言)
工作流程:
源代码 -> 预处理器 -> 编译器 -> 汇编程序 -> 目标代码 -> 链接器 -> 可执行文件
source code->preprocessor->compiler->assembler->object code->linker->executables
64位软件和32位软件区别:
32位CPU和64位CPU:
指令集合,操作数位数,寄存器名称,寄存器个数都不同
但intel的x86-64cpu和amd的amd64能兼容32软件环境
并发|并行|分布式计算:
https://zh.wikipedia.org/wiki/并发计算
并发计算: 将一个计算任务,分区成几个小部分,让它们同时被计算,之后再汇整计算结果,以完成任务。是一种程序计算的形式
计算单元间的通信:(1)共享内存通信:java,c#; (2)消息传递通信:
并行计算: 并发计算的程序在机器平台上同时被运行的状况,因此是机器运算的形式
分布式计算: 是并行计算的特例,采用计算机网络来进行同步。把工程数据分区成小块,由多台计算机分别计算,将结果统一合并得出数据结论。
大型多人在线游戏,对等网络,面向服务的体系架构
You can’t perform that action at this time.