wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Note on Process, Process creation and Process termination

profile
Dev Sheta
Jul 01, 2024
0 Likes
0 Discussions
316 Reads

A process is just an instance of an executing program, including the current values of the program counter, registers, and variables

In any multiprogramming system, the CPU switches from process to process quickly,running each for tens or hundreds of milliseconds

Process Creation:

• Four principal events cause processes to be created:

1. System initialization.

2. Execution of a process-creation system call by a running process.

3. A user request to create a new process.

4. Initiation of a batch job.

• When an operating system is booted, typically numerous processes are created. Some of  these are foreground processes, that is, processes that interact with (human) users and perform work for them.

• For example, one background process may be designed to accept incoming email,sleeping most of the day but suddenly springing to life when email arrives. Another background process may be designed to accept incoming requests for Web pages hosted on that machine, waking up when a request arrives to service the request.

• In addition to the processes created at boot time, new processes can be created afterward as well. Creating new processes is particularly useful when the work to be done can easily be formulated in terms of several related, but otherwise independent interacting processes.

• For example, if a large amount of data is being fetched over a network for subsequent processing, it may be convenient to create one process to fetch the data and put them in a shared buffer while a second process removes the data items and processes them. On a multiprocessor, allowing each process to run on a different CPU may also make the job go faster

Process Termination:

• After a process has been created, it starts running and does whatever its job is.  

• However, nothing lasts forever, not even processes.

• Sooner or later the new process will terminate, usually due to one of the following

conditions:

1. Normal exit (voluntary).

2. Error exit (voluntary).

3. Fatal error (involuntary).

4. Killed by another process (involuntary).

• Most processes terminate because they hav e done their work. When a compiler has compiled the program given to it, the compiler executes a system call to tell the operating system that it is finished. This call is exit in UNIX and ExitProcess in Windows.

• The second reason for termination is that the process discovers a fatal error.

• The third reason for termination is an error caused by the process, often due to a program bug. Examples include executing an illegal instruction, referencing nonexistent memory, or dividing by zero. In some systems (e.g., UNIX), a process can tell the operating system that it wishes to handle certain errors itself, in which case the process is signaled (interrupted) instead of terminated when one of the errors occurs.

• The fourth reason a process might terminate is that the process executes a system call telling the operating system to kill some other process. In UNIX this call is kill. The corresponding Win32 function is TerminateProcess.


Comments ()


Sign in

Read Next

“CONSISTENCY” in Social Media Marketing

Blog banner

Teenagers of Today

Blog banner

Photorec - media recovery tool

Blog banner

SQL Injection

Blog banner

What is Network Security?

Blog banner

The Best Photography Spots in and Around Arcadia, Florida

Blog banner

Cache memory

Blog banner

Unlocking Success: Mastering Google Ads Strategies

Blog banner

Privacy-Enhancing Computation Techniques

Blog banner

What is online marketing and why do you need to know about it ?

Blog banner

The functions of operating system

Blog banner

Health is Wealth

Blog banner

Multiple processor scheduling

Blog banner

Denial-of-Service and Distributed Denial-of-Service Attack Techniques

Blog banner

How the mobile IP is used in GSM architecture.

Blog banner

Virtualisation

Blog banner

INTERNET

Blog banner

Short-Form Video Marketing: Why It's Dominating the Internet

Blog banner

How to feel Happy everyday day

Blog banner

RAID - LEVELS OF RAID

Blog banner

Fault Tolerance in an Operating System

Blog banner

What is thread and alse multithreading

Blog banner

Threat management

Blog banner

Constrains in service design

Blog banner

Cyber-crime Investigation and Future Directions

Blog banner

Vulnerability Assessment (Vulnerability Analysis)

Blog banner

Tiranga - Abbas Haveliwala

Blog banner

Emerging threats in cyber Forensics

Blog banner

The House ??of Patola Designs: Traditional Weaves with a Modern Twist

Blog banner

Cache memory

Blog banner

Daycare Centres Help Children Transition into Structured Learning

Blog banner

Operating system

Blog banner

Building a Better You: Fitness Tips and Inspiration.

Blog banner

Blockchain

Blog banner

A Happier Workplace Starts with Healthy Lunches by Meal Maharaj

Blog banner

The Power of Cyber Forensic in Solving Crimes

Blog banner

From Airboat Tours to Fossil Hunting: The Ultimate Arcadia Travel Experience

Blog banner

Service Operations in ITSM

Blog banner

Women Empowerment

Blog banner

Web browser forensics:Tools,Evidence collection and analysis

Blog banner

Modern Operating System

Blog banner

AI & Data Science in Healthcare – Predicting diseases, medical imaging analysis

Blog banner