作者u9555kimo (莱特品客)
看板PCCU-CS
标题[整理] 资安
时间Wed Jun 4 13:24:53 2008
Loader 4 种
(A)Bootstrap Loader (启动载入器)1.在电脑开机时,用来载入第一个执行程式(通常是
作业系统)的绝对载入程式 2.不必执行连结与重定位3.单回合处理4.启动载入程式有固定
的程式起始位址(通常为 0) 5.作业系统的起始位址亦为固定启动6.载入程式本身应该很
小
(B)linking loader(连结载入程式)1.对一群需要连结的控制段(可重定位程式),进行连
结及载入,并执行所载入完整的程式2.由於外部参考的问题,需两回合来完成: Pass
1: 指定位址给所有的外部变数 Pass 2: 执行实际的载入、重定位及连结
(C)linkage editor(连结编辑程式)功能和Linking Loader一样。但是在Load之前就先做
了Link的动作。
(D)dynamic linking(动态连结程式)程式直到执行时直到执行时,才做才做Link的动作
。
Parse Tree <read> := READ ( <id-list> )
<id-list> := id VARIANCE := SUMSQ DIV 100 - MEAN * MEAN
Array 分为两种主要格式:row major 以列为主[01.02.03.04.05.06][11.12.13...]
column major 以行为主[01.11.21.31][02.12.22.32]
算法 ex:现有一个 row major 的,
[01.02.03.04.05.06][11.12.13.14.15.16]....[31.32.33.34.35.36]
目的码产生[A]: A:ARRAY[1..10]OF INTEGER →... →... →... → A[I] :=5
(1)- I #1 i1 (I - 1 丢到 i1)原因:
(2)* i1 #3 i2 (i1 * 3 丢到 i2)原因:1Word = 3Byte
(3):= #5 A[i2]
目的码产生[B]: B:ARRAY[0...3,1...6]OF INTEGER →... →... →... →
A[I,J] :=5
(1)* I #6 i1 (2)- J #1 i2 (3)+ i1 i2 i3 (4)* i3 #3
i4 (5):= #5 B[i4]
FCFS、 LRU Suppose demand-paging is used in our system which allows three
pages in the memory at a time. The program to be considered consists of pages
unmbered 0 through 5. Page 4 is automatically loaded when we start running
the program. Other pages are loaded as they are referenced by the page fault
mechanism. Suppose the sequence of page references is in the following order:
4 3 5 5 5 1 1 3 5 5 4 3 5 1 3=>
(a)Show the content of the memory after each memory reference using FCFS
scheme.
(b)how many page faults are generated during the program execution?
注:FCFS(先到先服务) LRU(最近用过的优先) 答:(A)
4,*34,*534,534,534,*153,153,153,153,153,*415,*341,*534,*153,153 (B):7 Page
faults
--
▉╯╰ ▅▃▂ ▂
▏ http://www.wretch.cc/blog/lightpink1 ╱
█ ╮╭
▆▅ ▂▅▆ ▎ ╱ █ ╱ ╱ █ ╱
▉ ◢▋ ▄▄ ▉ ◢▋ ╱ ████████████
▉ ▆█◤ ▊
▎ ▉ ▆█◤ ╱ ╱
█
█ ▋
▍ ▎ █ ████████████
▉
█ ▅▅ ▏ █ █ █
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.137.20.1
※ 编辑: u9555kimo 来自: 140.137.20.1 (06/04 17:02)