Part to Understanding Operating Process & Multiprocessing

The most central concept of an operating system is the process and how its managed. A process is a software abstraction of the hardware processor (CPU) and a powerful and interesting feature of an operating system.

The concept of multi-processing in a single core CPU is an operating system software idea. The timing trick behind the execution of multiple processes can be achieve with the help of the processor clock interrupts.

The clock interrupts of processor is use for the interruption of an executing processor or CPU, in other for the process scheduler to swap another process for execution. This process of swapping process to another process is called context switching. This is one of the reason why clock interrupt are very important feature of a processor or micro-controller.

The understanding of clock interrupt require a whole chapter of textbook if not a book, but the idea in terms of process scheduling is to interrupt the processor within a period of time slice.

For this reason above, the clock interrupt are therefore the first thing to be program or configured before allowing a process to run. This is the only way to stop or interrupt the currently running process being executed by the processor. This gives the operating system the ability to allocate or reconfigured the clock interrupt and slice different time for interruption, depending on the processor scheduler algorithm implementation.

Note: The clock interrupt event will always happen even if the process is in an infinite loop. The clock interrupts sub-routine can then be use to carryout process context switching by coping the current states of the processor to a data structure called the Process Control Block( Data structure for storing information about the state of a processor).

Maybe further article, I will also try and write about hardware interrupts and the CPU clock interrupt or below list.

  1. Processors & Process communication concepts
  2. Concept of Paging
  3. Clock Interrupts
  4. Process and Thread Scheduling
  5. Memory Management
  6. File System
  7. Operating Kernel
  8. Device Management

A good knowledge of how this features are implement is a plus to the understanding of what really goes on, on one's machine and how to better take advantages of the provided features during coding or merely using the machine.

Finally, An operating is a complex software that abstract and maintain the current state of a machine may-while, a process is the smallest unit of a task that an operating or a processor can run at a giving time. Therefore to make a machine general purpose computer. An operating have to provide a way to load a process into memory.

Moreover, operating system are response to provide inter-process communication and memory sharing mechanism, therefore a threaded application in python or C++ have to use the native window or linux thread to be able to utilised the CPU threading features.

from multiprocessing import Process;
import os;

Create the entry point of the new process

def entryPoint():
    print('child  = {0}'.format(os.getpid()));

Create a process object and set the target subroutine which is the entry point.

    
if(__name__ == '__main__'):
    process1  = Process(target= entryPoint);
    process1.start();
    print("parent = {0}".format(os.getpid()));


Thanks for your time and hope you enjoy it.


To view or add a comment, sign in

More articles by Obaro Israel J.

  • AI Is Not Taking My Job — It Hasn’t Even Met My Imagination Yet

    The idea that AI is going to take my job is everywhere. It’s loud, unsettling, and often repeated by people who haven’t…

  • Training a Basic Single-Neuron Perceptron (SNP)

    The common saying goes that if you can learn to ride a bicycle, you can eventually ride a bike and then drive a car…

  • 2025: The Year of Data

    The future is for those who truly grasp how to work with data. For those who believe studying mathematics in 2025 is a…

    1 Comment
  • The Key to Scalability: Understanding Micro-service Architecture

    Are you tired of dealing with slow, cumbersome software that's hard to update and maintain? Microservice architecture…

  • What is Crypto-Currency?

    The year 2020 was one of the most frustrating to many people and one of the happiest to others. The sudden "***BOOM****…

  • Understanding Computer Language

    If you want to be able to speak with an Hausa person you will have to learn how to speak the Hausa language, if you…

    1 Comment
  • How I learn to code in COBOL Programming Language In just one day.

    Recently the COBOL programming language makes it to the news. The Government of New Jersey cried out for COBOL…

  • The Lock Down

    The lock down, this is the time where the earth is taking a break from the busy world. A time where the citizen…

  • To explain and to have the knowledge, is different.

    Explanation is hard, and its a constant learning process, I will definitely say yes to that, I an not good at…

  • The Obstacles Of Progression

    In 2020, the world will change, that is what I was told and read about, yet it's still the same, people do things the…

    2 Comments

Explore content categories