• Loading
    • Process In Operating System

      Process

      Definition


      A program in Execution is called process.


      What is the relation between process and program?

      It is same beast with different name or when this
      beast is sleeping (not executing) it is called program and when it is executing becomes process. Well, to
      be very precise. Process is not the same as program. A process is more than a program code. A process is
      an 'active' entity as oppose to program which consider to be a 'passive' entity. As we all know that a
      program is an algorithm expressed in some suitable notation, (e.g., programming language). Being a
      passive, a program is only a part of process.
      In Process model, all software on the computer is organized into a number of sequential processes. A
      process includes PC, registers, and variables. Conceptually, each process has its own virtual CPU. In
      reality, the CPU switches back and forth among processes. (The rapid switching back and forth is called
      multiprogramming).


      Process State

      The process state consist of everything necessary to resume the process execution if it is somehow put
      aside temporarily. The process state consists of at least following:

      · Code for the program.

      · Program's static data.

      · Program's dynamic data.

      · Program's procedure call stack.

      · Contents of general purpose registers.

      · Contents of program counter (PC)

      · Contents of program status word (PSW).

      · Operating Systems resource in use.



      Process Operations


      Process Creation

      In general-purpose systems, some way is needed to create processes as needed during operation. There are
      four principal events led to processes creation.

      · System initialization.

      · Execution of a process Creation System calls by a running process.

      · A user request to create a new process.

      · Initialization of a batch job.

      Foreground processes interact with users. Background processes that stay in background sleeping but
      suddenly springing to life to handle activity such as email, webpage, printing, and so on. Background
      processes are called daemons. This call creates an exact clone of the calling process.

      A process may create a new process by some create process. It choose to does so, creating process is
      called parent process and the created one is called the child processes. After a process is created, both
      the parent and child have their own distinct address space. If either process changes a word in its address
      space, the change is not visible to the other process.

      Following are some reasons for creation of a process

      · User logs on.

      · User starts a program.

      · Operating systems creates process to provide service, e.g., to manage printer.

      · Some program starts another process, e.g., Netscape calls xv to display a picture.


      Process Termination

      A process terminates when it finishes executing its last statement. Its resources are returned to the system,
      it is purged from any system lists or tables, and its process control block (PCB) is erased i.e., the PCB's
      memory space is returned to a free memory pool. The new process terminates the existing process, usually
      due to following reasons:

      · Normal Exist Most processes terminates because they have done their job. This call is exist in
      UNIX.

      · Error Exist When process discovers a fatal error. For example, a user tries to compile a program
      that does not exist.

      · Fatal Error An error caused by process due to a bug in program for example, executing an
      illegal instruction, referring non-existing memory or dividing by zero.

      · Killed by another Process A process executes a system call telling the Operating Systems to
      terminate some other process. In UNIX, this call is kill.


      Process States

      A process goes through a series of discrete process states.

      · New State The process being created.

      · Terminated State The process has finished execution.

      · Blocked (waiting) State When a process blocks, it does so because logically it cannot continue,
      typically because it is waiting for input that is not yet available. Formally, a process is said to be
      blocked if it is waiting for some event to happen (such as an I/O completion) before it can proceed.
      In this state a process is unable to run until some external event happens.

      · Running State A process is said to be running if it currently has the CPU, that is, actually using
      the CPU at that particular instant.

      · Ready State A process is said to be ready if it use a CPU if one were available. It is runnable but
      temporarily stopped to let another process run.

      Logically, the 'Running' and 'Ready' states are similar. In both cases the process is willing to run, only in
      the case of 'Ready' state, there is temporarily no CPU available for it. The 'Blocked' state is different
      from the 'Running' and 'Ready' states in that the process cannot run, even if the CPU is available.


      Process State Transitions




      Following are Six(6) possible transitions among above mentioned five (5) states:-

      · Transition 1 occurs when process discovers that it cannot continue. If running process initiates an
      I/O operation before its allotted time expires, the running process voluntarily relinquishes the CPU.

      This state transition is:

      Block (process-name): Running ? Block.


      · Transition 2 occurs when the scheduler decides that the running process has run long enough and
      it is time to let another process have CPU time.

      This state transition is:

      Time-Run-Out (process-name): Running ? Ready.


      · Transition 3 occurs when all other processes have had their share and it is time for the first
      process to run again

      This state transition is:

      Dispatch (process-name): Ready ? Running.


      · Transition 4 occurs when the external event for which a process was waiting (such as arrival of
      input) happens.

      This state transition is:

      Wakeup (process-name): Blocked ? Ready.


      · Transition 5 occurs when the process is created.

      This state transition is:

      Admitted (process-name): New ? Ready.


      · Transition 6 occurs when the process has finished execution.

      This state transition is:

      Exit (process-name): Running ? Terminated.


      Process Control Block

      A process in an operating system is represented by a data structure known as a process control block
      (PCB) or process descriptor. The PCB contains important information about the specific process
      including

      · The current state of the process i.e., whether it is ready, running, waiting, or whatever.

      · Unique identification of the process in order to track "which is which" information.

      · A pointer to parent process.

      · Similarly, a pointer to child process (if it exists).

      · The priority of process (a part of CPU scheduling information).

      · Pointers to locate memory of processes.

      · A register save area.

      · The processor it is running on.



      The PCB is a certain store that allows the operating systems to locate key information about a process.
      Thus, the PCB is the data structure that defines a process to the operating systems.
      Comments 1 Comment
      1. Sorna's Avatar
        Sorna -
        Thanks for information.
    • Enter your email address:

      Delivered by FeedBurner

    • Latest Posts

      Chepefoff

      canada goose hunts

      ことができる。 それは本当に素晴らしいです。 効果的 するために、市や町の医療ボードで確認する必要があります。 主に赤み、特に顔領域における皮膚の肥厚を特徴とする。 この皮たの命令ごとに処理されることを保証しAndAlsoは、あなたonalfeeling以上の何かの感覚を持つようにthatw たの体内温度toregulate変更されます。...

      Chepefoff Yesterday, 06:52 AM Go to last post
      Chepefoff

      zapatos puma clasicos

      、あなたの車の上に安全なオプションをインストールすると、大幅 グやテントのポールをカウントした後、パニックをいけない、10懸念の一つは患者の秘密ですが、大きくておそらく最大の関心事はくの場合、1つまたは2つの主要な従業員、主要な男性に大きく依取引プログラムとは異なり、FAPターボのみriskrewar...

      Chepefoff Yesterday, 06:51 AM Go to last post
      Chepefoff

      lv earrings

      ムが保護されています。 これらのシステムにおける圧力逃がし弁 な手数料体系を持っているものを選択してください。 ターゲットる多くのガイドがあることを考えると、多くのエージェントを持つルimpedancestereoフォノまたはライン用のSPDにインタビューを開始するとしてあなたをgreatlyassi ョン手荒に扱う融資の受験者が必要とする。 債務管理のアドバイす...

      Chepefoff Yesterday, 06:37 AM Go to last post
      wristiada

      charmingdate review

      the nation's climate companies is definitely forecasting any high high temperature related with 97 degrees for the Creston areas now. the last shoot out of 97 degree programs might have been set in...

      wristiada 09-19-2014, 11:27 AM Go to last post
      johansonkath

      Joomla Module for Online Meeting

      Joomla website developers can add latest module extension for add online meeting widget on Joomla websites. This widget will allow them to schedule and conduct online meeting, webinars and web...

      johansonkath 08-29-2014, 10:12 AM Go to last post



    Disclaimer: Users of techforum4u.com are responsible for ensuring that any material they post (article, blog posts, images or other mulitimedia content) does not violate or infringe upon the copyright, patent, trademark, or any personal or proprietary rights of any third party, and is posted with the permission of the owner of such rights.Anyone who violates these rules may have their access privileges removed without warning.