Processes


Medium-term scheduler – Is used to remove processes from memory and reduce the degree of multiprogramming (the process is swapped out and swapped in by the medium-term scheduler


Download 0.8 Mb.
bet5/9
Sana16.06.2023
Hajmi0.8 Mb.
#1496696
1   2   3   4   5   6   7   8   9
Bog'liq
os eng

Medium-term scheduler – Is used to remove processes from memory and reduce the degree of multiprogramming (the process is swapped out and swapped in by the medium-term scheduler.

Addition of Medium Term Scheduling

Schedulers (Cont.)


Processes can be described as either:
I/O-bound process – spends more time doing I/O than computations, many short CPU bursts.
CPU-bound process – spends more time doing computations; few very long CPU bursts.
• If all processes are I/O bound, the ready queue will almost always be empty and the short-scheduler will have little to do.
If all processes are CPU bound, the I/O waiting queue will almost always be empty, devices will go unused, and the system will be unbalanced.
To get best performance the system should have a combination of CPU and I/O bound processes.

Dispatcher (short-term scheduler)

  • An OS program that switches the CPU from one process to another selected by the short term scheduler. It involves
  • Context switching
  • Switching to user mode
  • It prevents a single process from monopolizing CPU time.It decides who goes next according to a scheduling algorithm
  • The time it takes for the dispatcher to stop one process and start another running is called dispatch latency
  • The CPU executes instructions in the dispatcher while switching from process A to process B

Process Creation

• A process may create several new processes, via a create-process system call, during execution.

Parent process creates children processes, which, in turn create other processes, forming a tree of processes.

• Resource sharing, such as CPU time, memory, files, I/O devices …

– The Parent continues to execute concurrently with its children

– The parent waits until some or all of its children have terminated


Download 0.8 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling