TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
Introduction to AOS course
1. Dept. of Computer Science – FITA – HUA
Van Hoang Nguyen
Mail: startnewday85@gmail.com
Department of Computer Science – FITA – HUA
Advanced Operating System Course ---------------------------------- Fall 2012
10. Advanced Operating System – Fall 2012
throughput, turnaround time, CPU
utilization
response time, proportionality
meeting deadlines, predictability
Van Hoang Nguyen
22. Advanced Operating System – Fall 2012
File’s Name Attributes File’s Name
File’s Name Attributes File’s Name
File’s Name Attributes File’s Name
File’s Name Attributes File’s Name
Van Hoang Nguyen
37. Advanced Operating System – Fall 2012
while (turn!=0) /*loop*/; while (turn!=1) /*loop*/;
critical_region(); critical_region();
turn=1; turn=0;
noncritical_region(); noncritical_region();
Van Hoang Nguyen
38. Advanced Operating System – Fall 2012
void enter_region(int process) void leave_region(int process)
{ {
int other; interested[process]=0;
other = 1-process; }
interested[process]=1;
turn=process;
while (turn==process
&& interested[other]==1);
}
Van Hoang Nguyen
39. Advanced Operating System – Fall 2012
enter_region: enter_region:
TSL REGISTER,LOCK MOVE REGISTER,#1
CMP REGISTER,#0 XCHG REGISTER,LOCK
JNE enter_region CMP REGISTER,#0
RET JNE enter_region
leave_region RET
MOVE LOCK,#0 leave_region
RET MOVE LOCK,#0
RET
Van Hoang Nguyen
40. Advanced Operating System – Fall 2012
void producer(){ void consumer(){
int item; int item;
while(true){ while(true){
item=produce_item(); item=produce_item();
down(&empty); down(&full);
down(&mutex); down(&mutex);
insert_item(item); item=remove_item();
up(&mutex); up(&mutex);
up(&full); up(&empty);
} consume_item(item);
} }
}
Van Hoang Nguyen
41. Advanced Operating System – Fall 2012
mutex_lock: mutex_unlock:
TSL REGISTER,MUTEX MOVE MUTEX,#0
CMP REGISTER,#0 RET
JZE ok
CALL thread_yield
JMP mutex_lock
ok: RET
Van Hoang Nguyen
45. Advanced Operating System – Fall 2012
not enough to hold all process in physical memory
C C C C C
B B B
A
A
D D D
OS OS OS OS OS
Van Hoang Nguyen
46. Advanced Operating System – Fall 2012
==> some issues Stack
› Fixed size while data segment can grow
› allocate an extra memory Room for
› arrange stack and heap segment grow
› Big process can not run
Data
› Fragmentation problem
› External Fragmentation Code
› Internal Fragmentation OS
› memory compact ==> waste CPU time
Van Hoang Nguyen
47. Advanced Operating System – Fall 2012
==> some issues
› How to manage free memory
› bitmaps: unit size, difficult to allocate
› free lists
› How to allocate
› first fit
› next fit
› best fit
› worst fit
› quick fit
Van Hoang Nguyen