Touge Operating System Classroom Exercise 4.2: Page Memory Management Answer No Analysis

Level 1: The physical address of the mynext variable of Process No. 1

programming requirements

Find the answer through gdb and dbg debugging, and fill in the answer of the first level /data/workspace/myshixun/第一关.txt.

  1. When process 1 calls the function output_char for the first time, what is the physical address of its mynext variable?
  2. When process 1 calls the function output_char for the second time, what is the physical address of its mynext variable?

The configuration environment version 1.3 kernel is the same as before. For details, please move to the following link~ Touge Operating System Classroom Exercise 4.1: Segmented Memory Management Answer_Blueberry Cream Dumpling Blog-CSDN Blog

Start the gdb debugger, type the code:

b 155
c
x/6i $eip
p/x current->ldt

Close the gdb debugger, start the dbg debugger, and type the code:

b 0x6969
c
c
b 0x6977
c
n
sreg
reg

x/38wx 0xffe000

xp/wx 0xffd7b0

The first level document answer:

 Level 2: The physical address of the mynext variable of process 0

programming requirements

Find the answer through gdb and dbg debugging, and fill in the answer of the second level /data/workspace/myshixun/第二关.txt.

  1. When process 0 calls the function output_char for the first time, what is the physical address of its mynext variable?
  2. When process 0 calls the function output_char for the second time, what is the physical address of its mynext variable?

Complete the code of the first level and fill in the answers of the second level document to directly evaluate~

The second level document answer:

Guess you like

Origin blog.csdn.net/kercii/article/details/130566399