linux批處理操作系統
批處理操作系統 (Batch Processing Operating System)
When we are working in an environment there is a restriction of making use of computer resources effectively and improvement in the programmer's output. When we are working with tapes a large amount of CPU time wasted in mounting tapes or when the user was operating the input/output device then also a large amount of CPU time wasted CPU was sitting without any work to perform.
在環境中工作時,存在有效利用計算機資源和提高程序員輸出的限制。 當我們使用磁帶時,在安裝磁帶上浪費了大量的CPU時間,或者當用戶操作輸入/輸出設備時,浪費的CPU時間也很多,而CPU卻沒有任何工作要做。
In the batch system, firstly user prepares his job by using punch cards and then, he submits the job to the computer operator.
在批處理系統中 ,首先用戶使用打Kong卡準備工作,然后將工作提交給計算機操作員。
The operator collects the jobs from different users and jobs with similar requirements were batched together and run through the computer as a group.
操作員從不同的用戶那里收集作業,并且將具有類似要求的作業一起批處理并作為一個整體在計算機中運行。
Batch Processing Operating System
批處理操作系統
For example, suppose the operator received one 'C' Program one COBOL program and another 'C' program. If these programs can be run in that order, he would have to set up for the 'C' program environment (loading the 'C' compiler tapes) then set up the COBOL program and finally 'C' program again. If he runs two 'C' as a batch, however, he could set up only once for 'C'. Thus it saves the operator's time.
例如,假設操作員收到一個“ C”程序一個COBOL程序和另一個“ C”程序。 如果可以按此順序運行這些程序,則他將必須設置為“ C”程序環境(裝入“ C”編譯器磁帶),然后設置COBOL程序,最后再次設置“ C”程序。 但是,如果他批量運行兩個“ C”,則只能為“ C”設置一次。 這樣可以節省操作員的時間。
Jobs in a batch are processed in the order of submission.
一批作業按提交順序進行處理。
Batching similar jobs helps in the utilization of system resources quite a bit. But there were still problems. During this transaction from one job to the next, the CPU sat idle.
批處理相似的作業可以極大地幫助利用系統資源。 但是仍然有問題。 在從一個作業到下一個作業的事務期間,CPU處于空閑狀態。
To overcome this idle time, a small program called resident monitor was created which is always resident in the memory. It automatically sequenced from one job to another job.
為了克服這種空閑時間,創建了一個名為“駐留監視器”的小程序,該程序始終駐留在內存中。 它自動從一個作業到另一個作業進行排序。
批處理系統的優點 (Advantages of batch processing system)
It is very difficult to know the time needed by any job for completion of its execution but the processors of the batch systems know how long the job would be when it is in the queue.
很難知道任何作業完成其執行所需要的時間,但是批處理系統的處理器知道該作業在隊列中要花多長時間。
A new job gets started as soon as the previous job is finished without any manual intervention; this increases the performance of the system.
先前的工作完成后,無需任何人工干預即可立即開始新的工作; 這可以提高系統的性能。
The idle time for the batch system is very less and multiple users can share the batch systems.
批處理系統的空閑時間非常少,多個用戶可以共享批處理系統。
This makes management easy for large work in batch systems.
這使得批處理系統中的大型工作的管理變得容易。
A lot of time was being wasted earlier for each individual process in context switching from one environment to another environment but batch processing saves this time also.
在從一個環境切換到另一個環境的上下文切換中,每個單獨的流程都浪費了很多時間,但是批處理也節省了時間。
批處理系統的缺點 (Drawbacks of batch processing system)
CPU may remain idle for a long time in the batch system. If the processes of a batch need some I/O operation, at that time CPU must wait till the I/O operation gets completed. Insufficient use of CPU because of speed mismatch between fast CPU and slow devices and CPU cannot take any other job and execute it.
在批處理系統中,CPU可能長時間保持空閑狀態。 如果批處理需要一些I / O操作,則此時CPU必須等待I / O操作完成。 由于快速CPU和慢速設備之間的速度不匹配,導致CPU使用不足,并且CPU無法執行任何其他作業。
Priority cannot be implemented for the jobs because all the jobs of a batch are executed sequentially one after the other so the output is obtained only after all the jobs are executed. After the submission of the job, the user has to wait a long time to obtain the result.
不能為作業實現優先級,因為一批中的所有作業一個接一個地依次執行,因此僅在執行所有作業后才能獲得輸出。 提交作業后,用戶必須等待很長時間才能獲得結果。
There is a lack of interaction between a user and his job. Once a batch of jobs is submitted for execution, the user is not able to interact with any of his jobs. If a job requires the user to input data during run time, then the user must wait till the other jobs of the batch get executed and if an error occurs while the program is in execution, it can be found only after the completion of all jobs. Due to this increases the overall execution time.
用戶與其工作之間缺乏交互。 提交一批作業以供執行后,用戶將無法與其任何作業進行交互。 如果作業需要用戶在運行時輸入數據,則用戶必須等待直到批處理中的其他作業被執行,并且如果在程序執行時發生錯誤,則只有在所有作業完成后才能找到該錯誤。 。 因此,增加了整體執行時間。
It may lead to starvation because a particular batch of jobs might take a long time for their execution of other jobs in other batches have to wait for a long time to execute.
這可能會導致饑餓,因為特定批次的作業可能需要很長時間才能執行其他批次中的其他作業,因此必須等待很長時間才能執行。
References:
參考文獻:
What is Batch Processing Operating System?
什么是批處理操作系統?
Batch Operating System | Types of Operating System
批處理操作系統| 操作系統類型
翻譯自: https://www.includehelp.com/operating-systems/batch-processing-operating-system.aspx
linux批處理操作系統