| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 9429 人关注过本帖
标题:计算机
只看楼主 加入收藏
madfrogme
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:21
帖 子:1160
专家分:1106
注 册:2009-6-24
收藏
得分:0 
Lets give out a simple example.

Lets say that we want this page to manage the 4KB address space beginning at physical location 1MB (0x100000).

What this means--to put in other words--is that this page is "mapped" to address 1MB.

To create this page, simply set 0x100000 in bits 12-31 (the frame address) of the page, and set the present bit. Voila--the page is mapped to 1MB. :) For example:

%define        PRIV        3
mov        ebx, 0x100000 | PRIV    ; this page is mapped to 1MB

Notice that 0x100000 is 4KB aligned? It ORs it with 3 (11 binary which sets the first two bits. Looking at the above table,

we can see that it sets the present and read/write flags, making this page present

 (Meaning its in physical memory. This is true as it is mapped from physical address 0x100000), and is writable.

The quieter you become, the more you can hear
2012-09-25 10:57
madfrogme
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:21
帖 子:1160
专家分:1106
注 册:2009-6-24
收藏
得分:0 
The syntax for the multiply command is

MUL    reg

reg may be any of the 24 general registers . If the register used is an eight-bit register, for example

MUL    BH

than the command means:

let AX = AL * BH

When an eight-bit register is used, it always multiplies by AL and stores the result in AX. When a 16-bit register is used, for example,

MUL BX

then the command mean:

let DX:AX = AX * BX

Where the 32-bit register is stored in two 16-bit registers. The top 16 bits are stored in DX, the bottom 16 bits in AX. When a 32-bit register is used, for example,

MUL EBX

then the command means:

let EDX:EAX = EAX * EBX

A single register is all that you specify when you use the MUL command.

The other registers are always implied.

The quieter you become, the more you can hear
2012-09-26 12:20
madfrogme
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:21
帖 子:1160
专家分:1106
注 册:2009-6-24
收藏
得分:0 
A computer uses 32-bit byte addressing.

The computer uses paged virtual memory with 4KB pages.

 Calculate the number of bits in the page number and offset fields of a logical address.

Answer

Since there are 4K bytes in a cache block,

the offset field must contain 12 bits (2^12 = 4K).

The remaining 20 bits are page number bits.

Thus a logical address is decomposed as shown below.

Page Number(20 bits) Offset(12 bits )


[ 本帖最后由 madfrogme 于 2012-9-26 18:38 编辑 ]

The quieter you become, the more you can hear
2012-09-26 17:36
madfrogme
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:21
帖 子:1160
专家分:1106
注 册:2009-6-24
收藏
得分:0 
プロセス空間領域の解放は、 exit_mmap() 関数(mm/mmap.c)で行われます。以下の処理を行います。

1.    ページテーブルに張り付いている実ページまたはスワップエントリの解放(unmap_vmas 関数)

2.    ページテーブルの解放(free_area_struct 関数)

3.    vm_ops のクローズオペレーションの実行、ファイル構造体の参照カウントデクリメント、および、vm_area_struct 構造体の解放(remove_vma 関数)

The quieter you become, the more you can hear
2012-09-26 19:48
madfrogme
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:21
帖 子:1160
专家分:1106
注 册:2009-6-24
收藏
得分:0 
mov bx, 1000h
mov ax, [bx]

这两句话的意思是把地址 1000h里的内容放入ax, 而不是把1000h放入ax,所以用了方括号


or    al, al        ; Does AL=0?

or可以用来判断AL是否为0,al中若有一位为0 则结果就不为0

LODSB     Load byte at address DS:(E)SI into AL


[ 本帖最后由 madfrogme 于 2012-9-28 20:34 编辑 ]

The quieter you become, the more you can hear
2012-09-27 16:19
madfrogme
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:21
帖 子:1160
专家分:1106
注 册:2009-6-24
收藏
得分:0 
bootloaders...

...Are stored with the Master Boot Record (MBR).
...Are in the first sector of the disk.
...Is the size of a single sector (512) bytes.
...Are loaded by the BIOS INT 0x19 at address 0x7C00.

The quieter you become, the more you can hear
2012-09-27 21:50
madfrogme
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:21
帖 子:1160
专家分:1106
注 册:2009-6-24
收藏
得分:0 
You can use the STI and CLI instructions to enable and disable all interrupts.

Most systems do not allow these instructions for applications as it can cause big problems (Although systems can emulate them).

cli        ; clear interrupts
 ; do something...
sti        ; enable interrupts--we're in the clear!


The ORG instruction is used to alter the value of the location counter.

ORG   addr

With an address specified, ORG changes the location counter to the location counter of addr.


[ 本帖最后由 madfrogme 于 2012-9-27 23:09 编辑 ]

The quieter you become, the more you can hear
2012-09-27 21:59
madfrogme
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:21
帖 子:1160
专家分:1106
注 册:2009-6-24
收藏
得分:0 
图片附件: 游客没有浏览图片的权限,请 登录注册

The quieter you become, the more you can hear
2012-09-28 18:33
madfrogme
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:21
帖 子:1160
专家分:1106
注 册:2009-6-24
收藏
得分:0 
There is some important things to remember about PMode(Protected Mode) however:

Absolutley no interrupts will be avilable. You will need to write them yourself. The use of any interrupt--hardware or software will cause a Triple Fault

Once you switch into pmode, the *slightest* mistake will cause a Triple Fault. Be carefull.

PMode requires the use of Descriptor Tables, such as the GDT, LDT, and IDTs.

PMode gives you access to 4 GB of Memory, With Memory Protection

Segment:Offset Addressing is used along with Linear Addressing

Access and use of 32 bit registers

The quieter you become, the more you can hear
2012-09-28 19:12
madfrogme
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:21
帖 子:1160
专家分:1106
注 册:2009-6-24
收藏
得分:0 
linux 0.11内核中, 为了有效地使用系统的物理内存,内存被划分成几个功能区域
图片附件: 游客没有浏览图片的权限,请 登录注册

The quieter you become, the more you can hear
2012-09-28 23:05
快速回复:计算机
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.020630 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved