1

I am using my Ubuntu to do some programming assignments at college and it keeps hanging.

For example,

  • If I have an infinite loop in my C code by mistake, Ubuntu freezes.

  • If my C program allocates memory at runtime and I give it a large dataset by mistake, it freezes.

  • If I switch on RStudio and run a very memory intensive function - it freezes.

By "freeze" I mean that the GUI stops changing, mouse stops moving, keyboard doesn't work. Cannot even go into other ttys using Ctrl+Alt+F1

This never used to happen on the windows computer I was using before (and that was 32bit while my current laptop is 64bit)

It seems as though the process I'm running takes up 100% memory/cpu and hence nothing else works. How do I limit the amount of memory and cpu that each process can take ?

I checked a little on limits.conf but I was unable to find what exactly to do in the limits.conf file nor could I find what limits are considered "safe"

Zanna
  • 70,465
  • 1
    I second this, this happens when the memory gets almost full; I've experienced this when booting from some Live USBs (FWIW on Debian Jessie and on Ubuntu 15.04). I think it's related to the same "original" Debian issue. – kos Sep 26 '15 at 03:59
  • Take a look at Ahmed's (script) and perhaps you could adjust [http://askubuntu.com/questions/287875/how-to-limit-the-cpu-usage-for-a-process-and-its-children-wether-there-is-anothe] – Zuko Sep 26 '15 at 04:58

0 Answers0