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

  • 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.在头上的(地),在空中的(地)

【写译手稿】

相关推荐
ssshooter1 小时前
MCP 服务 Streamable HTTP 和 SSE 的区别
人工智能·面试·程序员
DIY机器人工房1 小时前
【嵌入式面试题】STM32F103C8T6 完整元器件解析 + 面试问题答案
stm32·单片机·面试·嵌入式·面试题·diy机器人工房
晴殇i2 小时前
前端鉴权新时代:告别 localStorage,拥抱更安全的 JWT 存储方案
前端·javascript·面试
来旺2 小时前
互联网大厂Java面试全解析及三轮问答专项
java·数据库·spring boot·安全·缓存·微服务·面试
深思慎考2 小时前
Ubuntu 系统 RabbitMQ 安装指南与使用(含 C++ 客户端与 SSL 错误解决)
c++·ubuntu·rabbitmq·github·rabbitmqpp
小奋斗2 小时前
面试官:[1] == '1'和[1] == 1结果是什么?
前端·面试
WindrunnerMax2 小时前
从零实现富文本编辑器#8-浏览器输入模式的非受控DOM行为
前端·前端框架·github
shepherd1113 小时前
JDK源码深潜(一):从源码看透DelayQueue实现
java·后端·代码规范
这周也會开心3 小时前
通过ssh连接GitHub远程仓库
运维·ssh·github
不会写DN3 小时前
用户头像文件存储功能是如何实现的?
java·linux·后端·golang·node.js·github