Exercise 1: Selectors and Descriptors
Objectives:
- Learn how to load a dump for analysis
- Introduction to the dump formatter
- Learn how to display descriptors
Start
the lab at a full-screen or windowed command prompt.
A full-screen session is faster, but a windowed session can be made 100
lines high by entering
MODE CO80,100 This can be very useful, because you can look back quite a
ways by using the scroll bar.
Change to directory CLASSES\UTIL
Make diskette one by typing OS2IMAGE ..\IMAGES.162\LAB01.001 A:
Make diskette two by typing OS2IMAGE ..\IMAGES.162\LAB01.002 A:
Load the dump into a new file which will be named DUMP1.DMP by typing
DCOMP
A: X:\DUMP01.DMP and pressing enter, then following the prompts.
When the dump is loaded, it should have a file size of 4194816.
Start the dump formatter by typing DF_RET X:\DUMP01.DMP,
or by DF_RET ..\DUMPS.162\DUMP01.DMP
You should see 6 or 7 informational lines at the top, followed by a pair
of lines which start "Slot", and "*0023#", followed by a set of registers.
*** We are not yet concerned with any of these. ***
You should get a prompt, which is the character "#".
Note: You can always document what you are thinking by simply typing
it in as an evaluation for the dump formatter to perform. You can access
the evaluation function by typing ?' followed by whatever you want echoed
to the screen and to the log. You can also type in ? and any expression
to have it evaluated and output in hex, decimal, octal(!), binary, character,
and boolean forms.
Note: ? by itself is a simple request for what commands are recognized.
Use the dump formatter to look at descriptors and answer these questions.
The dump formatter is NOT case sensitive.
Descriptors may be displayed using "DG" or "DL", followed by the selector.
Try it both ways for several selectors, such as F, 160, DFFF, 158.
Use the miniature command reference in the back of the student guide, if
necessary.
There are a great many things we will NOT do in this exercise. We are using
only a tiny part of the dump formatter's capabilities for this class. For
example, we will ignore the IDT in this class; one can enter "DI" followed
by the interrupt number to see the descriptor from the IDT.
1.
Which
table contains the descriptor data for selector 000F?
2.
Which command is preferred to display only the
descriptor for 000F?
3.
What
alternative command will also display only the descriptor for 000F?
4.
What type of memory is described by selector 000F?
Hint: It is one of the first things displayed in
the output for each descriptor.
- What is the largest valid offset within segment
000F?
- What is the size of segment 000F?
Hint:
Not quite the same as the previous answer.
- What is the linear ( virtual)
address of segment 000F?
- What privilege level is segment 000F?
- What is the Requested Privilege Level of selector
000F?
Hint: RPL is not in the descriptor.
10.
What is the type and limit of segment 0017?
11.
What
is the linear (virtual) address of segment 0017?
12.
Which
table contains descriptor 0017?
13.
Will
the aplication program be able to access the segment selected by 000F?
Explain._______________________________________________
14.
Will the program be able to store into segment
000F?
Explain._______________________________________________
15.
Will the application program be able to access
storage using selector 0037?
Explain._______________________________________________
16.
Will the program be able to write into storage
using selector 38?
Explain._______________________________________________
17.
Will the program be able to write into storage
using selector 0007?
Explain._______________________________________________
18.
Enter the following command: DG 70 L 2
Compare
and contrast the base, limit, privilege level and flags for each.
19.
Enter the following command: DG 5A;DG 5B
Compare
and contrast the base, limit, privilege level and flags for each.