Pintos: Not able to run due to loop caused by init_ram_pages

35 Views Asked by At

I am new to Pintos. I have downloaded Pintos and installed all the necessary dependencies on my Ubuntu linux. My system is EC2 system with the following ubuntu version

Linux ip-172-31-23-62 6.2.0-1017-aws #17~22.04.1-Ubuntu SMP Fri Nov 17 21:07:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

When I run pintos run alarm-multiple it goes in infinte loop. It seems to be encountering error while accessing init_ram_pages variable and so it is not able to print the following line from the file threads/init.c

printf ("Pintos booting with %'"PRIu32" kB RAM...\n",
          init_ram_pages * PGSIZE / 1024);

I have added another printf which just prints the value of init_ram_pages and that also fails.

In both cases, the pintos starts from the beginning again and encounters the error again and this happens forever.

Any idea why accessing the variable init_ram_pages is causing this problem?

Doing nm on start.o shows this -

nm threads/start.o
000000e8 n gdt
00000100 n gdtdesc
00000106 N init_ram_pages
         U main
00000000 N start

Not sure why init_ram_pages is marked as N I have modified the code to put it in .data section and that changed the nm output as follows -

nm threads/start.o
000000e8 n gdt
00000100 n gdtdesc
00000000 D init_ram_pages
         U main
00000000 N start

But still the error is same.

I really appreciate any help here. Thanks in advance.

I have described all the things I tried in the previous section.

0

There are 0 best solutions below