SFTW 341, Compiler Construction
Homework 1, due on Oct. 8 (Thursday), 2009
1. Draw tombstone diagrams to illustrate the use of a Java JIT (justin-time) compiler. Show what a Java program P is compiled and
stored on a host machine H, and subsequently downl

SFTW231 Operating Systems I
Assignment 5
D-A7-2727-9
SOU SOK FONG
Chapter 7
Questions:
1. What requirements is memory management intended to satisfy?
ANS: The requirements that memory management intended to satisfy are: Relocation,
protection, sharing, lo

HOI WENG TAK, Francis
D-A6-2781-0
SO(A)
07/05/2009
SFTW231_OS I
Assignment4
Questions:
6.4 How can the hold-and-wait condition be prevented?
The hold-and-wait condition can be prevented by requiring that a process
request all of its required resources at

HOI WENG TAK, Francis
D-A6-2781-0
SO(A)
21/05/2009
SFTW231_OS I
Assignment5
Chapter 7
Questions:
1. What requirements are memory management intended to satisfy?
The requirements that memory management intended to satisfy are: Relocation,
protection, shari

SFTW 341, Compiler Construction
Homework 2, Due on Nov. 10 (Tuesday), 2009
1. Construct a recursive-descent parser for the following grammar:
VarDecl := Type List
Type
:= int | long | short
List
:= ident | List,ident
where VarDecl is the start symbol. Tre

SFTW 341, Compiler Construction
Homework 3, Due on 10 Dec. 2009
1. Consider the expression (a+b)(2+(d(bc). Find an instruction
sequence that evaluates this expression and illustrate the evaluation
on a stack machine. Assume that each variable occupies 1 s

Assume the numbers of element is N, the graph has E edges and V vertices:
?: unknown
blue: according to the text book or notes (I m not very sure those are correct)
Algorithms
Insert
O (log N)
O (log N)
O (log N)
O (1)
Reason: the root or
only one leaf
O

1.17 Xmokers : 43.70 and Xnonsmokem : 30.32;
(b) Ssmokels : and 31101151110ke15 :
(e) A clot plot is shown below.
9 xooxxnasxaxxxxo on GDO O O
10 20 30 40 50 60 70
hr the gure, "x" represents the nonsnroher group and "0" represents the snroher
group.
(d)

HOI WENG TAK, Francis
D-A6-2781-0
SO(A)
SFTW231_OS I
Assignment2
20/03/2009
1.
In a multithreaded environment, by definition, we know that a process is
defined as the unit of resource allocation and a unit of protection. Please
also specify what resources

HOI WENG TAK, Francis
D-A6-2781-0
SO(A)
SFTW231_OS I
Assignment3
15/04/2009
Questions:
1. List four design issues for which the concept of concurrency is relevant.
1) Communication among processes; 2) sharing of and competing for resources;
3) synchroniza

SFTW 341, Compiler Construction
Solutions to Homework 3, Dec. 2009
1. Consider the expression (a + b) (2 + (d (b c). Find an instruction sequence
that evaluates this expression and illustrate the evaluation on a stack machine.
Assume that each variable oc

SFTW 231 Operating System I
Assignment 3
Wan Weng Lon
D-A7-2719-1
SO(A)
Questions:
1. List four design issues for which the concept of concurrency is
relevant.
Answer: Concurrency design issues in multiprogramming,
multiprocessing, and distributed process

SFTW 231 Assignment 2
Wan Weng Lon
D-A7-2719-1
SO(A)
1. In a multithreaded environment, by definition, we know that a process is defined as the
unit of resource allocation and a unit of protection. Please also specify what resources
are associated with pr

Chapter 7
Question
1. What requirements are memory management intended to satisfy?
2. Why is the capability to relocate processes desirable?
Problem
1. A 1MB block of memory is allocated using the buddy system.
a) Show the results of the following sequenc

DouJiaYi,Michael
DA728152
SFTW231OperatingSystemIAssignment3
Questions:
1. List four design issues for which the concept of concurrency is
relevant.
Communicationamongprocesses,sharingofandcompetingforresources,
synchronization of the activities of multip

SFTW 231 Assignment 4
Wan Weng Lon
D-A7-2719-1
Review Question
SO(A)
6.4 How can the hold-and-wait condition be prevented?
Ans: The hold-and-wait condition can be prevented by requiring that a
process request all of its required resources at one time and

Review Question
6.4 How can the hold-and-wait condition be prevented?
6.5 List two ways in which the no-preemption condition can be prevented.
6.7 What is the difference among deadlock avoidance, detection, and
prevention?
Problem.
6.4 Consider the follow

HOI WENG TAK, Francis
D-A6-2781-0
SO(A)
SFTW231_OS I
Assignment1
12/03/2009
1. Compare Two-State Process Model and Five-State Process Model, describe:
1) The difference between them
2) The disadvantage(s) of Two-State Process Model
3) And advantage(s) of

REVIEW FROM
CHAPTER 01 TO 05
Chapter 3
The property of probability distribution and
density function
is
is
is
Chapter 4
Chapter 5
N=6 where the number of doctors k is 4
the number of nurses is 2
We select size n=3 from N to constitute the committee.
X rep

1.
What is the running time of the following algorithms? Assume the number of
elements is N (a) to (d). (for question e, the graph has E edges and N vertices.)
(a) Worst case for Insert(X, H) of a d-heap.
O(logdN)
(b) Worst case for insert of AvlTree.
O(1

CISB211 Computer Organization
Topics covered:
Chapter 2. Instruction Set Architecture (I)
Instructor: Dr. WU Wen
FST, UM
Topics in Chapter 2
Machine instructions and program execution
Addressing methods for accessing register and memory operands
The ways

CISB211 Computer Organization
Topics covered:
p
Chapter 2. Instruction Set Architecture (V)
Dr. WU Wen
FST, UM
Outline
Example programs
p p g
E
Encoding of machine instructions
g fm
Solved problems
p
1
2.12.1 Example programs Vector dot product
programs:

CISB211 Computer Organization
Topics covered:
Chapter 2. Instruction Set Architecture (II)
Instructor: Dr. WU Wen
FST, UM
Outline
Assembly language
Stacks
2
2.5 Assembly language
Human beings
computers
Human like notation
(high level
programming language)

2005 SFTW210 Data Structure and Algorithm Final Examination
(1)15% Give the recurrence equations for the best , average and worst case running
time of quicksort , as well as the final solutions (intermed steps are not necessary).
(2)10% For the input sequ