3

This relates to previous questions regarding the GIL (Global Interpreter Lock) for Python on the Raspberry Pi. My question has to do with the new processor on the Pi 4 - does it still have the same restrictions as the Pi 3, where it cannot natively split a Python script into multiple cores?

This may be a fundamental misunderstanding on my part of the purpose of the GIL, but I was hoping maybe the Pi 4's new processor did not have this same restriction.

The Pi 4's new processor (Broadcom BCM2711) has four Arm Cortex A72 cores, whereas the Pi 3 had four Cortex A53 cores. They link to their preliminary datasheet here, but it doesn't seem to have much information on it.

Aside: There doesn't seem to be a Pi-4 tag, could someone please create it?

7

GIL is a design specification of the Python language, rather than a limitation of the Raspberry Pi [1] (multiprocessing is possible in Python, often with only a few lines of code [2], but multithreading is generally not). The new processor will have no effect on the limitations associated with GIL.

  • That second link is especially helpful. Thanks for the help! – ConcernedHobbit Jun 25 at 19:37
  • I also found this article to be really helpful in understanding how to use multiprocessing. – ConcernedHobbit Jun 25 at 19:45
  • 2
    @ConcernedHobbit If the answer help you very much then you should accept it with a tick on the tick on the left side. – Ingo Jun 25 at 21:53
  • @Ingo I doubt there will be another answer that better answers my question, but I was going to give the standard 24 hours before accepting the answer. I will make sure to though! – ConcernedHobbit Jun 26 at 1:35
  • @ConcernedHobbit If there is a better answer later, you can change it. – Ingo Jun 26 at 7:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.