Process Management and Memory Management in Operating System

4- Process Management


A program does nothing unless its instructions are executed by the CPU. A program in execution, as mentioned, is a process. A time-shared user program such as a compiler is a process. For example, sending and receiving of emails is also a process. A process needs certain resources, including CPU time, memory, files and I/O devices, to accomplish its task. The resources would be allocated, when process load into the memory or while it is running. 

We emphasize that a program by itself is not a process. A program is a passive entity, like the content of a file stored on disk, whereas a process is an active entity. A processor has a program counter, which specify the next instruction to execute. The execution of such a process must be sequential. The CPU execute the next instruction after the other. Same like as compilers, that execute instructions line by line. But in some cases, two processes would be part of a single program. In this case, it is can't suppose that the execution is sequential for these both processes of same programs. For example, if you are typing in the Microsoft Word. MS Office automatically storing words in the file, during typing. So these two process (Typing of words on file and saving words on file) are executing parallelly at the same time. 

The operating system is responsible for the following activities in connection with process management.
  1. Scheduling processes and threads on the CPUs
  2. Creating and deleting both user and system processes
  3. Suspending and resuming processes
  4. Providing mechanism of the process of synchronization
  5. Providing mechanism of the process of communication

5- Memory Management


The main memory is central to the operation fo a modern computer system. Main memory is the large array of bytes, ranging in size from hundreds of thousands of billion. Each byte has its own address. Main memory is responsible for quickly accessible data shared by the CPU and the input/output devices. The central processor reads instructions from main memory during data-fetch cycle.

The operating system is responsible for the following activities in connection with memory management:
  1. Keeping track of which part of memory are currently being used and who is using them
  2. Deciding which process (or part of processes) and data to move into and out of memory
  3. Allocating and deallocating memory space as needed
For example, in java when we call intern() function in a program. This function invokes java garbage collector to collect unused memory.
Previous
Next Post »

1 comments:

Write comments
nandinihadad
AUTHOR
3 March 2022 at 05:29 delete

What is the difference between blackjack and casino? - Dr. Maryland
The table games are much 안양 출장마사지 better than the standard version of roulette, with 의왕 출장마사지 blackjack and 여주 출장안마 dealer roulette with real dealer 춘천 출장마사지 chips. If you want to bet on the 남양주 출장샵

Reply
avatar