“进程",“线程",“任务"与“进程"之间的区别和关系是什么?和“工作"在Linux中? [英] What is the differences and relationships between "process", "threads", "task" and "jobs" in Linux?

查看:298
本文介绍了“进程",“线程",“任务"与“进程"之间的区别和关系是什么?和“工作"在Linux中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我了解Web后端编程时,我对Linux中使用的一些术语感到很困惑.

I'm fairly confused with some of the terms used in Linux when I learn about web backend programming.

  • 在Linux中,进程",线程",任务"和作业"之间的区别和关系是什么?

推荐答案

在所有操作系统中,进程和线程之间的区别是相当普遍的.进程通常代表一个独立的执行单元,具有其自己的内存区域,系统资源和调度插槽.

The distinction between process and thread is fairly universal to all operating systems. A process usually represents an independent execution unit with its own memory area, system resources and scheduling slot.

线程通常是进程中的分区"-线程通常共享相同的内存和操作系统资源,并共享分配给该进程的时间.例如,当您打开浏览器和Microsoft Word时,每个过程都是不同的,但是在每个后​​台发生的事情(例如动画,刷新或备份)可以是线程.

A thread is typically a "division" within the process - threads usually share the same memory and operating system resources, and share the time allocated to that process. For example, when you open your Browser and Microsoft Word, each is a different process, but things that happen in the background of each (like animations, refreshes or backups) can be threads.

作业通常是用户执行的长期工作单元.可以通过一个或多个过程来处理"该作业.它可能不是交互式的.例如,指示机器压缩大文件或在大输入文件上运行某些处理脚本通常是一项工作.命名是相对历史性的-大型机用于处理作业.在UNIX系统中,许多作业是使用cron在预定的时间自动启动的,因此您有了"cron作业"的概念.

A job is usually a long-running unit of work executed by a user. The job may be "handled" by one or more processes. It might not be interactive. For instance, instructing the machine to zip a large file or to run some processing script on a large input file would typically be a job. The naming is relatively historic - Mainframes used to process jobs. In UNIX systems, many jobs are started automatically at prescheduled times using cron, so you have the notion of 'cron jobs'.

这篇关于“进程",“线程",“任务"与“进程"之间的区别和关系是什么?和“工作"在Linux中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆