wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Process, process creation and process termination

profile
Dev Sheta
Jul 12, 2024
0 Likes
0 Discussions
215 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

gis substation

Blog banner

?Why Social and Emotional Skills Matter More Than ABCs in Early Years?

Blog banner

Types of email

Blog banner

Platonic Solids

Blog banner

Yoga in INDIA and ABROAD

Blog banner

Protect yourself from System Hacking with these Simple Steps

Blog banner

Types of Threads

Blog banner

ART AND CULTURE OF VRINDAVAN

Blog banner

Different types of scam frauds

Blog banner

Social Network Analysis: Ek Naya Nazariya Data Science Mein

Blog banner

IT GOVERNANCE

Blog banner

In the world of Technology...

Blog banner

Deadlock Prevention

Blog banner

Defining youtubr

Blog banner

RAID and It's Levels

Blog banner

Building a Simple Doctor Appointment System in Common Lisp

Blog banner

Why Kanye West (Now Ye) is the GOAT: A Legacy Beyond Music

Blog banner

Pipedrive

Blog banner

File Organization and Access

Blog banner

Jira Software

Blog banner

How Reading Books Shape a Child’s Imagination and Thinking?

Blog banner

Importance Of Education.

Blog banner

Unlocking the Secrets: Basic Operations of Computer Forensic Laboratories

Blog banner

Data-Driven Prediction of Virtual Item Prices in Online Games

Blog banner

Types of Hackers.

Blog banner

7 Perks of Getting Your Teeth Whitening Done Professionally

Blog banner

USES OF WHATSAPP

Blog banner

Elements and Principles of Photography

Blog banner

Computer security techniques

Blog banner

A Short History of GIS

Blog banner

RACI model in IT services

Blog banner

Embaded operating system

Blog banner

Modern Operating Systems.

Blog banner

INSTAGRAM

Blog banner

What Is Experiential Learning and Why Does It Work Better Than Rote Learning?

Blog banner

Search Marketing In 2026: From Keywords To Credibility And User Intent

Blog banner

Data Mapping

Blog banner

Android Flashlight Application

Blog banner

Why Moms Are Choosing Customised School Accessories Over Generic Products

Blog banner

evolution of operating system - Disha Parekh

Blog banner

The Dark Web: A Breeding Ground for Cybercriminals – How to Guard Against Threats

Blog banner

Linux VServer Architecture

Blog banner