Process Concept in os

Introduction (เคชเคฐเคฟเคšเคฏ)

เคœเคฌ เคญเฅ€ เค†เคช computer เคฎเฅ‡เค‚ เค•เฅ‹เคˆ program run เค•เคฐเคคเฅ‡ เคนเฅˆเค‚, เคคเฅ‹ เคตเคน เคธเคฟเคฐเฅเคซ program เคจเคนเฅ€เค‚ เคฐเคนเคคเคพ โ€”
เคตเคน เคเค• Process เคฌเคจ เคœเคพเคคเคพ เคนเฅˆเฅค

Program = passive (static file)
Process = active (running program)

Process เค•เฅเคฏเคพ เคนเฅ‹เคคเคพ เคนเฅˆ

Process เคเค• program เค•เคพ execution เคนเฅ‹เคคเคพ เคนเฅˆเฅค

เคฏเคพเคจเฅ€ เคœเคฌ program memory เคฎเฅ‡เค‚ load เคนเฅ‹เค•เคฐ run เคนเฅ‹เคคเคพ เคนเฅˆ, เคคเฅ‹ เค‰เคธเฅ‡ process เค•เคนเคคเฅ‡ เคนเฅˆเค‚เฅค

Simple Definition

Process = Program in execution

Program vs Process (Important)

ProgramProcess
Static (file)Dynamic (running)
Disk เคฎเฅ‡เค‚ storedMemory เคฎเฅ‡เค‚ execute
PassiveActive

Process Memory Layout (เคฌเคนเฅเคค important)

เคเค• process memory เคฎเฅ‡เค‚ เค…เคฒเค—-เค…เคฒเค— เคญเคพเค—เฅ‹เค‚ เคฎเฅ‡เค‚ divide เคนเฅ‹เคคเคพ เคนเฅˆ:

1. Text Section

  • Program code (instructions)

2. Data Section

  • Global variables

3. Heap

  • Dynamic memory allocation

4. Stack

  • Function calls, local variables

Process States (Life Cycle)

Process execution เค•เฅ‡ เคฆเฅŒเคฐเคพเคจ เค…เคฒเค—-เค…เคฒเค— states เคฎเฅ‡เค‚ เคœเคพเคคเคพ เคนเฅˆ:

1. New (Creation State)

  • เคœเคฌ process เคชเคนเคฒเฅ€ เคฌเคพเคฐ create เคนเฅ‹เคคเคพ เคนเฅˆ
  • OS process เค•เฅ‡ เคฒเคฟเค resources allocate เค•เคฐเคคเคพ เคนเฅˆ
  • เค…เคญเฅ€ process execution เคถเฅเคฐเฅ‚ เคจเคนเฅ€เค‚ เคนเฅเค† เคนเฅˆ

Example:
เค†เคชเคจเฅ‡ program run เค•เคฟเคฏเคพ โ†’ process create เคนเฅเค†

2. Ready (Ready Queue State)

  • Process ready เคนเฅˆ execution เค•เฅ‡ เคฒเคฟเค
  • เคฒเฅ‡เค•เคฟเคจ CPU available เคจเคนเฅ€เค‚ เคนเฅˆ
  • Process ready queue เคฎเฅ‡เค‚ wait เค•เคฐเคคเคพ เคนเฅˆ

Important:
เคฏเคนเคพเค process wait เค•เคฐเคคเคพ เคนเฅˆ CPU เค•เฅ‡ เคฒเคฟเค, I/O เค•เฅ‡ เคฒเคฟเค เคจเคนเฅ€เค‚

Example:
Multiple apps open เคนเฅˆเค‚ โ†’ เคธเคญเฅ€ ready queue เคฎเฅ‡เค‚

3. Running (Execution State)

  • Process เค•เฅ‹ CPU เคฎเคฟเคฒ เค—เคฏเคพ
  • เค…เคฌ process actively execute เคนเฅ‹ เคฐเคนเคพ เคนเฅˆ

เค•เฅ‡เคตเคฒ เคเค• process เคเค• เคธเคฎเคฏ เคฎเฅ‡เค‚ CPU use เค•เคฐเคคเคพ เคนเฅˆ

Example:
เค†เคชเค•เคพ browser เค…เคญเฅ€ active เคนเฅˆ โ†’ running state

4. Waiting (Blocked State)

  • Process CPU เค›เฅ‹เคกเคผเค•เคฐ I/O operation เค•เฅ‡ เคฒเคฟเค wait เค•เคฐเคคเคพ เคนเฅˆ
  • เคœเฅˆเคธเฅ‡ file read, keyboard input

Example:
Program data load เคนเฅ‹เคจเฅ‡ เค•เคพ เค‡เค‚เคคเคœเคพเคฐ เค•เคฐ เคฐเคนเคพ เคนเฅˆ

5. Terminated (Exit State)

  • Process เค•เคพ execution complete เคนเฅ‹ เค—เคฏเคพ
  • OS เค‰เคธเค•เฅ‡ resources release เค•เคฐ เคฆเฅ‡เคคเคพ เคนเฅˆ

Example:
Program close เคนเฅ‹ เค—เคฏเคพ

Process Control Block (PCB)

PCB เคเค• data structure เคนเฅˆ เคœเฅ‹ OS maintain เค•เคฐเคคเคพ เคนเฅˆเฅค

เค‡เคธเคฎเฅ‡เค‚ process เค•เฅ€ เคธเคพเคฐเฅ€ information เคนเฅ‹เคคเฅ€ เคนเฅˆ:

  • Process ID
  • Process state
  • CPU registers
  • Memory information
  • Scheduling information

Process Operations

OS process เคชเคฐ เค•เคˆ operations perform เค•เคฐเคคเคพ เคนเฅˆ:

  • Process creation
  • Process termination
  • Process suspension
  • Process resumption

Example (เคธเคฎเคเคจเฅ‡ เค•เฅ‡ เคฒเคฟเค)

เคฎเคพเคจ เคฒเฅ‹ เค†เคช browser open เค•เคฐเคคเฅ‡ เคนเฅˆเค‚:

  • Browser program โ†’ memory เคฎเฅ‡เค‚ load เคนเฅเค†
  • Process เคฌเคจเคพ
  • CPU เค‰เคธเฅ‡ execute เค•เคฐ เคฐเคนเคพ เคนเฅˆ

เค…เคฌ browser เคเค• process เคนเฅˆ

Key Points

  • Process = running program
  • OS process เค•เฅ‹ manage เค•เคฐเคคเคพ เคนเฅˆ
  • PCB เคฌเคนเฅเคค important concept เคนเฅˆ
  • Process states exam เคฎเฅ‡เค‚ เคชเฅ‚เค›เคพ เคœเคพเคคเคพ เคนเฅˆ

Conclusion

Process Concept Operating System เค•เคพ foundation เคนเฅˆเฅค

เคฏเคน เคธเคฎเคเคจเคพ เคœเคฐเฅ‚เคฐเฅ€ เคนเฅˆ เค•เคฟ program execution เค•เฅˆเคธเฅ‡ เคนเฅ‹เคคเคพ เคนเฅˆ เค”เคฐ OS เค‰เคธเฅ‡ เค•เฅˆเคธเฅ‡ manage เค•เคฐเคคเคพ เคนเฅˆเฅค

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top