写译 — 我靠!短进程优先调度算法究竟是怎么一回事?

  • Author : Cyan_RA9
  • 和大家分享英语写译 ,包括计算机英文教材,计算机基础,中英文诗词,英文名著,日常对话等,每一篇文章 我都会分别给出"原文内容 ","第一版翻译 " 和 "第二版翻译 ",以及"生词整理"共四部分。
  • 写译 --- 短进程优先调度算法究竟是怎么一回事?

【原文内容】

  1. 短进程优先调度算法(SPF和SRT)
    • 工作原理 : 可以适用于作业调度、进程调度。
      1> SPF(Shortest Process First)非抢占式 ,在进程调度时,根据就绪队列中排队的进程所预估的处理器使用时间,每次调度选择预估剩余处理器使用时间最短的进程 ;在作业调度时,称为短作业优先调度算法(Shortest Job First, SJF),根据外存队列中作业所要求的执行时间来调度作业,每次调度选择预估剩余处理器使用时间最短的作业。
      2> SRT(Shortest Remaining Time)抢占式 ,选择剩余运行时间最短 的进程执行;如果在当前进程运行过程中,就绪队列中出现了要求时间更短的进程,则这个要求时间更短的进程会抢占处理器资源,当前运行的进程状态会由执行态变为就绪态。
    • 适用情景:适合批处理系统,尤其是短作业较多的场景。
    • 优点
      1> SPF(Shortest Process First) :较FCFS性能更好,如果调度时满足"待调度进程同时可运行" 或者 "待调度进程都几乎同时到达",那么SPF的平均等待时间和平均周转实际是最优的
      2> SRT(Shortest Remaining Time):进一步优化平均等待时间。
    • 缺点
      1> SPF(Shortest Process First) :长作业可能"饥饿";算法需要进程预估其运行时间,在预估时,可能出现估算时间不准确 或者 进程"谎报"时间等问题;同FCFS一样,未考虑到不同进程间的差异性。
      2> SRT(Shortest Remaining Time):需要频繁计算剩余时间,开销较大。

【第一版翻译:(润色前,手译)】

  1. Shortest Process First (SPF and SRT)
    • FUNCTIONAL PRINCIPLES : it's applicable to both job scheduling and process scheduling.
      1> SPF(Shortest Process First) : it's non-preemptive . During each process scheduling event, the system selects the process which holds the shortest Estimated CPU Burst Time according to all of processes' estimated CPU burst time in the ready queue. When it turns to job scheduling, it's claimed as Shortest Job First(SJF); The system selects the job which holds the shortest estimated remaining CPU burst time, scheduling processes according to all of jobs' execution time in the Secondary Storage Queue.
      2> SRT(Shortest Remaining Time) : It's preemptive . The system selects the process which holds the shortest remaining run time to execute; If within current process's function duration a process that needs shorter time appears in the ready queue, then this process which needs shorter time preempts processor resource, and current process turns its state from the running state to the ready state.
    • APPLICABLE SCENARIOS : it's suitable to Batch Processing Systems, especially when short jobs are major.
    • ADVANTAGES :
      1> SPF(Shortest Process First) : it's better than FCFS in terms of performance. If scheduling conditions contain "All processes ready for scheduling simultaneously" or "All processes arrive at nearly the same time", the SPF's average waiting time and average turnaround time are optimal
      2> SRT(Shortest Remaining Time) : further optimizes the average waiting time.
    • DISADVANTAGES :
      1> SPF(Shortest Process First) : Long jobs may end up with "Starvation"; Algorithm needs processes to estimate their function time, but there may be some of issues emerging, for instance, the given time can be inaccurate or fake; Like FCFS, it does not consider the differential among different processes.
      2> SRT(Shortest Remaining Time) : It needs to calculate remaining time frequently so its cost is relatively high.

【第二版翻译:(润色后,雅思水准)】

  1. Shortest Process First (SPF and SRT)
    • FUNCTIONAL PRINCIPLES : This algorithm is applicable to both job scheduling and process scheduling.
      1> SPF(Shortest Process First) : This is a non-preemptive algorithm. During each process scheduling event, the system selects the process with the shortest Estimated CPU Burst Time from the ready queue. When applied to job scheduling, it is known as Shortest Job First(SJF). In this context, the system selects the job with the shortest estimated remaining execution time, scheduling jobs according to all of jobs' execution time in the Secondary Storage Queue.
      2> SRT(Shortest Remaining Time) : It is preemptive . The system selects the process with the shortest remaining run time to execute; If, during the current process's execution, a new process requiring a shorter remaining time appears in the ready queue, then this new process preempts the processor resource, and the current process transitions from the running state to the ready state.
    • APPLICABLE SCENARIOS : It is suitable for Batch Processing Systems, especially in scenarios where short jobs are prevalent.
    • ADVANTAGES :
      1> SPF(Shortest Process First) : It generally offers better performance than FCFS. If scheduling conditions involve "All processes ready for scheduling simultaneously" or "All processes arriving at nearly the same time", the SPF yields optimal average waiting time and average turnaround time
      2> SRT(Shortest Remaining Time) : It further optimizes the average waiting time.
    • DISADVANTAGES :
      1> SPF(Shortest Process First) : Long jobs may experience "Starvation"; The algorithm requires processes to estimate their execution time, but issues may arise during estimation, such as inaccurate or fabricated time values; Like FCFS, it does not consider the variation among different processes.
      2> SRT(Shortest Remaining Time) : It requires frequent calculation of remaining time, leading to relatively high overhead.

【生词整理】

  • FUNCTIONAL PRINCIPLES:phrase.工作原理
  • non-preemptive:adj.非抢占式的
  • preemptive:adj.抢占式的,有先买权的
  • job scheduling:phrase.作业调度
  • process scheduling :phrase.进程调度
  • ready queue:phrase.就绪队列
  • estimated cpu burst time:phrase.所预估的处理器使用时间
  • Secondary Storage Queue:phrase.外存队列
  • Secondary Storage:phrase.外存
  • be suitable for:phrase.适合于...
  • prevalent:adj.流行的,普遍的,盛行的
  • average turnaround time:phrase.平均周转时间
  • turnaround:n.好转,转机,转变,周转
  • experience starvation:phrase."饥饿"
  • during estimation:phrase.在预估时
  • overhead:phrase.n.天花板,企业费用,日常开支,开销;adj&adv.在头上的(地),在空中的(地)

【写译手稿】

相关推荐
qianmoQ1 小时前
GitHub 趋势日报 (2025年08月07日)
github
小厂永远得不到的男人9 小时前
java 面试八股这一篇就够之java集合篇
面试·程序员
牛客企业服务9 小时前
AI面试系统助手深度评测:6大主流工具对比分析
数据库·人工智能·python·面试·职场和发展·数据挖掘·求职招聘
在未来等你13 小时前
RabbitMQ面试精讲 Day 14:Federation插件与数据同步
中间件·面试·消息队列·rabbitmq
岁忧14 小时前
(LeetCode 面试经典 150 题) 82. 删除排序链表中的重复元素 II (链表)
java·c++·leetcode·链表·面试·go
Ali酱14 小时前
远程这两年,我才真正感受到——工作,原来可以不必吞噬生活。
前端·面试·远程工作
Java中文社群15 小时前
快看!百度提前批的面试难度,你能拿下吗?
java·后端·面试
乐予吕16 小时前
别再乱用箭头函数了!JavaScript 三种函数写法的终极指南
前端·javascript·代码规范
小高00717 小时前
🚀Promise 全家桶:原理、实现、API、实战,一篇搞定
前端·javascript·面试
MrSkye17 小时前
🔥披萨还没到你就吃了?”JavaScript异步编程入门全解🔥
前端·javascript·面试