当前位置:网站首页>操作系统面试题汇总(不定期更新)
操作系统面试题汇总(不定期更新)
2022-06-30 19:20:00 【孤天野鹤】
1.说一下线程和进程,它们之间的区别?
进程:进程是系统进行资源分配和调度的一个独立单位,是系统中的并发执行的单位。
线程:线程是进程的一个实体,也是 CPU 调度和分派的基本单位,它是比进程更小的能独立运行的基本单位,有时又被称为轻权进程或轻量级进程。
区别:
(1)进程是资源分配的最小单位,而线程是 CPU 调度的最小单位;
(2)创建进程或撤销进程,系统都要为之分配或回收资源,操作系统开销远大于创建或撤销线程时的开销;
(3)不同进程地址空间相互独立,同一进程内的线程共享同一地址空间。一个进程的线程在另一个进程内是不可见的;
(4)进程间不会相互影响,而一个线程挂掉将可能导致整个进程挂掉;
2.线程同步的机制?
3.同步和异步的区别?
同步:当一个同步调用发出后,调用者要一直等待返回结果。通知后,才能进行后续的执行。(按顺序执行)
异步:当一个异步过程调用发出后,调用者不能立刻得到返回结果。实际处理这个调用的部件在完成后,通过状态、通知和回调来通知调用者。(各执行各的)
4.阻塞和非阻塞的区别?
阻塞与非阻塞的区别 - 麦飞 - 博客园 (cnblogs.com)
5.操作系统中死锁的四个必要条件?
边栏推荐
- Whether the SQL is indexed
- There are three ways to create instances by reflection (2022.6.6-6.12)
- [jetsonnano] [tutorial] [introductory series] [i] how to enable VNC sharing
- A detailed explanation of the implementation principle of go Distributed Link Tracking
- The prospectus of pelt medical was "invalid" for the second time in the Hong Kong stock exchange, and the listing plan was substantially delayed
- Why must a digital transformation strategy include continuous testing?
- 线下门店为什么要做新零售?
- 新出生的机器狗,打滚1小时后自己掌握走路,吴恩达开山大弟子最新成果
- 8 - 函数
- 昔日果汁大王,16个亿卖了
猜你喜欢

qt中toLocal8Bit和toUtf8()有什么区别

SQL continuous login problem

无线充U型超声波电动牙刷方案开发

科大讯飞活跃竞赛汇总!(12个)

4.3寸触控屏12路控制端口可编程网络中控支持5台中控主机相互备份

Character class of regular series

Unity 如何拖拉多个组件中的一个

The project is configured with eslint. When the editor does not close the eslint function, the eslint does not take effect

标配10个安全气囊,奇瑞艾瑞泽8安全防护无死角

VR云展厅如何给线下实体带来活力?有哪些功能?
随机推荐
MQ selection (2022.5.9-5.15)
RP prototype resource sharing - shopping app
漫画 | Oracle 被新时代抛弃了吗?
Inventory the six second level capabilities of Huawei cloud gaussdb (for redis)
2022 最新 JCR正式发布全球最新影响因子名单(前600名)
qt中toLocal8Bit和toUtf8()有什么区别
企业中台规划和IT架构微服务转型
VR全景拍摄为什么要加盟?巧借资源实现共赢
MQ advantages and disadvantages (2022.5.2-5.8)
测试必备工具 —— Postman实战教程
【论文阅读】Trajectory-guided Control Prediction for End-to-end Autonomous Driving: A Simple yet Strong Baseline
Data intelligence - dtcc2022! China database technology conference is about to open
RP原型资源分享-购物类App
The prospectus of pelt medical was "invalid" for the second time in the Hong Kong stock exchange, and the listing plan was substantially delayed
Friends in Guangzhou can join us if they have the opportunity
dataloader 源码_DataLoader
VR全景添加对比功能,让差异化效果展示更直观!
线下门店为什么要做新零售?
传输层 使用滑动窗口实现流量控制
The former king of fruit juice sold for 1.6 billion yuan