study_os_l2


"/home/yossef/notes/Su/os/study_os_l2.md"

path: Su/os/study_os_l2.md

- **fileName**: study_os_l2
- **Created on**: 2025-04-05 14:54:13

what is a process?

Is an active entity which is program execution (load into main memory for
execution)

process need a resources like cpu and ram and storage and else for execution

What is thread?

Is a unit for execution with in a process, a process can have a single thread
or multiple threads

single thread process having only one program counter specifying location
for the next instruction that gone execute

multi thread process having only one program counter per threads
(one cpu == one thread)

What is process part?

What are the five state of process?

What is the information associated with process control block(process)?

What is process schedule?

Select from available processes for the next execution

What is process dispatcher?

Response for the process state changing

Short-term scheduler (or CPU scheduler) –

selects which process should be executed next and allocates CPU

Long-term scheduler (or job scheduler) –

selects which processes should be brought into the ready queue

Medium-term scheduler

Independent process cannot affect or be affected by the execution of another
process

Cooperating process can affect or be affected by other processes, including

What is Reasons for cooperating processes:

  1. Information sharing: to share a source of information by several process
    or tasks or users
  2. Computation speed-up: when dividing a task into sub-tasks (processes) to be
    accomplished faster
  3. Modularity: designing a system by dividing it into separate modules (processes)
  4. Convenience: a system with cooperative tasks (processes) will more convenient
    to users

Cooperating processes need inter-process communication to exchange
data and information

What are Two models of IPC(inter-process communication) are:

  1. Shared memory: process can read and write data and information to the
    shared memory area
  2. Message passing

Message Passing Mechanism is for cooperating processes to communicate
and to synchronize their actions by exchanging messages between each
other through the Kernel which allocates registers that form a Message Queue
for cooperating processes

Blocking is considered synchronous

Non-blocking is considered asynchronous

Messages are exchanged by communicating processes and reside in a
temporary queue (Buffering). This queue (Buffer) can be implemented in three ways:

1. Zero-Capacity Buffer

2. Bounded Buffer

3. Unbounded Buffer