File size: 483,155 Bytes
7ec75e2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
{
  "CO2017-syllabus-info-0000": {
    "id": "CO2017-syllabus-info-0000",
    "text": "Course: Operating Systems (ID: CO2017)\nCredits: 3\nSemester: 20221",
    "metadata": {
      "doc_type": "syllabus",
      "course_id": "CO2017",
      "source_file": "/mnt/d/Project_and_Assignment/AI_project/data_cvt/CO2017_Operating_Systems/Syllabus/slide_001.png",
      "page_index": 0,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-12T20:11:29+07:00"
    }
  },
  "CO2017-syllabus-assessments-0000": {
    "id": "CO2017-syllabus-assessments-0000",
    "text": "Lectures: 30 hours. Evaluation: Midterm Exam (None%), Final Exam (50%),\nTutorial:\nLabs/Practices: 20 hours. Weight: 20%.\nProjects: 15 hours. Weight: 30%.\nSelf-study: 83 hours.\nOthers:",
    "metadata": {
      "doc_type": "syllabus",
      "course_id": "CO2017",
      "source_file": "/mnt/d/Project_and_Assignment/AI_project/data_cvt/CO2017_Operating_Systems/Syllabus/slide_001.png",
      "page_index": 0,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-12T20:11:29+07:00"
    }
  },
  "CO2017-syllabus-raw-0000": {
    "id": "CO2017-syllabus-raw-0000",
    "text": "DCMH.CO2017_Operating Systems 21/11/2022,16:04 HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY BK TP.HCM TRUONG DAI HOC BACH KHOA - DHQG-HCM Dai Hoc Quδc Gia TP.HCM Vietnam National University - HCMC Truo'ng Dai Hoc Bach Khoa Ho Chi Minh City University of Technology Khoa Khoa hoc va Ky thuat May tinh Faculty of Computer Science and Engineering DE CUONG HOC PHAN Course Syllabus 1. Thong tin vé hoc phan (Course information) 1.1. Thng tin tóng quan (General information)  Tén hoc phän: He diéu hanh Course title: Operating Systems  Ma hoc phan (Course ID): CO2017 - S6 tin chi (Credits): 3 (ETCS: 6 )  Hoc ky áp dung (Applied from semester) : 20221  Tó chúc hoc phan (Course format) : Hinh thúc hoc tap Só tiét/gi  só tín chi  Ghi chu (Teaching/study type) (Hours) (Credits) (Notes) Ly thuyét (LT) 30 (Lectures) Thao luan (ThL/Thuc hanh tai l6p (TH) 0 (Tutorial) Thi nghiém (TNg)/Thuc tap xuong (TT) 20 Labs/Practices) Bäi tap l6n (BTL)/D6 án (DA) 15 (Projects) Tu hoc (Self-study) 83.5 Khäc (Others) O Tóng cöng (Total) 150 3  Ty lé dänh giá va hinh thúc kiém tra/thi (Evaluation form & ratio) Hinh thüc danh gia Ty le Hinh thüc Thi gian (Evaluation type) (Ratio) (Format) (Duration) Thao luan (ThL)/Thuc hanh tai l6p (TH) (Tutorial) Thi nghiém 20% Labs/Practices Bai tap l6n (BTL)/D6 án (DA) 30% (Projects) Kiém tra -- phút (minutes) (Midterm Exam) (--) Thi 50% Trac nghi",
    "metadata": {
      "doc_type": "syllabus",
      "course_id": "CO2017",
      "source_file": "/mnt/d/Project_and_Assignment/AI_project/data_cvt/CO2017_Operating_Systems/Syllabus/slide_001.png",
      "page_index": 0,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-12T20:11:29+07:00"
    }
  },
  "CO2017-syllabus-raw-0001": {
    "id": "CO2017-syllabus-raw-0001",
    "text": "/Practices Bai tap l6n (BTL)/D6 án (DA) 30% (Projects) Kiém tra -- phút (minutes) (Midterm Exam) (--) Thi 50% Trac nghiém 90 phút (minutes) (Final Exam) (Multiple choice (MCQ)) Tong cong 100% (Total) https://mybk.hcmut.edu.vn/app/he-thong-quan-ly-dao-tao/ctdt/dcmh/editor Page 1 of 6",
    "metadata": {
      "doc_type": "syllabus",
      "course_id": "CO2017",
      "source_file": "/mnt/d/Project_and_Assignment/AI_project/data_cvt/CO2017_Operating_Systems/Syllabus/slide_001.png",
      "page_index": 0,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-12T20:11:29+07:00"
    }
  },
  "-syllabus-info-0000": {
    "id": "-syllabus-info-0000",
    "text": "Course: Operating_Systems (ID: )",
    "metadata": {
      "doc_type": "syllabus",
      "course_id": "",
      "source_file": "/mnt/d/Project_and_Assignment/AI_project/data_cvt/CO2017_Operating_Systems/Syllabus/slide_006.png",
      "page_index": 5,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-12T20:12:16+07:00"
    }
  },
  "-syllabus-raw-0000": {
    "id": "-syllabus-raw-0000",
    "text": "DCMH.CO2017_Operating Systems 21/11/2022, 16:04 hoc Lam bai tap ren luyén  Review the main content of the subject's knowledge Do exercise) 7. Yeu cau khäc vé hoc phan (Other course requirements and expectations) 8. Bien soan va cap nhat de cuong (Editing information)  Dé cuong duoc bién soan vao nam hoc hoc ky (Syllabus edited in year-semester): 20221  Dé cuong duoc chinh sura lan thu (Editing version) : DCMH.CO2017.6.1 - Noi dung duoc chinh sua, cap nhat, thay doi ö lan gan nhat (The latest editing content) : -- -- Tp.H6 Chi Minh, ngay 21 thang 11 nam 2022 HCM City, November 21 2022 TRUONG KHOA CHU NHIEM BO MON CB PHU TRACH LAP DE CUONG (Dean) Head of Department (Lecturer in-charge) 268 Ly Thuong Kiét,Phuong 14,Quan 10,TP.HCM 268 Ly Thuong Kiet St., Ward 14, Dist. 10, Ho Chi Minh City, Vietnam Dién thoai: 028 3864 7256 Phone: 028 3864 7256 www.hcmut.edu.vn www.hcmut.edu.vn https://mybk.hcmut.edu.vn/app/he-thong-quan-ly-dao-tao/ctdt/dcmh/editor Page 6 of 6",
    "metadata": {
      "doc_type": "syllabus",
      "course_id": "",
      "source_file": "/mnt/d/Project_and_Assignment/AI_project/data_cvt/CO2017_Operating_Systems/Syllabus/slide_006.png",
      "page_index": 5,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-12T20:12:16+07:00"
    }
  },
  "-syllabus-raw-0001": {
    "id": "-syllabus-raw-0001",
    "text": "o Stu: Doc sach giao khoa, Sinh vién lam bai tap rén luyén tai lóp, bai tap thuc hanh (About Memory Read textbooks, Students do exercises in class, practice - Introduction to real memory and addressing types exercises) - The problem of granting continuous memory space - Strategies for contiguous memory space allocation 7 Giói thiéu vé ky thuat phan trang, phan doan  L.0.1.3 [A.0.1 , A.0.4] - Phan trang o Lec: Giang day va trao dói trén l6p - Phan doan (Teaching and exchanging in class.) - Két hop phan trang va phan doan o Stu: Doc sach giao khoa, Sinh vién lam bai tap ren luyén (Introduction to paging and segmentation techniques tai lóp, bai tap thuc hanh - Pagination Read textbooks, Students do exercises in class, practice - Segment exercises) - Combine pagination and segmentation) 8 Thay trang nh6  L.0.1.3 [A.0.1 , A.0.4] - Cäc giai thuat thay trang  Lec: Giang day va trao di trén l6p - Cac chién luoc cap phat fram Teaching and exchanging in class.) o Stu: Doc sach giao khoa, Sinh vién lam bai tap ren luyén (Change memory page tai lóp, bai tap thuc hanh - Algorithms to change pages (Read textbooks, Students do exercises in class, practice - Frame allocation strategies) exercises) 9 Hé thóng tap tin * L.0.2.2 [A.0.5 , A.0.1 ] - Giao dién hé thng tap tin  Lec: Giang day va trao dói trén l6p - Hién thuc hé thong tap tin (Teaching and exchanging in class) Hé thng luu trú thú cap o Stu: Doc sach giao khoa, Sinh vién lam bai tap ren luyén - Giói thiéu vé giái thuat dinh thi dia tai lóp, bai tap thuc hanh Read textbooks, Students do exercises in class, practice",
    "metadata": {
      "doc_type": "syllabus",
      "course_id": "",
      "source_file": "/mnt/d/Project_and_Assignment/AI_project/data_cvt/CO2017_Operating_Systems/Syllabus/slide_005.png",
      "page_index": 4,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-12T20:12:10+07:00"
    }
  },
  "-syllabus-raw-0002": {
    "id": "-syllabus-raw-0002",
    "text": "h vién lam bai tap ren luyén - Giói thiéu vé giái thuat dinh thi dia tai lóp, bai tap thuc hanh Read textbooks, Students do exercises in class, practice (File system exercises) - File system interface - File system implementation Secondary storage system - Introduction to disk timing algorithm) 10 On tap * L.0.3.1 [A.0.1 , A.0.4] 1  Lec: Thuyét giang Review) (Preach)  Stu: Nghe giang Listen to lectures L.0.1.1 [A.0.1 ,A.0.4 ]  Lec: Giang vién ra dé bai tap n tap (The teacher gives the topic of review exercises) o Stu: On tap phan nöi dung chinh kién thúc cüa mn https://mybk.hcmut.edu.vn/app/he-thong-quan-ly-dao-tao/ctdt/dcmh/editor Page 5 of 6",
    "metadata": {
      "doc_type": "syllabus",
      "course_id": "",
      "source_file": "/mnt/d/Project_and_Assignment/AI_project/data_cvt/CO2017_Operating_Systems/Syllabus/slide_005.png",
      "page_index": 4,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-12T20:12:10+07:00"
    }
  },
  "CO2017-chapter-0-slide-000-0000": {
    "id": "CO2017-chapter-0-slide-000-0000",
    "text": "Operating Systems Introduction Tran, Van Hoai Faculty of Computer Science & Engineering HCMC University of Technology E-mail: hoai@hcmut.edu.vn based on slides of Le Thanh Van 2020-2021/Semester 2 590 1/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_001.png",
      "page_index": 0,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:00:36+07:00"
    }
  },
  "CO2017-chapter-0-slide-001-0000": {
    "id": "CO2017-chapter-0-slide-001-0000",
    "text": "Outline 1 Common knowledge on operating systems? 2 Course description 3 Important course information 4 Basic concepts & Questions 2/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_002.png",
      "page_index": 1,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:00:38+07:00"
    }
  },
  "CO2017-chapter-0-slide-002-0000": {
    "id": "CO2017-chapter-0-slide-002-0000",
    "text": "Outline 1 Common knowledge on operating systems? 2 Course description Important course information 4 Basic concepts & Questions 3/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_003.png",
      "page_index": 2,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:00:39+07:00"
    }
  },
  "CO2017-chapter-0-slide-003-0000": {
    "id": "CO2017-chapter-0-slide-003-0000",
    "text": "Which ones are OS? Microsoft Office Dropbox Microsoft Windows Android Google Mail ios Google Drive Amazon Web Services iCloud tinyOS Firmware on home wifi Mac OSX routers Cisco Internetwork UNIX Operating System 4/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_004.png",
      "page_index": 3,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:00:41+07:00"
    }
  },
  "CO2017-chapter-0-slide-004-0000": {
    "id": "CO2017-chapter-0-slide-004-0000",
    "text": "Which ones are OS? Microsoft Office Dropbox Microsoft Windows  Android Which ones can be considered as an operating system (in non-IT context) ? A traffic policeman? A government? routers  Cisco Internetwork UNIX Operating System 5/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_005.png",
      "page_index": 4,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:00:44+07:00"
    }
  },
  "CO2017-chapter-0-slide-005-0000": {
    "id": "CO2017-chapter-0-slide-005-0000",
    "text": "Which ones are OS? Microsoft Office  Dropbox Microsoft Windows  Android Which ones can be considered as an operating system (ir non-IT context ?  A traffic policeman? (only a security function)  A government? (full of functions) routers Cisco Internetwork UNIX Operating System 6/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_006.png",
      "page_index": 5,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:00:46+07:00"
    }
  },
  "CO2017-chapter-0-slide-006-0000": {
    "id": "CO2017-chapter-0-slide-006-0000",
    "text": "OS tree MWindows95 MS MWindows98 Windows10 An MS-DOS Operating systems windows 9.x Windows NT Windows 2000 kerne1 kerne1 System \"Classic\"Mac Mac System Software 1.0 Family Tree systems to Mac 0S 9 debian ubuntu Linux UNIX. Mint Exec kerne1 fedora redhat. - UNIX kerne1 AMiGAOS Mach kernel Linux kernel GNU software Scientific Linu 4CentOS Gentoo QNX kerne1 SUSE 0 \"ANX BSD kernel XNU kerne1 15 archlinux Chrome OS SunOS NetBSD DarwinOS FreeBSD OpenDarwin x PureDarwin solaris OS DragonFlyBSD Designed by Ethan Gates OpenBsD 10/2018 osX/macos 7/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_007.png",
      "page_index": 6,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:00:53+07:00"
    }
  },
  "CO2017-chapter-0-slide-007-0000": {
    "id": "CO2017-chapter-0-slide-007-0000",
    "text": "OS Market Share 8/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_008.png",
      "page_index": 7,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:00:54+07:00"
    }
  },
  "CO2017-chapter-0-slide-008-0000": {
    "id": "CO2017-chapter-0-slide-008-0000",
    "text": "Outline Common knowledge on operating systems? 2 Course description 3 Important course information 4 Basic concepts & Questions 9/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_009.png",
      "page_index": 8,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:00:56+07:00"
    }
  },
  "CO2017-chapter-0-slide-009-0000": {
    "id": "CO2017-chapter-0-slide-009-0000",
    "text": "Course objectives To convey the knowledges and skills of computer operating systems to those who attend the course, including Basic structure, main functions of operating systems of a modern computer Concurrent Processes, Mutual Exclusion and Synchronization of concurrent process, Process scheduling, Memories, Virtual Memory, Pages, Segmentation, Pages Replacement, Files systems, journaling, Virtual Machine Monitor, Security and Protection.  Lab works will strengthen the theory given by lectures (C/C++, Python) 10/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_010.png",
      "page_index": 9,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:00:58+07:00"
    }
  },
  "CO2017-chapter-0-slide-010-0000": {
    "id": "CO2017-chapter-0-slide-010-0000",
    "text": "Course content (1) Ch.1: Introduction to operating systems Ch.2: Process management Concepts Process scheduling Interprocess communication Ch.3: Process synchronization  Synchronization  Deadlock handling Ch.4: Memory management  Virtual memory Ch.5: 1/0 management Ch.6: File systems Ch.7: Security and Protection Ch.8: Advanced topics  Some modern OS examples  Computer networks and distributed systems 11/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_011.png",
      "page_index": 10,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:00+07:00"
    }
  },
  "CO2017-chapter-0-slide-011-0000": {
    "id": "CO2017-chapter-0-slide-011-0000",
    "text": "(2) Course content Operating System Concepts Process Memory Storage Distributed Case management management management systems studies Processes Main File system Protection & Linux memory interface security Threads Windows OSs Virtual File system Special CPU memory implementation purpose scheduling systems Mass storages Process structure synchronization l/0 systems Deadlocks 12/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_012.png",
      "page_index": 11,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:04+07:00"
    }
  },
  "CO2017-chapter-0-slide-012-0000": {
    "id": "CO2017-chapter-0-slide-012-0000",
    "text": "earning outcomes After completing this course, students will be able: 13/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_013.png",
      "page_index": 12,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:05+07:00"
    }
  },
  "CO2017-chapter-0-slide-013-0000": {
    "id": "CO2017-chapter-0-slide-013-0000",
    "text": "Learning outcomes After completing this course, students will be able: L.O.1 Define the functionality that a modern operating system must deliver to meet a particular need 14/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_014.png",
      "page_index": 13,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:07+07:00"
    }
  },
  "CO2017-chapter-0-slide-014-0000": {
    "id": "CO2017-chapter-0-slide-014-0000",
    "text": "Learning outcomes After completing this course, students will be able: L.O.1 Define the functionality that a modern operating system must deliver to meet a particular need. L.O.2 Apply mechanisms that are useful to realize concurrent systems and describe the benefits of each 15/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_015.png",
      "page_index": 14,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:08+07:00"
    }
  },
  "CO2017-chapter-0-slide-015-0000": {
    "id": "CO2017-chapter-0-slide-015-0000",
    "text": "Learning outcomes After completing this course, students will be able: L.O.1 Define the functionality that a modern operating system must deliver to meet a particular need L.O.2 Apply mechanisms that are useful to realize concurrent systems and describe the benefits of each. L.0.3 Compare and contrast the common algorithms used for both preemptive and non-preemptive scheduling of tasks in operating systems. 16/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_016.png",
      "page_index": 15,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:10+07:00"
    }
  },
  "CO2017-chapter-0-slide-016-0000": {
    "id": "CO2017-chapter-0-slide-016-0000",
    "text": "Learning outcomes After completing this course, students will be able: L.O.1 Define the functionality that a modern operating system must deliver to meet a particular need. L.O.2 Apply mechanisms that are useful to realize concurrent systems and describe the benefits of each L.0.3 Compare and contrast the common algorithms used for both preemptive and non-preemptive scheduling of tasks in operating systems. L.O.4 Explain virtual memory and its realization in hardware and software. 17/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_017.png",
      "page_index": 16,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:13+07:00"
    }
  },
  "CO2017-chapter-0-slide-017-0000": {
    "id": "CO2017-chapter-0-slide-017-0000",
    "text": "Learning outcomes After completing this course, students will be able: L.O.1 Define the functionality that a modern operating system must deliver to meet a particular need. L.O.2 Apply mechanisms that are useful to realize concurrent systems and describe the benefits of each L.0.3 Compare and contrast the common algorithms used for both preemptive and non-preemptive scheduling of tasks in operating systems. L.O.4 Explain virtual memory and its realization in hardware and software. L.0.5 Compare and contrast different approaches to file organization, recognizing the strengths and weaknesses of each. 18/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_018.png",
      "page_index": 17,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:15+07:00"
    }
  },
  "CO2017-chapter-0-slide-018-0000": {
    "id": "CO2017-chapter-0-slide-018-0000",
    "text": "What are you expected ? Your knowledge will be measured in a quantitative manner. 19/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_019.png",
      "page_index": 18,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:16+07:00"
    }
  },
  "CO2017-chapter-0-slide-019-0000": {
    "id": "CO2017-chapter-0-slide-019-0000",
    "text": "Your knowledge will be measured in a quantitative manner. Putting infornation tagether CREATING EVALUATING Making judgements based on  41 2 lli THIHE ANALYZING Breaking the concept into pa related to one another APPLYING Use the knowledge ga new ways I Makingsense ofthemate UNDERSTANDING you have learned REMEMBERING From long term memory source:blog.newsela.com source: wikipedia.org 20/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_020.png",
      "page_index": 19,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:20+07:00"
    }
  },
  "CO2017-chapter-0-slide-020-0000": {
    "id": "CO2017-chapter-0-slide-020-0000",
    "text": "Required/Applied by this course Which ones to be required by this course ?  Hardware aspects: Computer architecture?!?!?! Software aspects: C/C++ programming is recommended! = 21/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_021.png",
      "page_index": 20,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:22+07:00"
    }
  },
  "CO2017-chapter-0-slide-021-0000": {
    "id": "CO2017-chapter-0-slide-021-0000",
    "text": "Required/Applied by this course Which ones to be required by this course ?  Hardware aspects: Computer architecture?!?!?! Software aspects: C/C++ programming is recommended! Which ones to be applied by this course ?  Computer network  Big Data  Advanced OS, mobile Security systems Real-time systems High performance Web programming computing Distributed systems Software engineering 22/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_022.png",
      "page_index": 21,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:25+07:00"
    }
  },
  "CO2017-chapter-0-slide-022-0000": {
    "id": "CO2017-chapter-0-slide-022-0000",
    "text": "Outline 1 Common knowledge on operating systems? 2 Course description 3 Important course information 4 Basic concepts & Questions 23/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_023.png",
      "page_index": 22,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:26+07:00"
    }
  },
  "CO2017-chapter-0-slide-023-0000": {
    "id": "CO2017-chapter-0-slide-023-0000",
    "text": "Course materials Silberschatz et al, \"Operating System Concepts\", 9th Ed.. 2012 (Electronic Version). 24/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_024.png",
      "page_index": 23,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:27+07:00"
    }
  },
  "CO2017-chapter-0-slide-024-0000": {
    "id": "CO2017-chapter-0-slide-024-0000",
    "text": "Course materials Silberschatz et al, \"Operating System Concepts\", 9th Ed., 2012 (Electronic Version). Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau, 'Operating Systems: Three Easy Pieces\", 0.91v, 2014. Website: http://pages.cs.wisc.edu/remzi/0STEP/ 25/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_025.png",
      "page_index": 24,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:29+07:00"
    }
  },
  "CO2017-chapter-0-slide-025-0000": {
    "id": "CO2017-chapter-0-slide-025-0000",
    "text": "Course evaluation Final Exam 50% 80-90 Minutes, multiple-choices (tentative) Assig. & Project 30% Lab 10% Quiz 10% 15 Minutes (could be many times) 26/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_026.png",
      "page_index": 25,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:31+07:00"
    }
  },
  "CO2017-chapter-0-slide-026-0000": {
    "id": "CO2017-chapter-0-slide-026-0000",
    "text": "Important course notice Presence checks 5 times or more randomly course presence checks: absence for more than 3 times will be prohibited (Grade F) University regulation \"24.1 Cac hinh thüc ky luat : c. Cám thi va nhan diém cám ...., áp dung vói möt trong cäc Ii sau:  Vi pham cäc quy dinh trong quä trinh hoc: ...Väng mat (c6 ly do hoac khng có ly do) quá 20% s gi l@n lóp cúa mön hoc. 27/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_027.png",
      "page_index": 26,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:34+07:00"
    }
  },
  "CO2017-chapter-0-slide-027-0000": {
    "id": "CO2017-chapter-0-slide-027-0000",
    "text": "Outline Common knowledge on operating systems? 2 Course description 3Important course information 4 Basic concepts & Questions 28/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_028.png",
      "page_index": 27,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:35+07:00"
    }
  },
  "CO2017-chapter-0-slide-028-0000": {
    "id": "CO2017-chapter-0-slide-028-0000",
    "text": "Basic concepts - What is a system? An assemblage of objects so combined by nature or human as to form an integral unit A regularly interacting or interdependent group of objects forming a unified whole Webster's Dictionary A combination of components/objects that act together to perform a function not possible with any of the individual parts IEEE Standard Dictionary of Electrical and Electronic Terms 590 29/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_029.png",
      "page_index": 28,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:38+07:00"
    }
  },
  "CO2017-chapter-0-slide-029-0000": {
    "id": "CO2017-chapter-0-slide-029-0000",
    "text": "Basic concepts - What is a system? An assemblage of objects so combined by nature or human as to form an integral unit A regularly interacting or interdependent group of objects forming a unified whole Webster's Dictionary A combination of components/objects that act together to perform a function not possible with any of the individual parts IEEE Standard Dictionary of Electrical and Electronic Terms Two major features 1 A system consists of interacting objects/components  A system is associated with a function/work that it performs 290 30/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_030.png",
      "page_index": 29,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:41+07:00"
    }
  },
  "CO2017-chapter-0-slide-030-0000": {
    "id": "CO2017-chapter-0-slide-030-0000",
    "text": "Why do we study this course short-term Common guestions 31/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_031.png",
      "page_index": 30,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:43+07:00"
    }
  },
  "CO2017-chapter-0-slide-031-0000": {
    "id": "CO2017-chapter-0-slide-031-0000",
    "text": "Why do we study this course short-term Common questions  Is it useful for other courses ? 32/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_032.png",
      "page_index": 31,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:44+07:00"
    }
  },
  "CO2017-chapter-0-slide-032-0000": {
    "id": "CO2017-chapter-0-slide-032-0000",
    "text": "Why do we study this course short-term Common questions Is it useful for other courses ? How to use this for other courses ? 33/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_033.png",
      "page_index": 32,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:46+07:00"
    }
  },
  "CO2017-chapter-0-slide-033-0000": {
    "id": "CO2017-chapter-0-slide-033-0000",
    "text": "Why do we study this course short-term Common questions Is it useful for other courses ? How to use this for other courses ? Is it easy to achieve high grade ? 34/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_034.png",
      "page_index": 33,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:47+07:00"
    }
  },
  "CO2017-chapter-0-slide-034-0000": {
    "id": "CO2017-chapter-0-slide-034-0000",
    "text": "Why do we study this course short-term) Common questions Is it useful for other courses ? How to use this for other courses ? Is it easy to achieve high grade ? Is it easy to remember the knowledge of this course ? 35/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_035.png",
      "page_index": 34,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:48+07:00"
    }
  },
  "CO2017-chapter-0-slide-035-0000": {
    "id": "CO2017-chapter-0-slide-035-0000",
    "text": "Why do we study this course short-term Common questions Is it useful for other courses ? How to use this for other courses ? Is it easy to achieve high grade ? Is it easy to remember the knowledge of this course ? 36/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_036.png",
      "page_index": 35,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:50+07:00"
    }
  },
  "CO2017-chapter-0-slide-036-0000": {
    "id": "CO2017-chapter-0-slide-036-0000",
    "text": "Why do we study this course (long-term Common guestions on career 37/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_037.png",
      "page_index": 36,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:51+07:00"
    }
  },
  "CO2017-chapter-0-slide-037-0000": {
    "id": "CO2017-chapter-0-slide-037-0000",
    "text": "Why do we study this course (long-term) Common questions on career  to be used in engineering tasks ? = 38/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_038.png",
      "page_index": 37,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:53+07:00"
    }
  },
  "CO2017-chapter-0-slide-038-0000": {
    "id": "CO2017-chapter-0-slide-038-0000",
    "text": "Why do we study this course (long-term) Common questions on career to be used in engineering tasks ? to earn much money ? 39/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_039.png",
      "page_index": 38,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:54+07:00"
    }
  },
  "CO2017-chapter-0-slide-039-0000": {
    "id": "CO2017-chapter-0-slide-039-0000",
    "text": "Why do we study this course (long-term Common questions on career to be used in engineering tasks ? to earn much money ? to be used in research ? 40/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_040.png",
      "page_index": 39,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:56+07:00"
    }
  },
  "CO2017-chapter-0-slide-040-0000": {
    "id": "CO2017-chapter-0-slide-040-0000",
    "text": "Why do we study this course (long-term) Common questions on career to be used in engineering tasks ? to earn much money ? to be used in research ?  How to be used in engineering ? 41/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_041.png",
      "page_index": 40,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:57+07:00"
    }
  },
  "CO2017-chapter-0-slide-041-0000": {
    "id": "CO2017-chapter-0-slide-041-0000",
    "text": "Why do we study this course (long-term) Common questions on career to be used in engineering tasks ? to earn much money ? to be used in research ? How to be used in engineering ? How to achieve economical benefits ? 42/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_042.png",
      "page_index": 41,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:01:59+07:00"
    }
  },
  "CO2017-chapter-0-slide-042-0000": {
    "id": "CO2017-chapter-0-slide-042-0000",
    "text": "Experiences of professionals around the world Prof. John Regehr, University of Utah, USA  Some students are incapable of or uninterested in implementing new OS But they can learn from OS course: concurrency, resource management, contention resolution, computer system design 43/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_043.png",
      "page_index": 42,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:02:01+07:00"
    }
  },
  "CO2017-chapter-0-slide-043-0000": {
    "id": "CO2017-chapter-0-slide-043-0000",
    "text": "Happy new lunar year and let's work hard :-) Cisic statcounter 44/44",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_044.png",
      "page_index": 43,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:02:03+07:00"
    }
  },
  "CO2017-chapter-1-slide-044-0000": {
    "id": "CO2017-chapter-1-slide-044-0000",
    "text": "Computer system organization Tran, Van Hoai Faculty of Computer Science & Engineering HCMC University of Technology E-mail: hoai@hcmut.edu.vn (partly based on slides of Le Thanh Van) 1/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_001.png",
      "page_index": 44,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:02:04+07:00"
    }
  },
  "CO2017-chapter-1-slide-045-0000": {
    "id": "CO2017-chapter-1-slide-045-0000",
    "text": "Outline 1 What is operating system ? 2 Computer system organization  Computer system operation l/0 structure Storage structure Resource protection Kernel data structures 2/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_002.png",
      "page_index": 45,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:02:06+07:00"
    }
  },
  "CO2017-chapter-1-slide-046-0000": {
    "id": "CO2017-chapter-1-slide-046-0000",
    "text": "Outline 1 What is operating system ? 2 Computer system organization  Computer system operation l/0 structure 1 Storage structure Resource protection  Kernel data structures 3/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_003.png",
      "page_index": 46,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:02:08+07:00"
    }
  },
  "CO2017-chapter-1-slide-047-0000": {
    "id": "CO2017-chapter-1-slide-047-0000",
    "text": "Basic concepts Operating system = Operating + system 590 4/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_004.png",
      "page_index": 47,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:02:09+07:00"
    }
  },
  "CO2017-chapter-1-slide-048-0000": {
    "id": "CO2017-chapter-1-slide-048-0000",
    "text": "Basic concepts Operating system  Operating + system Systems can be human resources a computer hardware organization 5/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_005.png",
      "page_index": 48,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:02:10+07:00"
    }
  },
  "CO2017-chapter-1-slide-049-0000": {
    "id": "CO2017-chapter-1-slide-049-0000",
    "text": "Basic concepts Operating system  Operating + system ex macHina WHaT HaPPP  mE IF 1 FaIL yOUr TeST? Systems can be human resources a computer hardware organization An operating system? 6/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_006.png",
      "page_index": 49,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:02:12+07:00"
    }
  },
  "CO2017-chapter-1-slide-050-0000": {
    "id": "CO2017-chapter-1-slide-050-0000",
    "text": "OS - A manager Operating system is like a perfect manager which manages resources. 7/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_007.png",
      "page_index": 50,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:02:14+07:00"
    }
  },
  "CO2017-chapter-1-slide-051-0000": {
    "id": "CO2017-chapter-1-slide-051-0000",
    "text": "OS - A manager Operating system is like a perfect manager which manages resources. Users Operating system Resources 8/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_008.png",
      "page_index": 51,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:02:15+07:00"
    }
  },
  "CO2017-chapter-1-slide-052-0000": {
    "id": "CO2017-chapter-1-slide-052-0000",
    "text": "OS - A manager Operating system is like a perfect manager which manages resources. user user user user 2 3 Users compiler assembler text editor database system in Computer Operating system system and application programs System Resources operating system computer hardware 9/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_009.png",
      "page_index": 52,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:02:17+07:00"
    }
  },
  "CO2017-chapter-1-slide-053-0000": {
    "id": "CO2017-chapter-1-slide-053-0000",
    "text": "OS - A manager Operating system is like a perfect manager which manages resources. user user user user 2 Users compiler assembler text editor I  database Design issues An OS is designed not only to \"serve\" users, but also to \"serve\" users well in terms of Convenience Efficiency 10/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_010.png",
      "page_index": 53,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:02:20+07:00"
    }
  },
  "CO2017-chapter-1-slide-054-0000": {
    "id": "CO2017-chapter-1-slide-054-0000",
    "text": "OS - A manager Operating system is like a perfect manager which manages resources. user user user user 2 Users compiler assembler text editor I  database Design issues An OS is designed not only to \"serve\" users, but also to \"serve\" users well in terms of Convenience Efficiency Example: Mobile operating system What do users expect for a mobile operating system? (Let's think!!!) 11/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_011.png",
      "page_index": 54,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:02:23+07:00"
    }
  },
  "CO2017-chapter-1-slide-055-0000": {
    "id": "CO2017-chapter-1-slide-055-0000",
    "text": "Definition Operating system being a basis for application programs acting as an intermediary between the computer user and the computer hardware 590 12/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_012.png",
      "page_index": 55,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:02:25+07:00"
    }
  },
  "CO2017-chapter-1-slide-056-0000": {
    "id": "CO2017-chapter-1-slide-056-0000",
    "text": "Definition Operating system being a basis for application programs acting as an intermediary between the computer user and the computer hardware User view System view 590 13/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_013.png",
      "page_index": 56,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:02:26+07:00"
    }
  },
  "CO2017-chapter-1-slide-057-0000": {
    "id": "CO2017-chapter-1-slide-057-0000",
    "text": "Definition Operating system  being a basis for application programs acting as an intermediary between the computer user and the computer hardware User view System view  User view varies according to the interface Type of computers influences the design aspects Personal computer: easy of use > resource utilization Computing Server: easy of use < resource utilization Shared Server: easy of use  resource utilization 14/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_014.png",
      "page_index": 57,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:02:28+07:00"
    }
  },
  "CO2017-chapter-1-slide-058-0000": {
    "id": "CO2017-chapter-1-slide-058-0000",
    "text": "Definition Operating system  being a basis for application programs acting as an intermediary between the computer user and the computer hardware User view System view  User view varies according  OS as a resource allocator to the interface or a control program to Type of computers manage various l/O influences the design devices and user programs aspects OS = kernel + system Personal computer: easy of use > resource utilization programs Computing Server: easy of use < resource utilization Shared Server: easy of use  resource utilization 15/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_015.png",
      "page_index": 58,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:02:31+07:00"
    }
  },
  "CO2017-chapter-1-slide-059-0000": {
    "id": "CO2017-chapter-1-slide-059-0000",
    "text": "Outline 1 What is operating system ? 2 Computer system organization  Computer system operation I/0 structure Storage structure Resource protection Kernel data structures 590 16/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_016.png",
      "page_index": 59,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:02:33+07:00"
    }
  },
  "CO2017-chapter-1-slide-060-0000": {
    "id": "CO2017-chapter-1-slide-060-0000",
    "text": "Modern computer system nouse keyboard printer monitor disks on-lno CPU disk USBcontroller graphics controller adapter memory 590 17/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_017.png",
      "page_index": 60,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:02:35+07:00"
    }
  },
  "CO2017-chapter-1-slide-061-0000": {
    "id": "CO2017-chapter-1-slide-061-0000",
    "text": "Modern computer system nouse keyboard printer monitor disks on-lin CPU disk usB controller graphics controller adapter memory  When computer is powered up (or rebooted): bootstrap 1 program is an initial program (stored in ROM or EEPROM 1.1 to initialize all system aspects (registers, devices, ... 1.2 to load operating system (kernel) into memory and to start executing the system 18/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_018.png",
      "page_index": 61,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:02:37+07:00"
    }
  },
  "CO2017-chapter-1-slide-062-0000": {
    "id": "CO2017-chapter-1-slide-062-0000",
    "text": "Modern computer system nouse keyboard printer monitor disks CPU disk USB controller graphics controller adapter memory  When computer is powered up (or rebooted): bootstrap 1 program is an initial program (stored in ROM or EEPROM 1.1 to initialize all system aspects (registers, devices, ... 1.2 to load operating system (kernel) into memory and to start executing the system 2 When being executed, kernel 2.1 to load system programs and execute them as system daemons 2.2 to wait for events 19/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_019.png",
      "page_index": 62,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:02:40+07:00"
    }
  },
  "CO2017-chapter-1-slide-063-0000": {
    "id": "CO2017-chapter-1-slide-063-0000",
    "text": "Event detection More and more devices connecting to CPU: keyboard, mouse, screen, disk drives, printer, scanner, sound card etc. Device occasionally need CPU service: but can't predict when Time between events should be busy time of CPU 20/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_020.png",
      "page_index": 63,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:02:41+07:00"
    }
  },
  "CO2017-chapter-1-slide-064-0000": {
    "id": "CO2017-chapter-1-slide-064-0000",
    "text": "Event detection More and more devices connecting to CPU: keyboard, mouse, screen, disk drives, printer, scanner, sound card, etc. Device occasionally need CPU service: but can't predict when  Time between events should be busy time of CPU Need a way for CPU to find out devices requiring attention Attentions are detected by (i) interrupt (ii) polling 21/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_021.png",
      "page_index": 64,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:02:44+07:00"
    }
  },
  "CO2017-chapter-1-slide-065-0000": {
    "id": "CO2017-chapter-1-slide-065-0000",
    "text": "Event detection More and more devices connecting to CPU: keyboard, mouse, screen, disk drives, printer, scanner, sound card, etc. Device occasionally need CPU service: but can't predict when  Time between events should be busy time of CPU Need a way for CPU to find out devices requiring attention Attentions are detected by (i) interrupt (ii) polling Polling \"Polling is like picking up your phone every few seconds to see if you have a call. E 22/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_022.png",
      "page_index": 65,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:02:46+07:00"
    }
  },
  "CO2017-chapter-1-slide-066-0000": {
    "id": "CO2017-chapter-1-slide-066-0000",
    "text": "Interrupt mechanism (1) Interrupt An event is signaled by an interrupt from  Hardware: sending a signal to CPU, thru system bus  Software: executing a special operation, called system call 590 23/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_023.png",
      "page_index": 66,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:02:48+07:00"
    }
  },
  "CO2017-chapter-1-slide-067-0000": {
    "id": "CO2017-chapter-1-slide-067-0000",
    "text": "Interrupt mechanism (1) Interrupt An event is signaled by an interrupt from  Hardware: sending a signal to CPU, thru system bus  Software: executing a special operation, called system call  When an interrupt occurs, a generic routine is called to check handle_IRQ_evont() interrupt information. Return Hardware address of interrupted instructions ocessor interrupts the kernel Is there an interrup run all interrup handler on this line? hanc ers on this line must be stored in system stack nterrupt contro no do_IRQ() eturn to the Then the control is transfered to ret_irom_intr() kernel code that was interrupted interrupt-specific handler (or Processo interrupt handler). An interrupt vector keeps addresses to interrupt handlers 24/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_024.png",
      "page_index": 67,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:02:51+07:00"
    }
  },
  "CO2017-chapter-1-slide-068-0000": {
    "id": "CO2017-chapter-1-slide-068-0000",
    "text": "Interrupt mechanism (2) Storage Fast ALU Cache RAM CPU CPU user process executing l/Ointerrupt processing 1/0 idle Hard Drive device transferring IDE Bus Video Card Network Card Keyboard I/0 transfer I/0 transfer USB Mouse request done request done Slow Serial Port Storage Interrupt timeline for a single process doing output Programmable interrupt controller (PIC) E 8259A chip 25/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_025.png",
      "page_index": 68,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:02:55+07:00"
    }
  },
  "CO2017-chapter-1-slide-069-0000": {
    "id": "CO2017-chapter-1-slide-069-0000",
    "text": "Interrupt mechanism (2) Storage Fast ALU Cache RAM CPU CPU user process ory Bu executing I/O interrupt processing 1/0 idle Hard Drive device transferring DE Bu Video Card Network Card Keyboard I/0 transfer I/0 transfer USB Mouse request done request done Slow Serial Port Storage 1/0 Interrupt timeline for a single process doing output Programmable interrupt controller (PIC) E 8259A chip Types of interrupts Program: arithmetic overflow, division by zero, invalid memory access Timer: CPU performs a task periodically 1/0: finish of an 1/0 operation, failures in I/0 operation Hardward failure: power failure, memory parity Trap (software interrupt): a system call 26/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_026.png",
      "page_index": 69,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:02:59+07:00"
    }
  },
  "CO2017-chapter-1-slide-070-0000": {
    "id": "CO2017-chapter-1-slide-070-0000",
    "text": "I/O r methods by interrupt requesting process user waiting- requesting process user device driver device driver kernel interrupt handler  interrupt handler kernel hardware hardware data transfer data transfer time time (a) (b) Control returns to user Control returns to user program without waiting program only upon l/0 for I/0 completion completion System call - request to the operating system to  No simultaneous I/O allow user to wait for l/O completion processing Device-status table contains entry for each l/0 device indicating its type, address, and state Operating system indexes into I/O device table to determine device status and to modify table entry to include interrupt   : = 27/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_027.png",
      "page_index": 70,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:03:03+07:00"
    }
  },
  "CO2017-chapter-1-slide-071-0000": {
    "id": "CO2017-chapter-1-slide-071-0000",
    "text": "Device status table device:card reader 1 status: idle device: line printer 3 request for status: busy line printer address: 38546 device:disk unit 1 length: 1372 status: idle device: disk unit 2 status: idle device: disk unit 3 status: busy request for request for disk unit 3 disk unit 3 file:xxx file: yyy operation:read operation:write address: 43046 address: 03458 length: 20000 length: 500 590 28/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_028.png",
      "page_index": 71,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:03:06+07:00"
    }
  },
  "CO2017-chapter-1-slide-072-0000": {
    "id": "CO2017-chapter-1-slide-072-0000",
    "text": "Direct memory access FPO Device controller transfers blocks of PCle bus data from buffer storage directly to System memory main memory without CPU CPU intervention (Source: wikipedia) 29/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_029.png",
      "page_index": 72,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:03:07+07:00"
    }
  },
  "CO2017-chapter-1-slide-073-0000": {
    "id": "CO2017-chapter-1-slide-073-0000",
    "text": "Direct memory access structure Direct memory access Device controller transfers blocks of PCle bus MD DIrectGMA data from buffer storage directly to System memory main memory without CPU CPU intervention (Source: wikipedia)  Used for communication at close to memory speeds  Only interrupted per block, not per byte 30/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_030.png",
      "page_index": 73,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:03:09+07:00"
    }
  },
  "CO2017-chapter-1-slide-074-0000": {
    "id": "CO2017-chapter-1-slide-074-0000",
    "text": "Direct memory access FPG Device controller transfers blocks of PCle bus AMD DIrectGMA data from buffer storage directly to System memory main memory without CPU CPU intervention (Source: wikipedia)  Used for communication at close to memory speeds Only interrupted per block, not per byte Indirect Memory Access Direct Memory Access CPU CPU Bus Bus RAM Disk RAM Disk Controller Controller (Source: UCLA) 31/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_031.png",
      "page_index": 74,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:03:12+07:00"
    }
  },
  "CO2017-chapter-1-slide-075-0000": {
    "id": "CO2017-chapter-1-slide-075-0000",
    "text": "Storage hierarchy  morality, creativity, spontaneity. \"Hierarchies are celestial. In problem solving lack of prejudice Self-actualization acceptance offacts hell all are equal.' self-esteem, confidence,achievement, Esteem /respect of others,respect by others Nicoläs Gómez Dävila Love/Belonging friendship,family,sexual intimacy security of body,of employment,of resources, Safety of morality.of the family.of health,of property Physiologica breathing,food,water. sex.sleep,homeostasis,excretion 590 32/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_032.png",
      "page_index": 75,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:03:15+07:00"
    }
  },
  "CO2017-chapter-1-slide-076-0000": {
    "id": "CO2017-chapter-1-slide-076-0000",
    "text": "Storage hierarchy Storage systems organized in hierarchy, w.r.t Speed Capacity Volatility Cost 590 33/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_033.png",
      "page_index": 76,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:03:16+07:00"
    }
  },
  "CO2017-chapter-1-slide-077-0000": {
    "id": "CO2017-chapter-1-slide-077-0000",
    "text": "Storage hierarchy Storage systems organized in hierarchy, w.r.t. Speed Capacity Volatility Cost storage capacity access time registers cache primary storage Main memory - only large volatile storage main memory storage media that the CPU can access directly nonvolatile storage nonvolatile memory secondary storage Secondary storage - extension hard-disk drives of main memory that provides large non-volatile storage optical disk tertiary capacity storage magnetic tapes 34/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_034.png",
      "page_index": 77,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:03:19+07:00"
    }
  },
  "CO2017-chapter-1-slide-078-0000": {
    "id": "CO2017-chapter-1-slide-078-0000",
    "text": "Caching Cache A high-speed memory to hold recently-accessed data  Caching - a mechanism of copying information into faster storage system and it is controlled by a cache management policy Main memory can be viewed as a last cache for secondary storage  Data is stored in more than one level, therefore, cache should be kept consistent 35/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_035.png",
      "page_index": 78,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:03:21+07:00"
    }
  },
  "CO2017-chapter-1-slide-079-0000": {
    "id": "CO2017-chapter-1-slide-079-0000",
    "text": "Caching - Performance of various storage levels Level 1 2 3 4 5 Name registers cache main memory solid state disk magnetic disk Typical size <1 KB <16MB <64GB <1TB <10TB Implementation custom memory on-chip or CMOSSRAM flash memory magnetic disk technology withmultiple off-chip ports CMOS CMOS SRAM Access time(ns) 0.25-0.5 0.5 - 25 80-250 25,000-50,000 5,000,000 Bandwidth(MB/sec) 20,000-100,000 5,000-10,000 1,000-5,000 500 20-150 Managed by compiler hardware operating system operating system operating system Backed by cache main memory disk disk disk or tape 36/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_036.png",
      "page_index": 79,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:03:26+07:00"
    }
  },
  "CO2017-chapter-1-slide-080-0000": {
    "id": "CO2017-chapter-1-slide-080-0000",
    "text": "How a modern computer system works -instructionexecution- cache cycle instructions thread of execution and data movement data CPU (*N) l/O request interrupt data DMA memory device (*M) 590 37 / 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_037.png",
      "page_index": 80,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:03:28+07:00"
    }
  },
  "CO2017-chapter-1-slide-081-0000": {
    "id": "CO2017-chapter-1-slide-081-0000",
    "text": "Hardware protection In a multiprogrammed time-shareing system, operating system and users share hardware and software resources > We need a way to protect an error (of a user program) not cause problems to OS and other programs. 38/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_038.png",
      "page_index": 81,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:03:30+07:00"
    }
  },
  "CO2017-chapter-1-slide-082-0000": {
    "id": "CO2017-chapter-1-slide-082-0000",
    "text": "Hardware protection In a multiprogrammed time-shareing system, operating system and users share hardware and software resources  We need a way to protect an error (of a user program) not cause problems to OS and other programs. Dual-mode protection 1/0 protection Memory protection CPU protection 39/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_039.png",
      "page_index": 82,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:03:33+07:00"
    }
  },
  "CO2017-chapter-1-slide-083-0000": {
    "id": "CO2017-chapter-1-slide-083-0000",
    "text": "Dual-mode protection Execution of OS code and user-defined code must be distinguished 40/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_040.png",
      "page_index": 83,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:03:35+07:00"
    }
  },
  "CO2017-chapter-1-slide-084-0000": {
    "id": "CO2017-chapter-1-slide-084-0000",
    "text": "Dual-mode protection Execution of OS code and user-defined code must be distinguished  There are at least 2 separate modes of operation User mode - execution done on behalf of a user Kernel mode (also monitor, system, supervisor, privileged mode) - execution done on behalf of operating system 41/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_041.png",
      "page_index": 84,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:03:36+07:00"
    }
  },
  "CO2017-chapter-1-slide-085-0000": {
    "id": "CO2017-chapter-1-slide-085-0000",
    "text": "Dual-mode protection Execution of OS code and user-defined code must be distinguished  There are at least 2 separate modes of operation User mode - execution done on behalf of a user Kernel mode (also monitor, system, supervisor, privileged mode) - execution done on behalf of operating system  Mode bit added to computer hardware to indicate the current mode. user process user mode calls system call return from system call (mode bit =1) user process executing kernel trap return mode bit=0 mode bit = 1 kernel mode execute system call (mode bit = 0) Privileged instructions can be issued only in_kernel mode-, 590 42/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_042.png",
      "page_index": 85,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:03:39+07:00"
    }
  },
  "CO2017-chapter-1-slide-086-0000": {
    "id": "CO2017-chapter-1-slide-086-0000",
    "text": "l/0 protection  All l/O instructions are privileged instructions  All I/O requests are done by calling system calls Guarantee that a user program could never gain control of the computer in kernel mode Example: a user program that, as part of its execution, stores a new address in the interrupt vector 43/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_043.png",
      "page_index": 86,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:03:41+07:00"
    }
  },
  "CO2017-chapter-1-slide-087-0000": {
    "id": "CO2017-chapter-1-slide-087-0000",
    "text": "Memory protection (1)  Must provide memory protection at least for the interrupt vector and the 0 interrupt service routines monitor 256000 Two registers that determine the range job 1 of legal addresses a program may 300040 300040 access: job 2 base register Base register - holds the smallest 420940 120900 legal physical memory address limit register job 3 Limit register - contains the size of 880000 the range job 4 1024000 Memory outside the defined range is protected 44/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_044.png",
      "page_index": 87,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:03:45+07:00"
    }
  },
  "CO2017-chapter-1-slide-088-0000": {
    "id": "CO2017-chapter-1-slide-088-0000",
    "text": "Memory protection (2) base base + limit address yes yes CPU no no trap to operating system monitor-addressing error memory When executing in monitor mode, the operating system has unrestricted access to both monitor and user's memory  The load instructions for the base and limit registers are privileged instructions 45/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_045.png",
      "page_index": 88,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:03:47+07:00"
    }
  },
  "CO2017-chapter-1-slide-089-0000": {
    "id": "CO2017-chapter-1-slide-089-0000",
    "text": "CPU protection Timer - interrupts computer after specified period to ensure operating system maintains control  Timer is decremented every clock tick  When timer reaches the value 0, an interrupt occurs Timer commonly used to implement time-sharing  Load-timer is a privileged instruction 46/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_046.png",
      "page_index": 89,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:03:49+07:00"
    }
  },
  "CO2017-chapter-1-slide-090-0000": {
    "id": "CO2017-chapter-1-slide-090-0000",
    "text": "Kernel data structures  Singly linked list, Trees doubly-linked list Hash functions and Maps circularly linked list  Bitmaps Stack, queues 590 47/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_047.png",
      "page_index": 90,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:03:51+07:00"
    }
  },
  "CO2017-chapter-2-slide-091-0000": {
    "id": "CO2017-chapter-2-slide-091-0000",
    "text": "Operating system structures Tran, Van Hoai Faculty of Computer Science & Engineering HCMC University of Technology E-mail: hoai@hcmut.edu.vn (partly based on slides of Le Thanh Van) 1/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_001.png",
      "page_index": 91,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:03:54+07:00"
    }
  },
  "CO2017-chapter-2-slide-092-0000": {
    "id": "CO2017-chapter-2-slide-092-0000",
    "text": "Outline 1 Operating system services 2 System calls and programs 3 Operating system structure 4 Advanced issues 2/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_002.png",
      "page_index": 92,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:03:55+07:00"
    }
  },
  "CO2017-chapter-2-slide-093-0000": {
    "id": "CO2017-chapter-2-slide-093-0000",
    "text": "Outline 1  Operating system services 2 System calls and programs 3Operating system structure 4 Advanced issues 3/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_003.png",
      "page_index": 93,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:03:56+07:00"
    }
  },
  "CO2017-chapter-2-slide-094-0000": {
    "id": "CO2017-chapter-2-slide-094-0000",
    "text": "Operating system services user and other system programs GUI batch command line user interfaces systerm calls program I/0 file communication resource accounting execution operations systems allocation protection error detection and security services operating system hardware 4/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_004.png",
      "page_index": 94,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:03:59+07:00"
    }
  },
  "CO2017-chapter-2-slide-095-0000": {
    "id": "CO2017-chapter-2-slide-095-0000",
    "text": "Operating system services user and other system programs GUI batch command line user interfaces systerm calls program I/0 file communication resource accounting execution operations systems allocation protection error and detection security services operating system hardware  Functional services  Non-functional services 5/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_005.png",
      "page_index": 95,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:04:01+07:00"
    }
  },
  "CO2017-chapter-2-slide-096-0000": {
    "id": "CO2017-chapter-2-slide-096-0000",
    "text": "Operating system services user and other system programs GUI batch command line user interfaces system calls program I/0 file communication resource operations allocation accounting execution systems protection error and detection services security operating system hardware  Functional services Non-functional services User interface (Graphical User Interface, Resource allocation, Batch Interface, Command Line Interface). Accounting, Protection Program execution, I/0 operations, and Security File-system manipulation, Communications, Error detection 6/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_006.png",
      "page_index": 96,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:04:05+07:00"
    }
  },
  "CO2017-chapter-2-slide-097-0000": {
    "id": "CO2017-chapter-2-slide-097-0000",
    "text": "Functional services Program execution What is a program ? A computer program is a collection of instructions that performs a specific task when executed by a computer 7/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_007.png",
      "page_index": 97,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:04:06+07:00"
    }
  },
  "CO2017-chapter-2-slide-098-0000": {
    "id": "CO2017-chapter-2-slide-098-0000",
    "text": "Functional services Program execution What is a program ? A computer program is a collection of instructions that performs a specific task when executed by a computer  OS is able to load a program into memory and to run that program  The program is able to end its execution (either normally or abnormally) 8/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_008.png",
      "page_index": 98,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:04:08+07:00"
    }
  },
  "CO2017-chapter-2-slide-099-0000": {
    "id": "CO2017-chapter-2-slide-099-0000",
    "text": "Functional services /O operations & File-system manipulatior I/0 operations  A running program may access I/O devices, e.g., recording DVD)  For efficiency and protection, OS must provide a means (for programs) to do l/O 590 9/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_009.png",
      "page_index": 99,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:04:09+07:00"
    }
  },
  "CO2017-chapter-2-slide-100-0000": {
    "id": "CO2017-chapter-2-slide-100-0000",
    "text": "Functional services l/O operations & File-system manipulation I/0 operations  A running program may access I/O devices, e.g., recording DVD)  For efficiency and protection, OS must provide a means (for programs) to do l/0 File-system manipulation  Programs need operations on files/directories: list, create delete, read, write, permission management 590 10/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_010.png",
      "page_index": 100,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:04:11+07:00"
    }
  },
  "CO2017-chapter-2-slide-101-0000": {
    "id": "CO2017-chapter-2-slide-101-0000",
    "text": "Functional services Communications There are many communications between running programs on a machine between running program on different machines  There are two main types of communications shared memory: read/write on a shared of memory message passing: packets with predefined formats are exchanged between running programs Running program A Running program B Shared memory 11/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_011.png",
      "page_index": 101,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:04:14+07:00"
    }
  },
  "CO2017-chapter-2-slide-102-0000": {
    "id": "CO2017-chapter-2-slide-102-0000",
    "text": "Functional services Communications There are many communications between running programs on a machine between running program on different machines  There are two main types of communications shared memory: read/write on a shared of memory message passing: packets with predefined formats are exchanged between running programs Running program A Running program B A copies value into mem Shared memory 12/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_012.png",
      "page_index": 102,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:04:16+07:00"
    }
  },
  "CO2017-chapter-2-slide-103-0000": {
    "id": "CO2017-chapter-2-slide-103-0000",
    "text": "Functional services Communications There are many communications between running programs on a machine between running program on different machines  There are two main types of communications shared memory: read/write on a shared of memory message passing: packets with predefined formats are exchanged between running programs Running program A Running program B B copies value from mem Shared memory 13/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_013.png",
      "page_index": 103,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:04:18+07:00"
    }
  },
  "CO2017-chapter-2-slide-104-0000": {
    "id": "CO2017-chapter-2-slide-104-0000",
    "text": "Functional services Communications There are many communications between running programs on a machine between running program on different machines  There are two main types of communications shared memory: read/write on a shared of memory message passing: packets with predefined formats are exchanged between running programs Running program A Running program B B copies value from mem Shared memory Running program A Running program B A sends paaket containing value to B Interconnect 14/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_014.png",
      "page_index": 104,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:04:20+07:00"
    }
  },
  "CO2017-chapter-2-slide-105-0000": {
    "id": "CO2017-chapter-2-slide-105-0000",
    "text": "Functional services Error detection  Errors can occur everywhere Hardware: CPU, memory, I/O devices,: User program: arithmetic overflow, illegal access of memory, division by zero,... OS should take appropriate actions to detect and correct errors constantly 15/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_015.png",
      "page_index": 105,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:04:22+07:00"
    }
  },
  "CO2017-chapter-2-slide-106-0000": {
    "id": "CO2017-chapter-2-slide-106-0000",
    "text": "Non-functional services Resource allocation  OS manages multiple resources (hardware, software) and allocates them to multiple users and multiple running programs  Special codes are needed to make allocation efficiently e.g., CPU scheduling, printers allocation Accounting  Recording which users to use how much and what kind of resources Usage statistics is useful to reconfigure for improvement of computing services Protection and security Information of multiple users on a networked computer should be controlled by its owner. 16/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_016.png",
      "page_index": 106,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:04:24+07:00"
    }
  },
  "CO2017-chapter-2-slide-107-0000": {
    "id": "CO2017-chapter-2-slide-107-0000",
    "text": "User interface  Command interpreter - a special program to allows users to directly enter commands (or programs) (by text) to be performed by the operating system  Multiple command 8024 hoaiair: hoeis pwd interpreters (also tal hoa: tof 19: 27 2615 shell) in a modern Desktop 65e  el 12: @4 37 Download 7 Google Driy operating system Ap 2014 Movies 748 Example: Bourne shell 18: ec tof 349 D ec 29 17 :58 OvSTCCE Bash shell, C shell, 272 No 2513:51 Bourne-Again shell, Korn shell 17/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_017.png",
      "page_index": 107,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:04:28+07:00"
    }
  },
  "CO2017-chapter-2-slide-108-0000": {
    "id": "CO2017-chapter-2-slide-108-0000",
    "text": "User interface  Command interpreter - a special program to allows users to directly enter commands (or programs) (by text) to be performed by the operating system  Multiple command 8024 hoais pwc interpreters (also 79 Aonlicatior shell) in a modern 64  eb @: 27 65  eb 12: @4 Download operating system 20 Example: Bourne shell 44 D ec 17: 58  u 3 OVSIGC Bash shell, C shell, 272 2s 13:51 Bourne-Again shell, Korn shell GUI - a user friendly graphical interface, input/output is performed in a more interactive way 18/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_018.png",
      "page_index": 108,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:04:32+07:00"
    }
  },
  "CO2017-chapter-2-slide-109-0000": {
    "id": "CO2017-chapter-2-slide-109-0000",
    "text": "Choice of interface Interface choice Kind of interface (CLI or GUI) is mostly one of personal preference  System administratiors or power users often prefer CLl  With deep system knowledge, using CLI is more efficient and secure Multiple shell commands can be combined into a program, called shell script to perform more complex tasks.  Normal users often choose GUl 19/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_019.png",
      "page_index": 109,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:04:35+07:00"
    }
  },
  "CO2017-chapter-2-slide-110-0000": {
    "id": "CO2017-chapter-2-slide-110-0000",
    "text": "Choice of interface Interface choice Kind of interface (CLI or GUI) is mostly one of personal preference  System administratiors or power users often prefer CLl  With deep system knowledge, using CLI is more efficient and secure Multiple shell commands can be combined into a program, called shell script to perform more complex tasks. Normal users often choose GUI Ul can vary from system to system. Therefore, it is not a direct function of operating system 20/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_020.png",
      "page_index": 110,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:04:37+07:00"
    }
  },
  "CO2017-chapter-2-slide-111-0000": {
    "id": "CO2017-chapter-2-slide-111-0000",
    "text": "Outline 1Operating system services 2 System calls and programs 3 Operating system structure 4 Advanced issues 21/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_021.png",
      "page_index": 111,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:04:38+07:00"
    }
  },
  "CO2017-chapter-2-slide-112-0000": {
    "id": "CO2017-chapter-2-slide-112-0000",
    "text": "Example on system call demand File-to-file copy source file destination file Example System Call Sequence Acquire input file name Write prompt to screen Accept input Acquire output file name Write prompt to screen Accept input Open the input file if file doesn't exist,abort Create output file if file exists, abort Loop Read from input file Write to output file Until read fails Close output file Write completion message to screen Terminate normally 22/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_022.png",
      "page_index": 112,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:04:41+07:00"
    }
  },
  "CO2017-chapter-2-slide-113-0000": {
    "id": "CO2017-chapter-2-slide-113-0000",
    "text": "Example on system call demand File-to-file copy source file destination file Example System Call Sequence Acquire input file name Write prompt to screen Accept input Acquire output file name Write prompt to screen Accept input Open the input file if file doesn't exist,abort Create output file if file exists, abort Loop Read from input file Write to output file Until read fails Close output file Write completion message to screen Terminate normally Even a simple program executes many system calls 23/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_023.png",
      "page_index": 113,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:04:44+07:00"
    }
  },
  "CO2017-chapter-2-slide-114-0000": {
    "id": "CO2017-chapter-2-slide-114-0000",
    "text": "API vs. system call interface Application Programming Interface (API) Set of functions available to application programmers  Using APl to increase program portability: ability to compile and run on systems with the same API without code modification  Working with API is easier than with actual system calls 3 most common APIs: Windows API,POSIX API, Java API System-call interface A run-time support system (e.g., 1ibc) serves as a link between APl and system calls in operating system  Each system call is identified by an index number 590 24/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_024.png",
      "page_index": 114,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:04:46+07:00"
    }
  },
  "CO2017-chapter-2-slide-115-0000": {
    "id": "CO2017-chapter-2-slide-115-0000",
    "text": "A call to system call open() user application aoel user mode system call interface kernel mode open() Implementation of open () system call return 25/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_025.png",
      "page_index": 115,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:04:48+07:00"
    }
  },
  "CO2017-chapter-2-slide-116-0000": {
    "id": "CO2017-chapter-2-slide-116-0000",
    "text": "A call to system call open() Standard API System call user application open user mode system call interface kernel mode open() Implementation of open () system call return 26/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_026.png",
      "page_index": 116,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:04:50+07:00"
    }
  },
  "CO2017-chapter-2-slide-117-0000": {
    "id": "CO2017-chapter-2-slide-117-0000",
    "text": "Parameters passing to system call There are 3 ways  By registers: not enough for large parameters Stored in block (or table), passing address of the block in parameter X register X:parameters for call use parameters code for load address x from table X system system call13 call 13 user program operating system  Pushed onto program's stack, and popped off by OS th 27/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_027.png",
      "page_index": 117,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:04:52+07:00"
    }
  },
  "CO2017-chapter-2-slide-118-0000": {
    "id": "CO2017-chapter-2-slide-118-0000",
    "text": "Types of system calls Process control File management Device management Information maintenance Communications Protection 28/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_028.png",
      "page_index": 118,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:04:54+07:00"
    }
  },
  "CO2017-chapter-2-slide-119-0000": {
    "id": "CO2017-chapter-2-slide-119-0000",
    "text": "Process control What is a program ? A computer program is a collection of instructions that performs a specific task when executed by a computer. What is a process ? A program loaded into memory and executing is called a process end(), abort( wait_for_time() loadQ, execute) wait_event,signal_event( create_process() allocate and free memory terminate_process( get_process_attributes( set_process_attributes() 29/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_029.png",
      "page_index": 119,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:04:58+07:00"
    }
  },
  "CO2017-chapter-2-slide-120-0000": {
    "id": "CO2017-chapter-2-slide-120-0000",
    "text": "Execution on single-task OS MS-DOS free memory free memory process command interpreter command interpreter kernel kernel At system startup Running a program 30/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_030.png",
      "page_index": 120,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:05:00+07:00"
    }
  },
  "CO2017-chapter-2-slide-121-0000": {
    "id": "CO2017-chapter-2-slide-121-0000",
    "text": "Execution on single-task OS MS-DOS free memory free memory process load progr&m into memory some memory of inter command oreter is overwritten interpreter command interpreter kernel kernel At system startup Running a program 31/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_031.png",
      "page_index": 121,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:05:03+07:00"
    }
  },
  "CO2017-chapter-2-slide-122-0000": {
    "id": "CO2017-chapter-2-slide-122-0000",
    "text": "Execution on multiple-task OS FreeBSD process D free memory process C Multiple (user) processes in memory at the same time interpreter process B kernel 32/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_032.png",
      "page_index": 122,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:05:05+07:00"
    }
  },
  "CO2017-chapter-2-slide-123-0000": {
    "id": "CO2017-chapter-2-slide-123-0000",
    "text": "Interprocess communication Interprocess communication may take place using eithe message passing or shared memory process A M process A shared memory process B M process B kernel M kernel 590 33/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_033.png",
      "page_index": 123,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:05:07+07:00"
    }
  },
  "CO2017-chapter-2-slide-124-0000": {
    "id": "CO2017-chapter-2-slide-124-0000",
    "text": "Interprocess communication Interprocess communication may take place using either message passing or shared memory process A M process A sharedmemory process B M process B kernel M kernel Message passing Shared memory 34/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_034.png",
      "page_index": 124,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:05:09+07:00"
    }
  },
  "CO2017-chapter-2-slide-125-0000": {
    "id": "CO2017-chapter-2-slide-125-0000",
    "text": "System programs System programs = system utilities Providing a convenient environment for program development and execution There are categories as follows  File manipulation Status information  File modification Programming-language support Program loading and execution Communications Background services 35/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_035.png",
      "page_index": 125,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:05:11+07:00"
    }
  },
  "CO2017-chapter-2-slide-126-0000": {
    "id": "CO2017-chapter-2-slide-126-0000",
    "text": "System programs System programs = system utilities Providing a convenient environment for program development and execution There are categories as follows  File manipulation Status information  File modification Programming-language support  Program loading and execution  Communications Background services The view of most users on the operating system is defined by system programs, not actual system calls 36/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_036.png",
      "page_index": 126,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:05:14+07:00"
    }
  },
  "CO2017-chapter-2-slide-127-0000": {
    "id": "CO2017-chapter-2-slide-127-0000",
    "text": "Outline 1Operating system services 2 System calls and programs 3 Operating system structure 4 Advanced issues 37/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_037.png",
      "page_index": 127,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:05:16+07:00"
    }
  },
  "CO2017-chapter-2-slide-128-0000": {
    "id": "CO2017-chapter-2-slide-128-0000",
    "text": "Simple structure MS-DOS MS-DOS: written to provide the application program most functionality in the least space resident system progran not divided into modules interfaces and levels of MS-DOS device drivers functionality are not well separated ROM BIOs device drivers 38/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_038.png",
      "page_index": 128,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:05:17+07:00"
    }
  },
  "CO2017-chapter-2-slide-129-0000": {
    "id": "CO2017-chapter-2-slide-129-0000",
    "text": "Simple structure Traditional UNIX Limited structure with limited functionality  Consists of 2 parts: kernel and system programs (the users) shells and commands compilers and interpreters system libraries system-call intertace to the kernel signals terminal file system CPU scheduling handling swapping block l/O page replacement character l/O system system demand paging terminal drivers disk and tape drivers virtual memory kernel interface to the hardware terminal controllers device controllers memory controllers terminals disks and tapes physical memory Considered to be layered to some extent: system-call inteface, kernel and hardware interface Enormous amount of functionality combined in one level -? monolithic structure 39/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_039.png",
      "page_index": 129,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:05:21+07:00"
    }
  },
  "CO2017-chapter-2-slide-130-0000": {
    "id": "CO2017-chapter-2-slide-130-0000",
    "text": "Layered approach layer N user interface layer 1  OS is broken into several layers layer 0  Layer M provides data structures hardware & routines for upper layer, and can invoke operations of lower layer 40/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_040.png",
      "page_index": 130,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:05:24+07:00"
    }
  },
  "CO2017-chapter-2-slide-131-0000": {
    "id": "CO2017-chapter-2-slide-131-0000",
    "text": "Layered approach layer N user interface .. layer 1 OS is broken into several layers layer 0  Layer M provides data structures hardware & routines for upper layer, and can invoke operations of lower layer Advantages (due to modularity): easy to Disadvantages: Not easy to define layers debug; simple in design and (which layer is above/below which layer); implementation; secure inefficiency 41/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_041.png",
      "page_index": 131,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:05:26+07:00"
    }
  },
  "CO2017-chapter-2-slide-132-0000": {
    "id": "CO2017-chapter-2-slide-132-0000",
    "text": "Microkernel structure Moves as much from the kernel into \"user\" space Communication takes place between user modules using message passing Application File Device user Program System Driver mode Interprocess memory CPU scheduling kernel Communication managment mode microkernel hardware 42/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_042.png",
      "page_index": 132,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:05:29+07:00"
    }
  },
  "CO2017-chapter-2-slide-133-0000": {
    "id": "CO2017-chapter-2-slide-133-0000",
    "text": "Microkernel structure Moves as much from the kernel into \"user\" space Communication takes place between user modules using message passing Application File Device user Program System Driver mode memory CPU Interprocess kernel Communication managment scheduling mode microkernel hardware Advantages (due to modularity): easy to Disadvantages: system-function overhead extend kernel; easier to port OS to new architectures; more reliable (less code running in kernel); more secure 43/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_043.png",
      "page_index": 133,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:05:32+07:00"
    }
  },
  "CO2017-chapter-2-slide-134-0000": {
    "id": "CO2017-chapter-2-slide-134-0000",
    "text": "Modules-based structure Best current methodology is loadable kernel modules Only need core services  Additional services can be loaded as modules in boot time and run time  Additional services have to be recompiled to add new features  Idea of modules-based kernel more flexible than layered approach and also similar to microkernel structure scheduling device and classes file systems bus drivers core Solaris kernel loadable miscellaneous modules system calls STREAMS executable modules formats 44/ 47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_044.png",
      "page_index": 134,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:05:35+07:00"
    }
  },
  "CO2017-chapter-2-slide-135-0000": {
    "id": "CO2017-chapter-2-slide-135-0000",
    "text": "Hybrid structure In practice, very few OS adopt a single, stricted defined structure graphical user interface Aqua application environments and services Cocoa Touch Java Cocoa Quicktime BSD Media Services kernel environment BSD Core Services Mach Core Os I/O kit kernel extension Figure 2.16 The Mac OS X structure. Figure 2.17_Architecture of Apple's iOS Applications Application Framework Libraries Android runtime SQLite openGL Core Libraries surface media manager framework Dalvik virtual machine webkit libc Linux kernel Figure 2.18Architecture of Google's Android. 45/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_045.png",
      "page_index": 135,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:05:38+07:00"
    }
  },
  "CO2017-chapter-2-slide-136-0000": {
    "id": "CO2017-chapter-2-slide-136-0000",
    "text": "Outline 1Operating system services 2 System calls and programs 3Operating system structure 4 Advanced issues 46/47",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_046.png",
      "page_index": 136,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:05:40+07:00"
    }
  },
  "CO2017-chapter-3-slide-137-0000": {
    "id": "CO2017-chapter-3-slide-137-0000",
    "text": "Processes Tran, Van Hoai Faculty of Computer Science & Engineering HCMC University of Technology E-mail: hoai@hcmut.edu.vn (partly based on slides of Le Thanh Van) 1/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_001.png",
      "page_index": 137,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:05:41+07:00"
    }
  },
  "CO2017-chapter-3-slide-138-0000": {
    "id": "CO2017-chapter-3-slide-138-0000",
    "text": "Outline 1l Process concept 2 Process scheduling 3 Operations on processes 4 Interprocess communication 5 Communication in client-server model 2/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_002.png",
      "page_index": 138,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:05:44+07:00"
    }
  },
  "CO2017-chapter-3-slide-139-0000": {
    "id": "CO2017-chapter-3-slide-139-0000",
    "text": "Outline 1 Process concept 2 Process scheduling 3 Operations on processes 4 Interprocess communication 5 Communication in client-server model 3/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_003.png",
      "page_index": 139,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:05:46+07:00"
    }
  },
  "CO2017-chapter-3-slide-140-0000": {
    "id": "CO2017-chapter-3-slide-140-0000",
    "text": "What is a process The textbook A process is a program in execution Oxford dictionary A process is a series of actions or steps taken in order to achieve a particular end 590 4/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_004.png",
      "page_index": 140,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:05:47+07:00"
    }
  },
  "CO2017-chapter-3-slide-141-0000": {
    "id": "CO2017-chapter-3-slide-141-0000",
    "text": "What is a process The textbook A process is a program in execution Oxford dictionary A process is a series of actions or steps taken in order to achieve a particular end process execution must progress in sequential fashion  job and process are used interchangeably 590 5/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_005.png",
      "page_index": 141,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:05:48+07:00"
    }
  },
  "CO2017-chapter-3-slide-142-0000": {
    "id": "CO2017-chapter-3-slide-142-0000",
    "text": "Process vs. Program  Process is not the same as \"program 6/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_006.png",
      "page_index": 142,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:05:49+07:00"
    }
  },
  "CO2017-chapter-3-slide-143-0000": {
    "id": "CO2017-chapter-3-slide-143-0000",
    "text": "Process vs. Program  Process is not the same as \"program Program is a passive executable code on disk; process is an active entity = 7/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_007.png",
      "page_index": 143,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:05:51+07:00"
    }
  },
  "CO2017-chapter-3-slide-144-0000": {
    "id": "CO2017-chapter-3-slide-144-0000",
    "text": "Process vs. Program  Process is not the same as \"program Program is a passive executable code on disk; process is an active entity  A same program can be executed into multiple processes (normally by mutiple users 8/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_008.png",
      "page_index": 144,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:05:53+07:00"
    }
  },
  "CO2017-chapter-3-slide-145-0000": {
    "id": "CO2017-chapter-3-slide-145-0000",
    "text": "Process vs. Program  Process is not the same as \"program' Program is a passive executable code on disk; process is an active entity A same program can be executed into multiple processes (normally by mutiple users) Components of a process program counter stack data section 9/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_009.png",
      "page_index": 145,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:05:55+07:00"
    }
  },
  "CO2017-chapter-3-slide-146-0000": {
    "id": "CO2017-chapter-3-slide-146-0000",
    "text": "Process vs. Program Process is not the same as \"program' Program is a passive executable code on disk; process is an active entity A same program can be executed into multiple processes (normally by mutiple users) Components of a process program counter stack data section User and OS processes jobs (batch system) tasks (time-shared system process (generic) 10/ 71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_010.png",
      "page_index": 146,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:05:57+07:00"
    }
  },
  "CO2017-chapter-3-slide-147-0000": {
    "id": "CO2017-chapter-3-slide-147-0000",
    "text": "Process vs. Program  Process is not the same as \"program' Program is a passive executable code on disk; process is an active entity A same program can be executed into multiple processes (normally by mutiple users) Components of a process program counter stack data section  User and OS processes jobs (batch system) tasks (time-shared system process (generic) J. Brisendine (writer) Life is a process, not a thing 11/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_011.png",
      "page_index": 147,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:06:00+07:00"
    }
  },
  "CO2017-chapter-3-slide-148-0000": {
    "id": "CO2017-chapter-3-slide-148-0000",
    "text": "Process in memory max stack heap data text 0 12/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_012.png",
      "page_index": 148,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:06:02+07:00"
    }
  },
  "CO2017-chapter-3-slide-149-0000": {
    "id": "CO2017-chapter-3-slide-149-0000",
    "text": "Process in memory max Temporary data stack heap Dynamically allocated memory - data Global variables text Program code 0 13/ 71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_013.png",
      "page_index": 149,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:06:04+07:00"
    }
  },
  "CO2017-chapter-3-slide-150-0000": {
    "id": "CO2017-chapter-3-slide-150-0000",
    "text": "Process in execution Conceptual model of process execution Process A Process B Process D Process C time 14/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_014.png",
      "page_index": 150,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:06:06+07:00"
    }
  },
  "CO2017-chapter-3-slide-151-0000": {
    "id": "CO2017-chapter-3-slide-151-0000",
    "text": "Process in execution Conceptual model of Actual interleaved exe- process execution cution of the processes Process B Process A Process A Process D Process B Process D Process A Process C Process B Process D Process A Process C Process D Process C Process C Process C Process C time 15/ 71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_015.png",
      "page_index": 151,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:06:08+07:00"
    }
  },
  "CO2017-chapter-3-slide-152-0000": {
    "id": "CO2017-chapter-3-slide-152-0000",
    "text": "Process state 2-state process model A process is either \"running\" or \"not running dispatch entry exit not running Running pause 16/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_016.png",
      "page_index": 152,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:06:10+07:00"
    }
  },
  "CO2017-chapter-3-slide-153-0000": {
    "id": "CO2017-chapter-3-slide-153-0000",
    "text": "Process state 2-state process model A process is either \"running\" or \"not running dispatch entry exit not running Running pause  Queueing diagram queue dispatch enter exit CPU 17/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_017.png",
      "page_index": 153,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:06:12+07:00"
    }
  },
  "CO2017-chapter-3-slide-154-0000": {
    "id": "CO2017-chapter-3-slide-154-0000",
    "text": "Process state 2-state process model A process is either \"running\" or \"not running dispatch entry exit not running Running pause  Queueing diagram aueue Weakness 2-state model cannot deal with l/0 operations 18/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_018.png",
      "page_index": 154,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:06:14+07:00"
    }
  },
  "CO2017-chapter-3-slide-155-0000": {
    "id": "CO2017-chapter-3-slide-155-0000",
    "text": "Process state As a process executes, it changes state new: the process is being created running: its instructions are being executed waiting: the process is waiting for some event to occur ready: the process is waiting to be assigned to CPU terminated: the process has finished execution 19/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_019.png",
      "page_index": 155,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:06:16+07:00"
    }
  },
  "CO2017-chapter-3-slide-156-0000": {
    "id": "CO2017-chapter-3-slide-156-0000",
    "text": "Process state As a process executes, it changes state new: the process is being created running: its instructions are being executed waiting: the process is waiting for some event to occur ready: the process is waiting to be assigned to CPU terminated: the process has finished execution new admitted interrupt exit terminated ready running scheduler dispatch l/O or event completion I/O or event wait waiting 20/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_020.png",
      "page_index": 156,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:06:18+07:00"
    }
  },
  "CO2017-chapter-3-slide-157-0000": {
    "id": "CO2017-chapter-3-slide-157-0000",
    "text": "Process control block (PCB) Following information is for a process in operating system, stored in process control block  Process state Program counter CPU registers process state process number  CPU scheduling information (e.g. program counter process priority, pointers to scheduling queues) registers  Memory management information memory limits (e.g., base/limit registers, segment list of open files tables)  Accounting information  I/O status information (e.g., open files) 590 21/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_021.png",
      "page_index": 157,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:06:21+07:00"
    }
  },
  "CO2017-chapter-3-slide-158-0000": {
    "id": "CO2017-chapter-3-slide-158-0000",
    "text": "Process switching PCBs are used for process switching in a mutiple tasking operating system process P. operating system process P, interrupt or system call executing save state into PCB - idle 4 reload state from PCB, idle interrupt or system call executing save state into PCB, -idle reload state from PCB, executing 22/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_022.png",
      "page_index": 158,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:06:24+07:00"
    }
  },
  "CO2017-chapter-3-slide-159-0000": {
    "id": "CO2017-chapter-3-slide-159-0000",
    "text": "Context switching When CPU switches to another process, the system must save the state of the old process and load the saved state for the new process  Context-switch time is overhead. The system does no useful work while switching  Time dependent on hardware support Ex.: UltraSPARC uses multiple register sets 23/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_023.png",
      "page_index": 159,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:06:26+07:00"
    }
  },
  "CO2017-chapter-3-slide-160-0000": {
    "id": "CO2017-chapter-3-slide-160-0000",
    "text": "Outline 1 Process concept 2 Process scheduling 3 Operations on processes 4 Interprocess communication 5 Communication in client-server model 24/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_024.png",
      "page_index": 160,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:06:27+07:00"
    }
  },
  "CO2017-chapter-3-slide-161-0000": {
    "id": "CO2017-chapter-3-slide-161-0000",
    "text": "Process scheduling queues In 5-state process model, we need more than 1 queue to store jobs 25/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_025.png",
      "page_index": 161,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:06:29+07:00"
    }
  },
  "CO2017-chapter-3-slide-162-0000": {
    "id": "CO2017-chapter-3-slide-162-0000",
    "text": "Process scheduling queues In 5-state process model, we need more than 1 queue to store jobs  Queue types: Job queue: set of all processes in the system Ready queue: set of all processes residing in main memory, ready, and waiting to execute Device queues: set of processes waiting for an l/O device Process migration between the various queues 26/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_026.png",
      "page_index": 162,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:06:30+07:00"
    }
  },
  "CO2017-chapter-3-slide-163-0000": {
    "id": "CO2017-chapter-3-slide-163-0000",
    "text": "Process queues as linked lists queue header PCB PCB2 ready head queue tail registers registers . . . . mag head tape 2 unit 0 tail 2 mag head tape PCB3 PCB14 PCB6 unit 1 tail 2 disk head unit 0 tail PCB5 terminal head : unit 0 tail . 27/ 71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_027.png",
      "page_index": 163,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:06:35+07:00"
    }
  },
  "CO2017-chapter-3-slide-164-0000": {
    "id": "CO2017-chapter-3-slide-164-0000",
    "text": "Queueing diagram ready queue CPU 1/0 I/O queue I/O request time slice expired child fork a executes child interrupt wait for an occurs interrupt 28/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_028.png",
      "page_index": 164,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:06:37+07:00"
    }
  },
  "CO2017-chapter-3-slide-165-0000": {
    "id": "CO2017-chapter-3-slide-165-0000",
    "text": "Schedulers Processes are selected from the queues for migration, under some selection strategies managed by schedulers = 29/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_029.png",
      "page_index": 165,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:06:38+07:00"
    }
  },
  "CO2017-chapter-3-slide-166-0000": {
    "id": "CO2017-chapter-3-slide-166-0000",
    "text": "Schedulers Processes are selected from the queues for migration, under some selection strategies managed by schedulers.  Long-term scheduler (or job scheduler): selects which processes should be brought into the ready queue Frequency: only necessary when a process leaves Efficiency depends strongly on I/O bound or CPU bound 30/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_030.png",
      "page_index": 166,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:06:40+07:00"
    }
  },
  "CO2017-chapter-3-slide-167-0000": {
    "id": "CO2017-chapter-3-slide-167-0000",
    "text": "Schedulers Processes are selected from the queues for migration, under some selection strategies managed by schedulers.  Long-term scheduler (or job scheduler): selects which processes should be brought into the ready queue  Frequency: only necessary when a process leaves Efficiency depends strongly on I/O bound or CPU bound Short-term scheduler (or CPU scheduler): selects which process should be executed next and allocates CPU  Frequency: at least once every 100 milliseconds (quantum time) Effciency depends strongly on process switching time 31/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_031.png",
      "page_index": 167,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:06:43+07:00"
    }
  },
  "CO2017-chapter-3-slide-168-0000": {
    "id": "CO2017-chapter-3-slide-168-0000",
    "text": "Schedulers Processes are selected from the gueues for migration, under some selection strategies managed by schedulers.  Long-term scheduler (or job scheduler): selects which processes should be brought into the ready queue  Frequency: only necessary when a process leaves Efficiency depends strongly on I/O bound or CPU bound Short-term scheduler (or CPU scheduler): selects which process should be executed next and allocates CPU  Frequency: at least once every 100 milliseconds (quantum time) Effciency depends strongly on process switching time  Job scheduler is for batch systems  CPU scheduler is for time-sharing systems 32/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_032.png",
      "page_index": 168,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:06:46+07:00"
    }
  },
  "CO2017-chapter-3-slide-169-0000": {
    "id": "CO2017-chapter-3-slide-169-0000",
    "text": "Medium-term scheduler swap in partially executed swap out swapped-out processes ready queue CPU >end I/O waiting 1/0 queues Swaping is useful to release some resources (for other ready processes) Mobile OSs utilize swaping to save memory and power 33/ 71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_033.png",
      "page_index": 169,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:06:48+07:00"
    }
  },
  "CO2017-chapter-3-slide-170-0000": {
    "id": "CO2017-chapter-3-slide-170-0000",
    "text": "Outline Process concept 2 Process scheduling 4 Interprocess communication 5 Communication in client-server model 34/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_034.png",
      "page_index": 170,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:06:49+07:00"
    }
  },
  "CO2017-chapter-3-slide-171-0000": {
    "id": "CO2017-chapter-3-slide-171-0000",
    "text": "Process tree Process tree Processes are organized in a form of tree init pid= 1 Login kthreadd sshd p=a= 8415 pid=2 pid=3028 bash khelper pdf_ush sshd pid=841f pia = 6 200 pid=360 ps emacs tcsch p=d = 9204 Process identifier pid=40C5 35/ 71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_035.png",
      "page_index": 171,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:06:52+07:00"
    }
  },
  "CO2017-chapter-3-slide-172-0000": {
    "id": "CO2017-chapter-3-slide-172-0000",
    "text": "Process creation  Parent creates children processes 36/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_036.png",
      "page_index": 172,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:06:54+07:00"
    }
  },
  "CO2017-chapter-3-slide-173-0000": {
    "id": "CO2017-chapter-3-slide-173-0000",
    "text": "Process creation Parent creates children processes Resource sharing: 3 possibilities Parent and children share all resources Children share subset of parent's resources Parent and children share no resources Execution: 2 possibilities Parent and children execute concurrently Parent waits until children terminate  Address-space: 2 possibilities Children duplicate program & data of the parent Children load new program 37/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_037.png",
      "page_index": 173,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:06:56+07:00"
    }
  },
  "CO2017-chapter-3-slide-174-0000": {
    "id": "CO2017-chapter-3-slide-174-0000",
    "text": "fork() system call #include <sys/types.h> #include <stdio.h> #include <unistd.h> Memory Memory int main(O) t pid_t pid; /* fork a child */ Process Parent copy pid = fork(); pid=xxx pid=xxx fork() if ( pid< 0 )f /* error occurs */ fprintf( stderr, \"Fork failedn\" ); return 1: Child } else if ( pid == 0 ){ /* child process */ pid=0 execlp( \"/bin/ls\", \"ls\", NULL ); } else { /* parent process */ wait(NULL); printf( \"Child complete!n\" ); } return 0; } parent (pid > 0) wait() parent resumes parent pid = fork() exec() exit() child(pid= 0) 38/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_038.png",
      "page_index": 174,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:06:59+07:00"
    }
  },
  "CO2017-chapter-3-slide-175-0000": {
    "id": "CO2017-chapter-3-slide-175-0000",
    "text": "Process termination Process executes the last statement and asks OS to decide it (exit()) Output data from child to parent (via wait()  Process's resources are deallocated by OS 39/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_039.png",
      "page_index": 175,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:07:01+07:00"
    }
  },
  "CO2017-chapter-3-slide-176-0000": {
    "id": "CO2017-chapter-3-slide-176-0000",
    "text": "Process termination Process executes the last statement and asks OS to decide it (exit())  Output data from child to parent (via wait() Process's resources are deallocated by OS  Parent may terminate execution of children processes (abort() Child has exceeded allocated resources Task assigned to child is no longer required Parent is exiting OS does not allow child to continue if its parent terminates = Cascading termination Parent did not invoke wait() and instead terminated, thereby leaving its child processes as orphans If process stopped execution (exit( called) but still in OS's process table, (due to parent process does not receive any from the child or does not invoke wait()), it is zombie. 40/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_040.png",
      "page_index": 176,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:07:04+07:00"
    }
  },
  "CO2017-chapter-3-slide-177-0000": {
    "id": "CO2017-chapter-3-slide-177-0000",
    "text": "Outline 1 Process concept 2 Process scheduling 3Operations on processes 4 Interprocess communication 5 Communication in client-server model 41/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_041.png",
      "page_index": 177,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:07:07+07:00"
    }
  },
  "CO2017-chapter-3-slide-178-0000": {
    "id": "CO2017-chapter-3-slide-178-0000",
    "text": "Process relationship  Independent process: cannot affect or be affected by others  Independent process does not share data  Cooperating process: can affect or be affected by others  Cooperating process does share data Reasons for process cooperation Information sharing Computation speedup Modularity Convenience 590 42/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_042.png",
      "page_index": 178,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:07:10+07:00"
    }
  },
  "CO2017-chapter-3-slide-179-0000": {
    "id": "CO2017-chapter-3-slide-179-0000",
    "text": "Interprocess communication (IPC) IPC process A process A lPC is used to exchange process B shared memory process B data and information 2 IPC models: message queue shared-memory and mamm2m3 kernel kernel message-passing Shared-memory: fast Message-passing: no conflict ; suitable for distributed system; better performance on multiple core architecture 43/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_043.png",
      "page_index": 179,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:07:13+07:00"
    }
  },
  "CO2017-chapter-3-slide-180-0000": {
    "id": "CO2017-chapter-3-slide-180-0000",
    "text": "Shared-memory  All things for IPC are decided by processes in communication themselves, not under OS's control Producer Consumer item next_produced; item next_consumed; while (true{ while (true){ while ((( in + 1  % BUFFER_SIZE  == out  while ( in == out ) ; /* do nothing */ ; /* do nothing */ buffer[ in ] = next_produced; next_consumed = buffer[ out ] in = ( in + 1 ) % BUFFER_SIZE; out = ( out + 1 ) % BUFFER_SIZE; } At most BUFFER SIZE-1 items in the buffer at the same time 44/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_044.png",
      "page_index": 180,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:07:16+07:00"
    }
  },
  "CO2017-chapter-3-slide-181-0000": {
    "id": "CO2017-chapter-3-slide-181-0000",
    "text": "Message-passing  IPC facility provides at least 2 operations send(message) receive(message)  If P and Q wish to communicate, they need to establish a communication link between them exchange a message via send()/receive()  Methods to implement communication link physical link: shared memory, hardware bus, network, logical link: by following methods Direct or indirect communication Synchronous or asynchronous communication Automatic or explicit buffering 45/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_045.png",
      "page_index": 181,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:07:18+07:00"
    }
  },
  "CO2017-chapter-3-slide-182-0000": {
    "id": "CO2017-chapter-3-slide-182-0000",
    "text": "Message-passing Implementation questions  How are links establised ? Can a link be associated with more than two processes ? How many links can there be between every pair of communicating processes ? What is the capacity of a link ?  Is the size of a message that the link can accommodate fixed or variable ?  Is a link unidirectional or bi-directional ? 46/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_046.png",
      "page_index": 182,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:07:20+07:00"
    }
  },
  "CO2017-chapter-3-slide-183-0000": {
    "id": "CO2017-chapter-3-slide-183-0000",
    "text": "Message-passing Direct communication Explicit name of sender and receiver must be given send(P,message) receive(Q,message)  Links are established automatically A link is associated with exactly one pair of communicating processes  The link may be unidirectional, but is usually bi-directional 590 47/ 71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_047.png",
      "page_index": 183,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:07:23+07:00"
    }
  },
  "CO2017-chapter-3-slide-184-0000": {
    "id": "CO2017-chapter-3-slide-184-0000",
    "text": "Message-passing Direct communication Explicit name of sender and receiver must be given send(P,message) receive(Q,message)  Links are established automatically A link is associated with exactly one pair of communicating processes  The link may be unidirectional, but is usually bi-directional Disadvantage Direct communication has poor modularity 48/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_048.png",
      "page_index": 184,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:07:25+07:00"
    }
  },
  "CO2017-chapter-3-slide-185-0000": {
    "id": "CO2017-chapter-3-slide-185-0000",
    "text": "Message-passing Indirect communication (1 Messages are sent to or received from a mailbox or port send(A,message) receive(A,message) A is a mailbox with unique identification  A link between 2 processes is established only if both have a shared mailbox A link may be associated with more than 2 processes Between each pair, several different links may exist 49/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_049.png",
      "page_index": 185,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:07:27+07:00"
    }
  },
  "CO2017-chapter-3-slide-186-0000": {
    "id": "CO2017-chapter-3-slide-186-0000",
    "text": "Message-passing Indirect communication (1) P1, P2 and P3 share a mailbox P1 sends a message P2 and P3 receive Who gets the message ? 50/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_050.png",
      "page_index": 186,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:07:28+07:00"
    }
  },
  "CO2017-chapter-3-slide-187-0000": {
    "id": "CO2017-chapter-3-slide-187-0000",
    "text": "Message-passing Indirect communication (1 P,, P, and P3 share a mailbox q P1 sends a message P2 and P3 receive Who gets the message ?  It depends on which of the following methods is chosen A link associated with 2 processes at most  Allowing one process to perform receive() at a time An algorithm to choose which process to perform receive() (e.g., round-robin) 51/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_051.png",
      "page_index": 187,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:07:31+07:00"
    }
  },
  "CO2017-chapter-3-slide-188-0000": {
    "id": "CO2017-chapter-3-slide-188-0000",
    "text": "Message-passing Indirect communication (1 P,, P, and P3 share a mailbox P1 sends a message P, and P3 receive Who gets the message ?  It depends on which of the following methods is chosen A link associated with 2 processes at most  Allowing one process to perform receive() at a time An algorithm to choose which process to perform receive() (e.g., round-robin)  A mailbox may be owned by a process or OS. If it owned by OS, system calls must be provided to 1 Create a new mailbox 2 Send and receive messages through the mailbox 3 Delete a mailbox 52/ 71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_052.png",
      "page_index": 188,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:07:34+07:00"
    }
  },
  "CO2017-chapter-3-slide-189-0000": {
    "id": "CO2017-chapter-3-slide-189-0000",
    "text": "Message-passing Synchronization send() and receive() can be blocking (synchronous) or non-blocking (asynchronous) 53/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_053.png",
      "page_index": 189,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:07:36+07:00"
    }
  },
  "CO2017-chapter-3-slide-190-0000": {
    "id": "CO2017-chapter-3-slide-190-0000",
    "text": "Message-passing Synchronization send() and receive() can be blocking (synchronous) or non-blocking (asynchronous) Sending Message Waits for message to be received source:cfd-online.com 590 54/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_054.png",
      "page_index": 190,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:07:37+07:00"
    }
  },
  "CO2017-chapter-3-slide-191-0000": {
    "id": "CO2017-chapter-3-slide-191-0000",
    "text": "Message-passing Synchronization send() and receive() can be blocking (synchronous) or non-blocking (asynchronous) Sending Message ending Message Performs some work while Waits for message to be received message is being sent source: cfd-online.com source: cfd-online.com) 55/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_055.png",
      "page_index": 191,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:07:39+07:00"
    }
  },
  "CO2017-chapter-3-slide-192-0000": {
    "id": "CO2017-chapter-3-slide-192-0000",
    "text": "Message-passing Buffering  Message queues attached to the link; implemented in one of 3 ways Zero capacity: 0 message; sender must wait for receiver Bounded capacity: finite length of n; sender must wait if link is full Unbounded capacity: infinite length; sender never waits 56/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_056.png",
      "page_index": 192,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:07:41+07:00"
    }
  },
  "CO2017-chapter-3-slide-193-0000": {
    "id": "CO2017-chapter-3-slide-193-0000",
    "text": "Outline Process concept 2 Process scheduling  Operations on processes 4 Interprocess communication 5 Communication in client-server model 57/ 71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_057.png",
      "page_index": 193,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:07:43+07:00"
    }
  },
  "CO2017-chapter-3-slide-194-0000": {
    "id": "CO2017-chapter-3-slide-194-0000",
    "text": "Client-server communication Internet Clients Server (source: wikipedia) 58/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_058.png",
      "page_index": 194,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:07:45+07:00"
    }
  },
  "CO2017-chapter-3-slide-195-0000": {
    "id": "CO2017-chapter-3-slide-195-0000",
    "text": "Client-server communication Internet Clients Server source: wikipedia) Sockets Remote Procedure Calls Remote Method Invocation (Java) oes 59/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_059.png",
      "page_index": 195,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:07:46+07:00"
    }
  },
  "CO2017-chapter-3-slide-196-0000": {
    "id": "CO2017-chapter-3-slide-196-0000",
    "text": "Socket Socket is an endpoint, consisting of lP address port Socket 161.25.19.8:1625 refers to port 1625 on host 161.25.19.8 60/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_060.png",
      "page_index": 196,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:07:47+07:00"
    }
  },
  "CO2017-chapter-3-slide-197-0000": {
    "id": "CO2017-chapter-3-slide-197-0000",
    "text": "Socket Socket is an endpoint, consisting of IP address port 161.25.19.8 Socket Server 1 161.25.19.8:1625 Client 2 refers to port 1625 Client 1 Server 2 on host 161.25.19.8 Server 3 Client 3 1625 2 80 590 61/ 71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_061.png",
      "page_index": 197,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:07:49+07:00"
    }
  },
  "CO2017-chapter-3-slide-198-0000": {
    "id": "CO2017-chapter-3-slide-198-0000",
    "text": "Socket communication host X (146.86.5.20) socket 146.86.5.20:1625 web server (161.25.19.8) socket 161.25.19.8:80 62/ 71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_062.png",
      "page_index": 198,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:07:51+07:00"
    }
  },
  "CO2017-chapter-3-slide-199-0000": {
    "id": "CO2017-chapter-3-slide-199-0000",
    "text": "Socket communication host X (146.86.5.20) socket 146.86.5.20:1625) web server (161.25.19.8) socket (161.25.19.8:80 Socket is low-level form of communication in which data is transferred in unstructured stream. 63/ 71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_063.png",
      "page_index": 199,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:07:54+07:00"
    }
  },
  "CO2017-chapter-3-slide-200-0000": {
    "id": "CO2017-chapter-3-slide-200-0000",
    "text": "Remote procedure call (RPC) Remote procedure call (RPC) abstracts procedure calls between processes on networked systems  Messages exchanged in RPC are well-structured (function name, parameters Stubs: client-side proxy for the actual procedure on the server separate stub for each separate remote procedure stub locates port on server and marshalls parameters into a package (by a mechanism of External Data Representation (XDR)) The server-side stub receives this message, unpacks the marshalled parameters, and peforms the procedure on the server 64/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_064.png",
      "page_index": 200,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:07:56+07:00"
    }
  },
  "CO2017-chapter-3-slide-201-0000": {
    "id": "CO2017-chapter-3-slide-201-0000",
    "text": "Execution of RPC client messages server user calls kernel to send RPC message to procedurex kernel sends From.clieni To:server matchmaker message to Portmatchmaker receives matchmaker to Readdress message,looks findport number for RPC X up answer From:server kernel places To: client matchmaker port Pin user Port: kernel replies to client RPC message ReRPC X with port P Port:P From:client daemon kernelsends To:server listening to RPC Port: port P port Preceives <contents> message From:RPC daemon kernel receives Port:P processes reply,passes To:client request and it to user Port:kernel processes send <output> output 65/ 71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_065.png",
      "page_index": 201,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:08:01+07:00"
    }
  },
  "CO2017-chapter-3-slide-202-0000": {
    "id": "CO2017-chapter-3-slide-202-0000",
    "text": "Execution of RPC client messages server user calls kernel to send RPC message to procedurex kernel sends Fromclient To:server matchmaker message to Port:matchmake receives matchmakerto Readdress message,looks findport number for RPC X up answer From:server kernel places To: client matchmaker port Pin user Port: kernel replies to client RPCmessage Re: RPC X with port P Port:P From:client daemon kernel sends To:server listening to RPC Port:port P port Preceives <contents> message RPC is useful to implement services for distributed systems reply,passes To: client request and it to user Port:kernel processes send <output> output 66/ 71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_066.png",
      "page_index": 202,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:08:05+07:00"
    }
  },
  "CO2017-chapter-3-slide-203-0000": {
    "id": "CO2017-chapter-3-slide-203-0000",
    "text": "Remote method invocation  A Java mechanism and quite similar to RPC RMI allows a Java program on one machine to invoke a method on a remote object client remote object val = server.someMethod(A,B) boolean someMethod (Object x, Object y) implementation of someMethod t 1 stub skeleton A, B, someMethod boolean return value 67/ 71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_067.png",
      "page_index": 203,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:08:07+07:00"
    }
  },
  "CO2017-chapter-3-slide-204-0000": {
    "id": "CO2017-chapter-3-slide-204-0000",
    "text": "Pipe Pipe is one of very first IPC mechanisms in early UNIX Ordinary pipe is unidirectional Pipes can be treated as a special type of file parent child fd(0) fd(1) fd(0) fd(1) pipe read end write end 68/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_068.png",
      "page_index": 204,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:08:09+07:00"
    }
  },
  "CO2017-chapter-3-slide-205-0000": {
    "id": "CO2017-chapter-3-slide-205-0000",
    "text": "Anonymous pipe #include <sys/types.h> #include <stdio,h> #include <string.h> if ( pid > 0 )f #include <unistd.h> /* close unused end of pipe */ close( fd[READ_END] ); #define BUFFER_SIZE 25 #define READ_END 0 /* write to the pipe */ #define WRITE_END 1 write( fd[WRITE_END], write_msg, strlen(write_msg + 1 ); int main(void) /* close the write end */ char write_msg[BUFFER_SIZE] = \"Greetings\"; close( fd[WRITE_END] ); char read_msg[BUFFER_SIZE]; } intfd[2]; else { pid_t pid; /* close unused end of pipe */ close( fd[WRITE_END] ); /* create the pipe */ if ( pipe( fd ) == 1 ){ /* write to the pipe */ fprintf( stderr, \"Pipe failed!n\" ); read( fd[READ_END], read_msg, BUFFER_SIZE ); return 1; } /* close the read end */ close( fd[READ_END]); /* fork a child process */ } pid= fork(); if ( pid< 0 ){ return 0; fprintf( stderr, \"Fork failed!n\" ); } return 1; } 69/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_069.png",
      "page_index": 205,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:08:15+07:00"
    }
  },
  "CO2017-chapter-3-slide-206-0000": {
    "id": "CO2017-chapter-3-slide-206-0000",
    "text": "Homeworks  Read materials on Thread: textbook, slides (Le Thanh Van) There is quiz in April 1,2021) on Process & Thread 2l 70/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_070.png",
      "page_index": 206,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:08:16+07:00"
    }
  },
  "CO2017-chapter-3-slide-207-0000": {
    "id": "CO2017-chapter-3-slide-207-0000",
    "text": "Homeworks 1 Read materials on Thread: textbook, slides (Le Thanh Van) 2 There is quiz in April 1, 2021) on Process & Thread 3 Quiz grade (of students in 2017) Histogram of grade$X7 8 6 2 4 5 6 7 8 9 10 grade$X7 71/71",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_071.png",
      "page_index": 207,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:08:19+07:00"
    }
  },
  "CO2017-chapter-4-slide-208-0000": {
    "id": "CO2017-chapter-4-slide-208-0000",
    "text": "Threads Tran, Van Hoai Faculty of Computer Science & Engineering HCMC University of Technology E-mail: hoai@hcmut.edu.vn (partly based on slides of Le Thanh Van) 1/20",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_001.png",
      "page_index": 208,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:08:20+07:00"
    }
  },
  "CO2017-chapter-4-slide-209-0000": {
    "id": "CO2017-chapter-4-slide-209-0000",
    "text": "Outline  Thread and its benefits 2 Multithreading models 2/20",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_002.png",
      "page_index": 209,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:08:21+07:00"
    }
  },
  "CO2017-chapter-4-slide-210-0000": {
    "id": "CO2017-chapter-4-slide-210-0000",
    "text": "Outline  Thread and its benefits 2Multithreading models 3/20",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_003.png",
      "page_index": 210,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:08:23+07:00"
    }
  },
  "CO2017-chapter-4-slide-211-0000": {
    "id": "CO2017-chapter-4-slide-211-0000",
    "text": "Motivation An application normally has several controls A word-processor has a control on mouse input, a control for keyboard, a control for function completion,  The model \"an application = a process\" does not catch up with multiprocessor environment A modern processor has multiple cores 4/20",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_004.png",
      "page_index": 211,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:08:25+07:00"
    }
  },
  "CO2017-chapter-4-slide-212-0000": {
    "id": "CO2017-chapter-4-slide-212-0000",
    "text": "Single vs. Multithreaded processes code data files code data files registers stack registers registers registers stack stack stack thread thread single-threaded process multithreaded process 5/20",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_005.png",
      "page_index": 212,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:08:28+07:00"
    }
  },
  "CO2017-chapter-4-slide-213-0000": {
    "id": "CO2017-chapter-4-slide-213-0000",
    "text": "Single vs. Multithreaded processes code data files code data files registers stack registers registers registers stack stack stack thread thread light weight process single-threadedprocess multithreaded process With the above model, one server (by one process) can service several concurrent requests (2) create new 1) request thread to service the request client server thread 3 resume listening for additional client reguests 6/20",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_006.png",
      "page_index": 213,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:08:30+07:00"
    }
  },
  "CO2017-chapter-4-slide-214-0000": {
    "id": "CO2017-chapter-4-slide-214-0000",
    "text": "Benefits of multithreading model  Responsiveness: a program (process) continues running even if a part of it is blocked or is performing a lengthy operation. Resource sharing: By defaults, threads share memory and resources of its process => same address-space.  Economy: Resource allocation, context-switching are time-consuming. Threads do it more economically  Scalability: threads may be running in parallel on different processing cores. 2 + 4 6 + 8 1 +2 9 + 5 7/20",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_007.png",
      "page_index": 214,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:08:33+07:00"
    }
  },
  "CO2017-chapter-4-slide-215-0000": {
    "id": "CO2017-chapter-4-slide-215-0000",
    "text": "Benefits of multithreading model  Responsiveness: a program (process) continues running even if a part of it is blocked or is performing a lengthy operation. Resource sharing: By defaults, threads share memory and resources of its process => same address-space.  Economy: Resource allocation, context-switching are time-consuming. Threads do it more economically  Scalability: threads may be running in parallel on different processing cores. concurrency vs. parallelism Concurrency = many tasks are allowed to make progress Parallelism = many tasks can be performed simultaneously 8/20",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_008.png",
      "page_index": 215,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:08:36+07:00"
    }
  },
  "CO2017-chapter-4-slide-216-0000": {
    "id": "CO2017-chapter-4-slide-216-0000",
    "text": "Programming challenges Identifying tasks: how to divide an application into tasks ? Balance: how tasks do the same amount of workload ? Data splitting: how data of tasks to be splitted ?  Data dependency: data surely does not live alone, how they are synchronized ? Testing and debugging: how to follow many different execution paths ? 9/20",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_009.png",
      "page_index": 216,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:08:37+07:00"
    }
  },
  "CO2017-chapter-4-slide-217-0000": {
    "id": "CO2017-chapter-4-slide-217-0000",
    "text": "Programming challenges  Identifying tasks: how to divide an application into tasks ? Balance: how tasks do the same amount of workload ?  Data splitting: how data of tasks to be splitted ?  Data dependency: data surely does not live alone, how they are synchronized ? Testing and debugging: how to follow many different execution paths ? Textbook 'Many computer science educators believe that software development must be taught with increased emphasis on parallel programming. 590 10/20",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_010.png",
      "page_index": 217,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:08:39+07:00"
    }
  },
  "CO2017-chapter-4-slide-218-0000": {
    "id": "CO2017-chapter-4-slide-218-0000",
    "text": "Do not expect much on multiple threading 16 Ideal Speedup S=0.05 S = 0.10 14 =0.50 12 10 dnpeeds 6 2 0 0 2 4 6 8 10 12 14 16 Number of Processing Cores Amdahl's Law 1 speedup N in which, S: serial portion (in percentage): N: number of cores (threads) 11/20",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_011.png",
      "page_index": 218,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:08:43+07:00"
    }
  },
  "CO2017-chapter-4-slide-219-0000": {
    "id": "CO2017-chapter-4-slide-219-0000",
    "text": "Outline Thread and its benefits 2 Multithreading models 12/20",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_012.png",
      "page_index": 219,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:08:44+07:00"
    }
  },
  "CO2017-chapter-4-slide-220-0000": {
    "id": "CO2017-chapter-4-slide-220-0000",
    "text": "User vs. Kernel threads User threads Thread management done by user-level thread library Examples: POSIX Pthreads, Mach C-threads, Solaris threads Kernel threads  Thread management done at kernel-level by OS Examples: Windows, Linux, Max OS X, Solaris 13/20",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_013.png",
      "page_index": 220,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:08:46+07:00"
    }
  },
  "CO2017-chapter-4-slide-221-0000": {
    "id": "CO2017-chapter-4-slide-221-0000",
    "text": "User vs. Kernel threads User threads  Thread management done by user-level thread library Examples: POSlX Pthreads, Mach C-threads, Solaris threads Kernel threads  Thread management done at kernel-level by OS Examples: Windows, Linux, Max OS X, Solaris A relationship must exist between user threads and kernel threads 14/20",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_014.png",
      "page_index": 221,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:08:48+07:00"
    }
  },
  "CO2017-chapter-4-slide-222-0000": {
    "id": "CO2017-chapter-4-slide-222-0000",
    "text": "Many-to-one Mapping many user-level threads to user thread one kernel thread Issues: kernelthread 15/20",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_015.png",
      "page_index": 222,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:08:50+07:00"
    }
  },
  "CO2017-chapter-4-slide-223-0000": {
    "id": "CO2017-chapter-4-slide-223-0000",
    "text": "Many-to-one Mapping many user-level threads to user thread one kernel thread Issues: if a thread is blocked, the entire process is blocked too. Unable to run in parallel on multicore systems kernelthread 16/20",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_016.png",
      "page_index": 223,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:08:51+07:00"
    }
  },
  "CO2017-chapter-4-slide-224-0000": {
    "id": "CO2017-chapter-4-slide-224-0000",
    "text": "One-to-one user thread kernelthread Mapping each user thread to a kernel thread Issues: 17/ 20",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_017.png",
      "page_index": 224,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:08:53+07:00"
    }
  },
  "CO2017-chapter-4-slide-225-0000": {
    "id": "CO2017-chapter-4-slide-225-0000",
    "text": "One-to-one user thread -kernelthread Mapping each user thread to a kernel thread Issues: Creating a user thread means creating a kernel thread = overhead Number of threads is restricted Linux,Windows 18/20",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_018.png",
      "page_index": 225,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:08:55+07:00"
    }
  },
  "CO2017-chapter-4-slide-226-0000": {
    "id": "CO2017-chapter-4-slide-226-0000",
    "text": "Many-to-many Multiplexing many user-level threads to a smaller or equal number of kernel user thread threads Issues: kemel thread 19/20",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_019.png",
      "page_index": 226,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:08:56+07:00"
    }
  },
  "CO2017-chapter-4-slide-227-0000": {
    "id": "CO2017-chapter-4-slide-227-0000",
    "text": "Many-to-many Multiplexing many user-level threads to a smaller or equal number of kernel user thread threads Issues: Not so many OS implementations apply this model, (Solaris supports) kemel thread 20/20",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_020.png",
      "page_index": 227,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:08:58+07:00"
    }
  },
  "CO2017-chapter-5-slide-228-0000": {
    "id": "CO2017-chapter-5-slide-228-0000",
    "text": "CPU scheduling Tran, Van Hoai Faculty of Computer Science & Engineering HCMC University of Technology E-mail: hoai@hcmut.edu.vn (partly based on slides of Le Thanh Van) 1/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_001.png",
      "page_index": 228,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:08:59+07:00"
    }
  },
  "CO2017-chapter-5-slide-229-0000": {
    "id": "CO2017-chapter-5-slide-229-0000",
    "text": "Outline 1 Basic concepts 2 Scheduling algorithms Scheduling criteria Scheduling algorithms 3 Multiple-processor scheduling 4 Real-time scheduling 5  Algorithm evaluation 590 2/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_002.png",
      "page_index": 229,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:09:01+07:00"
    }
  },
  "CO2017-chapter-5-slide-230-0000": {
    "id": "CO2017-chapter-5-slide-230-0000",
    "text": "Outline 1 Basic concepts 2 Scheduling algorithms Scheduling criteria Scheduling algorithms 3 Multiple-processor scheduling 4 Real-time scheduling 5 Algorithm evaluation 3/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_003.png",
      "page_index": 230,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:09:03+07:00"
    }
  },
  "CO2017-chapter-5-slide-231-0000": {
    "id": "CO2017-chapter-5-slide-231-0000",
    "text": "Why do we need CPU scheduling ? (1) Maximum CPU utilization\" obtained with multiprogramming 4/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_004.png",
      "page_index": 231,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:09:05+07:00"
    }
  },
  "CO2017-chapter-5-slide-232-0000": {
    "id": "CO2017-chapter-5-slide-232-0000",
    "text": "Why do we need CPU scheduling ? (1) load store add store CPU burst Maximum CPU read from file 'utilization\" obtained with wait for l/O I/O burst multiprogramming store increment index CPU burst Process execution consists write to file of a cycle of CPU wait for l/O I/O burst execution (CPU bound) and l/O wait (l/O bound) load store add store CPU burst CPU burst read from file l/O burst wait for l/O I/O burst 5/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_005.png",
      "page_index": 232,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:09:07+07:00"
    }
  },
  "CO2017-chapter-5-slide-233-0000": {
    "id": "CO2017-chapter-5-slide-233-0000",
    "text": "Why do we need CPU scheduling ? (2) process 2 proe 1 2 2 3 1 pooe 1 1 2 2 3 time resource 0/ time 6/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_006.png",
      "page_index": 233,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:09:10+07:00"
    }
  },
  "CO2017-chapter-5-slide-234-0000": {
    "id": "CO2017-chapter-5-slide-234-0000",
    "text": "Why do we need CPU scheduling ? (2) process 2 proe 1 2 2 3 1 pooe 1 1 2 2 3 time resource 0/ 1 time 7/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_007.png",
      "page_index": 234,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:09:12+07:00"
    }
  },
  "CO2017-chapter-5-slide-235-0000": {
    "id": "CO2017-chapter-5-slide-235-0000",
    "text": "Why do we need CPU scheduling ? (2) process 2 proe 1 2 2 3 1 pooe 1 1 2 2 3 time resource 0/ time 8/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_008.png",
      "page_index": 235,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:09:15+07:00"
    }
  },
  "CO2017-chapter-5-slide-236-0000": {
    "id": "CO2017-chapter-5-slide-236-0000",
    "text": "Why do we need CPU scheduling ? (2) process 2 proe 1 2 2 3 1 pooe 1 1 2 2 3 time resource 0/ 1 time 9/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_009.png",
      "page_index": 236,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:09:18+07:00"
    }
  },
  "CO2017-chapter-5-slide-237-0000": {
    "id": "CO2017-chapter-5-slide-237-0000",
    "text": "Why do we need CPU scheduling ? (2) process 2 proe 1 2 2 3 1 pooe 1 1 2 2 3 time resource 0/i time 10/ 72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_010.png",
      "page_index": 237,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:09:21+07:00"
    }
  },
  "CO2017-chapter-5-slide-238-0000": {
    "id": "CO2017-chapter-5-slide-238-0000",
    "text": "Why do we need CPU scheduling ? (2) process 2 proe 1 2 2 3 1 pooe 1 1 2 2 3 time resource 0/i 2 time 11/ 72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_011.png",
      "page_index": 238,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:09:24+07:00"
    }
  },
  "CO2017-chapter-5-slide-239-0000": {
    "id": "CO2017-chapter-5-slide-239-0000",
    "text": "Why do we need CPU scheduling ? (2) process 2 proe 1 2 2 3 1 pooe 1 1 2 2 3 time resource 0/i 2 2 time 12/ 72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_012.png",
      "page_index": 239,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:09:26+07:00"
    }
  },
  "CO2017-chapter-5-slide-240-0000": {
    "id": "CO2017-chapter-5-slide-240-0000",
    "text": "Why do we need CPU scheduling ? (2) process 2 pooe 7 1 2 2 3 1 pooe 1 1 2 2 3 time resource 0/i 1 2 2 nd 2 2 3 3 C time 13/ 72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_013.png",
      "page_index": 240,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:09:29+07:00"
    }
  },
  "CO2017-chapter-5-slide-241-0000": {
    "id": "CO2017-chapter-5-slide-241-0000",
    "text": "Why do we need CPU scheduling ? (3) resource 0/i 1 1 2 2 CdD 1 1 2 2 3 3 time resource 0/i 1 1 2 2 CPU 1 1 2 2 3 3 time 14/ 72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_014.png",
      "page_index": 241,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:09:32+07:00"
    }
  },
  "CO2017-chapter-5-slide-242-0000": {
    "id": "CO2017-chapter-5-slide-242-0000",
    "text": "Why do we need CPU scheduling ? (3) resource 0/i 1 1 2 2 CdD 1 1 2 2 3 3 time resource T Different schedules give different total execution times 1 2 2 3 3 time 15/ 72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_015.png",
      "page_index": 242,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:09:35+07:00"
    }
  },
  "CO2017-chapter-5-slide-243-0000": {
    "id": "CO2017-chapter-5-slide-243-0000",
    "text": "CPU burst distribution 160 140 120 100 80 60 40 20 0 8 16 24 32 40 burst duration(milliseconds 4= 16/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_016.png",
      "page_index": 243,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:09:37+07:00"
    }
  },
  "CO2017-chapter-5-slide-244-0000": {
    "id": "CO2017-chapter-5-slide-244-0000",
    "text": "CPU burst distribution 160 140 120 100 80 60 40 20 0 8 16 24 32 40 burst duration(milliseconds Distribution can be important in the selection of an appropriate CPU-scheduling algorithm 17/ 72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_017.png",
      "page_index": 244,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:09:39+07:00"
    }
  },
  "CO2017-chapter-5-slide-245-0000": {
    "id": "CO2017-chapter-5-slide-245-0000",
    "text": "CPU scheduler Short-term scheduler (CPU scheduler) When CPU is idle, the scheduler selects a process in the ready queue to be executed next Ready queue is not necessarily first-in, first-out (FIFO)  PCBs are used to store processes in queues 18/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_018.png",
      "page_index": 245,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:09:41+07:00"
    }
  },
  "CO2017-chapter-5-slide-246-0000": {
    "id": "CO2017-chapter-5-slide-246-0000",
    "text": "Preemptive vs. nonpreemptive scheduling CPU scheduling decisions take place in one of 4 following cases 1 a process switches from running state to waiting state  process switches from running state to ready state 2 a process switches from waiting state to ready state 3 4 a process terminates 19/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_019.png",
      "page_index": 246,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:09:43+07:00"
    }
  },
  "CO2017-chapter-5-slide-247-0000": {
    "id": "CO2017-chapter-5-slide-247-0000",
    "text": "Preemptive vs. nonpreemptive scheduling CPU scheduling decisions take place in one of 4 following cases 1 a process switches from running state to waiting state  process switches from running state to ready state 2 3 a process switches from waiting state to ready state 4 a process terminates  Cases 1 & 4: scheduler has to (no choice) choose another ready process for execution. -? nonpreemptive or cooperative  Cases 2 & 3: preemptive scheduling. Better, but can lead to race conditions 20/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_020.png",
      "page_index": 247,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:09:46+07:00"
    }
  },
  "CO2017-chapter-5-slide-248-0000": {
    "id": "CO2017-chapter-5-slide-248-0000",
    "text": "What is race condition ? A AA A A At, A At AA 1+1 21/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_021.png",
      "page_index": 248,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:09:48+07:00"
    }
  },
  "CO2017-chapter-5-slide-249-0000": {
    "id": "CO2017-chapter-5-slide-249-0000",
    "text": "Dispatcher Dispatcher A module that gives control of CPU to the process selected by CPU scheduler Functions of dispatcher Switching context Switching to user mode Jumping to proper location in the user program to restart the program Dispatch latency should be kept small 590 22/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_022.png",
      "page_index": 249,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:09:50+07:00"
    }
  },
  "CO2017-chapter-5-slide-250-0000": {
    "id": "CO2017-chapter-5-slide-250-0000",
    "text": "Outline 1 Basic concepts 2 Scheduling algorithms Scheduling criteria Scheduling algorithms 3 Multiple-processor scheduling 4 Real-time scheduling 5Algorithm evaluation 23/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_023.png",
      "page_index": 250,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:09:51+07:00"
    }
  },
  "CO2017-chapter-5-slide-251-0000": {
    "id": "CO2017-chapter-5-slide-251-0000",
    "text": "Scheduling criteria Different criteria suggested for comparing different CPU scheduling algorithms  CPU utilization (max): CPU is kept as busy as possible Throughput (max): number of processes completed per time unit = 24/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_024.png",
      "page_index": 251,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:09:53+07:00"
    }
  },
  "CO2017-chapter-5-slide-252-0000": {
    "id": "CO2017-chapter-5-slide-252-0000",
    "text": "Scheduling criteria Different criteria suggested for comparing different CPU scheduling algorithms  CPU utilization (max): CPU is kept as busy as possible Throughput (max): number of processes completed per time unit Turnaround time (min): interval from submission to completion of a process Waiting time (min): sum of periods spent waiting in the ready queue of a process Response time (min): time from the submission of a request until the first response is produced, not including output time 25/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_025.png",
      "page_index": 252,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:09:56+07:00"
    }
  },
  "CO2017-chapter-5-slide-253-0000": {
    "id": "CO2017-chapter-5-slide-253-0000",
    "text": "Scheduling criteria Different criteria suggested for comparing different CPU scheduling algorithms  CPU utilization (max): CPU is kept as busy as possible Throughput (max): number of processes completed per time unit Turnaround time (min): interval from submission to completion of a process Waiting time (min): sum of periods spent waiting in the ready queue of a process Response time (min): time from the submission of a request until the first response is produced, not including output time Optimize the average measure Optimize the minimum or maximum values Example: minimize the maximum response time 26/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_026.png",
      "page_index": 253,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:09:58+07:00"
    }
  },
  "CO2017-chapter-5-slide-254-0000": {
    "id": "CO2017-chapter-5-slide-254-0000",
    "text": "First come, first served (FCFS) scheduling (1) Process Burst time Arrival time Suppose the processes P1 24 0 arrive in the order: P1 P2 3 0 P2, P3. P3 3 0 27/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_027.png",
      "page_index": 254,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:10:00+07:00"
    }
  },
  "CO2017-chapter-5-slide-255-0000": {
    "id": "CO2017-chapter-5-slide-255-0000",
    "text": "First come, first served (FCFS) scheduling (1) Process Burst time Arrival time Suppose the processes P1 24 0 arrive in the order: P1 P2 3 0 P2, P3. P3 3 0 Then for FCFS scheduling, Gantt chart is as follows P1 P2 P3 0 24 27 30 Waiting time: P1 = 0,P2 = 24,P3 = 27 Average waiting time: (0 + 24 + 27)/3 = 17 28/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_028.png",
      "page_index": 255,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:10:03+07:00"
    }
  },
  "CO2017-chapter-5-slide-256-0000": {
    "id": "CO2017-chapter-5-slide-256-0000",
    "text": "First come, first served (FCFS) scheduling (2) Suppose the processes arrive in the order: P2, P3, P1 Then, Gantt chart is as follows P2 P3 P1 0 3 6 30 Waiting time: P1 = 6,P2 = 0,P3 = 3 Average waiting time: (6 + 0 + 3)/3 = 3 (much better) convoy effect: all other processes wait for one big process gets off the CPU 29/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_029.png",
      "page_index": 256,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:10:06+07:00"
    }
  },
  "CO2017-chapter-5-slide-257-0000": {
    "id": "CO2017-chapter-5-slide-257-0000",
    "text": "Shortest-Job-First (SJF) scheduling  Each job associated with a time length of its next CPU burst Idea: Firstly choosing the job which has shortest time length  SJF is optimal - giving a minimum average waiting time for a given set of jobs 590 30/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_030.png",
      "page_index": 257,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:10:07+07:00"
    }
  },
  "CO2017-chapter-5-slide-258-0000": {
    "id": "CO2017-chapter-5-slide-258-0000",
    "text": "Shortest-Job-First (SJF) scheduling  Each iob associated with a time length of its next CPU burst Idea: Firstly choosing the job which has shortest time length  SJF is optimal - giving a minimum average waiting time for a given set of jobs  2 schemes: Nonpreemptive: once given to the CPU, the process cannot be preempted until completing its CPU burst Preemptive: if a new process arrives with smaller CPU burst length than remaining time of current executing process, preempt. > Its new name is Shortest-Remaining-Time-First (SRTF) 590 31/ 72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_031.png",
      "page_index": 258,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:10:09+07:00"
    }
  },
  "CO2017-chapter-5-slide-259-0000": {
    "id": "CO2017-chapter-5-slide-259-0000",
    "text": "Nonpreemptive  Shortest-Job-First (SJF) scheduling Example Process Arrival time Burst time Then for P1 0 6 nonpreemptive P2 1 3 SJF scheduling P3 2 7 Gantt chart is as P4 3 4 follows cpu time 32/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_032.png",
      "page_index": 259,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:10:13+07:00"
    }
  },
  "CO2017-chapter-5-slide-260-0000": {
    "id": "CO2017-chapter-5-slide-260-0000",
    "text": "Nonpreemptive  Shortest-Job-First (SJF) scheduling Example Process Arrival time Burst time Then for P1 0 6 nonpreemptive P2 1 3 SJF scheduling P3 2 7 Gantt chart is as P4 3 4 follows cpu P1 time 33/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_033.png",
      "page_index": 260,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:10:15+07:00"
    }
  },
  "CO2017-chapter-5-slide-261-0000": {
    "id": "CO2017-chapter-5-slide-261-0000",
    "text": "Nonpreemptive  Shortest-Job-First (SJF) scheduling Example Process Arrival time Burst time Then for P1 0 6 nonpreemptive P2 1 3 SJF scheduling P3 2 7 Gantt chart is as P4 3 4 follows cpu P1 P2 time 34/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_034.png",
      "page_index": 261,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:10:18+07:00"
    }
  },
  "CO2017-chapter-5-slide-262-0000": {
    "id": "CO2017-chapter-5-slide-262-0000",
    "text": "Nonpreemptive  Shortest-Job-First (SJF) scheduling Example Process Arrival time Burst time Then for P1 0 6 nonpreemptive P2 1 3 SJF scheduling P3 2 7 Gantt chart is as P4 3 4 follows cpu P1 P2 P4 time 35/ 72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_035.png",
      "page_index": 262,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:10:21+07:00"
    }
  },
  "CO2017-chapter-5-slide-263-0000": {
    "id": "CO2017-chapter-5-slide-263-0000",
    "text": "Nonpreemptive Shortest-Job-First (SJF) scheduling Example Process Arrival time Burst time Then for P1 0 6 nonpreemptive P2 1 3 SJF scheduling P3 2 7 Gantt chart is as P4 3 4 follows cpu P1 P2 P4 P3 time  Average waiting time: ((0-0)+(6-1)+(13-2)+(9-3))/4=5.5 36/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_036.png",
      "page_index": 263,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:10:25+07:00"
    }
  },
  "CO2017-chapter-5-slide-264-0000": {
    "id": "CO2017-chapter-5-slide-264-0000",
    "text": "Preemptive Shortest-Job-First scheduling (SRTF) Example Process Arrival time Burst time Then for P1 0 6 nonpreemptive P2 1 3 SJF scheduling P3 2 7 Gantt chart is as P4 3 4 follows cpu time  Average waiting time: ((8 -1) + (1-1) + (13- 2) + (4- 3)/4 = 4.75 37/ 72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_037.png",
      "page_index": 264,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:10:28+07:00"
    }
  },
  "CO2017-chapter-5-slide-265-0000": {
    "id": "CO2017-chapter-5-slide-265-0000",
    "text": "Preemptive Shortest-Job-First scheduling (SRTF) Example Process Arrival time Burst time Then for P1 0 6 nonpreemptive P2 1 3 SJF scheduling P3 2 7 Gantt chart is as P4 3 4 follows cpu P1 time  Average waiting time: ((8 -1) + (1-1) + (13- 2) + (4- 3)/4 = 4.75 38/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_038.png",
      "page_index": 265,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:10:30+07:00"
    }
  },
  "CO2017-chapter-5-slide-266-0000": {
    "id": "CO2017-chapter-5-slide-266-0000",
    "text": "Preemptive Shortest-Job-First scheduling (SRTF) Example Process Arrival time Burst time Then for P1 0 6 nonpreemptive P2 1 3 SJF scheduling P3 2 7 Gantt chart is as P4 3 4 follows cpu P1 P2 time  Average waiting time: ((8-1) +(1-1) +(13- 2) +(4-3)/4 = 4.75 39/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_039.png",
      "page_index": 266,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:10:34+07:00"
    }
  },
  "CO2017-chapter-5-slide-267-0000": {
    "id": "CO2017-chapter-5-slide-267-0000",
    "text": "Preemptive Shortest-Job-First scheduling (SRTF) Example Process Arrival time Burst time Then for P1 0 6 nonpreemptive P2 1 3 SJF scheduling P3 2 7 Gantt chart is as P4 3 4 follows cpu P1 P2 P4 time  Average waiting time: ((8 -1) + (1-1) + (13- 2) + (4- 3)/4 = 4.75 40/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_040.png",
      "page_index": 267,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:10:37+07:00"
    }
  },
  "CO2017-chapter-5-slide-268-0000": {
    "id": "CO2017-chapter-5-slide-268-0000",
    "text": "Preemptive Shortest-Job-First scheduling (SRTF) Example Process Arrival time Burst time Then for P1 0 6 nonpreemptive P2 1 3 SJF scheduling P3 2 7 Gantt chart is as P4 3 4 follows cpu P1 P2 P4 P1 time  Average waiting time: ((8 -1) + (1-1) + (13- 2) + (4- 3)/4 = 4.75 41/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_041.png",
      "page_index": 268,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:10:40+07:00"
    }
  },
  "CO2017-chapter-5-slide-269-0000": {
    "id": "CO2017-chapter-5-slide-269-0000",
    "text": "Preemptive Shortest-Job-First scheduling (SRTF) Example Process Arrival time Burst time Then for P1 0 6 nonpreemptive P2 1 3 SJF scheduling P3 2 7 Gantt chart is as P4 3 4 follows cpu P1 P2 P4 P1 P3 time  Average waiting time: ((8 -1) + (1-1) + (13- 2) + (4- 3)/4 = 4.75 42/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_042.png",
      "page_index": 269,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:10:43+07:00"
    }
  },
  "CO2017-chapter-5-slide-270-0000": {
    "id": "CO2017-chapter-5-slide-270-0000",
    "text": "Length of burst time SJF is only optimal if burst time (or remaining time) of all jobs must be known in advance for scheduling 43/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_043.png",
      "page_index": 270,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:10:45+07:00"
    }
  },
  "CO2017-chapter-5-slide-271-0000": {
    "id": "CO2017-chapter-5-slide-271-0000",
    "text": "Length of burst time SJF is only optimal if burst time (or remaining time) of all jobs must be known in advance for scheduling  Length of next CPU burst can be predicted (approximate SJF scheduling) 44/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_044.png",
      "page_index": 271,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:10:46+07:00"
    }
  },
  "CO2017-chapter-5-slide-272-0000": {
    "id": "CO2017-chapter-5-slide-272-0000",
    "text": "Length of burst time SJF is only optimal if burst time (or remaining time) of all jobs must be known in advance for scheduling  Length of next CPU burst can be predicted (approximate SJF scheduling)  Next CPU burst = exponential average of measured lengths of previous CPU bursts Tn+1 = atn + (1 - a)Tn 12 T; 10 8 in which 6  0<a<1 4 2 tn: length of nth CPU burst (recent history) time  Tn: predicted length of nth CPU burst (past CPU burst () 6 4 6 13 13 13 \"guess\"(t,) 8 6 5 11 12 history) 10 45/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_045.png",
      "page_index": 272,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:10:49+07:00"
    }
  },
  "CO2017-chapter-5-slide-273-0000": {
    "id": "CO2017-chapter-5-slide-273-0000",
    "text": "Length of burst time SJF is only optimal if burst time (or remaining time) of all jobs must be known in advance for scheduling  Length of next CPU burst can be predicted (approximate SJF scheduling)  Next CPU burst = exponential average of measured lengths of previous CPU bursts Tn+1 = atn + (1 - a)Tr 12 T; 10 8 in which Why exponential average ? Tn+1 = atn+(1-a)atn-1+.. .+(1-a)atn-j+. ..+(1-a)\"+1To CPU guess10 6 6 5 9 11 12 history) 46/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_046.png",
      "page_index": 273,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:10:52+07:00"
    }
  },
  "CO2017-chapter-5-slide-274-0000": {
    "id": "CO2017-chapter-5-slide-274-0000",
    "text": "Priority scheduling (1) Can we generalize SJF by using a number instead of CPU burst time ? 47/ 72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_047.png",
      "page_index": 274,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:10:54+07:00"
    }
  },
  "CO2017-chapter-5-slide-275-0000": {
    "id": "CO2017-chapter-5-slide-275-0000",
    "text": "Priority scheduling (1) Can we generalize SJF by using a number instead of CPU burst time ? Priority scheduling  A priority (a number) is associated with a process  CPU is allocated to the process with the highest priority  Assumption: lowest number - highest priority 590 48/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_048.png",
      "page_index": 275,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:10:56+07:00"
    }
  },
  "CO2017-chapter-5-slide-276-0000": {
    "id": "CO2017-chapter-5-slide-276-0000",
    "text": "Priority scheduling (1)  Can we generalize SJF by using a number instead of CPU burst time ? Priority scheduling Process Burst time Priority  A priority (a number) is P1 10 associated with a process 3 P2 1 1  CPU is allocated to the P3 2 4 process with the highest P4 1 5 priority P5 5 2 Assumption: lowest number  highest priority PS P1 P4 0 1 6 16 18 19 49/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_049.png",
      "page_index": 276,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:10:59+07:00"
    }
  },
  "CO2017-chapter-5-slide-277-0000": {
    "id": "CO2017-chapter-5-slide-277-0000",
    "text": "Priority scheduling (1)  Can we generalize SJF by using a number instead of CPU burst time ? Priority scheduling Process Burst time Priority  A priority (a number) is P1 10 3 associated with a process P2 1 1 CPU is allocated to the P3 2 4 process with the highest P4 1 5 priority P5 5 2  Assumption: lowest number SJF as a special case of priority scheduling Priority = CPU burst time : 5 1 : 3  4 0 1 6 16 18 19 50/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_050.png",
      "page_index": 277,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:11:04+07:00"
    }
  },
  "CO2017-chapter-5-slide-278-0000": {
    "id": "CO2017-chapter-5-slide-278-0000",
    "text": "Priority scheduling (2)  Priority can be preemptive or nonpreemptive 51/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_051.png",
      "page_index": 278,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:11:05+07:00"
    }
  },
  "CO2017-chapter-5-slide-279-0000": {
    "id": "CO2017-chapter-5-slide-279-0000",
    "text": "Priority scheduling (2)  Priority can be preemptive or nonpreemptive  Priorities can be defined internally or externally Internally defined: using some measurable quantities Example: time limit, memory requirement, ratio of I/0 burst to CPU burst Externally defined: set by criteria outside OS Example: importance of process, type/amount of funds for computer usage 59C 52/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_052.png",
      "page_index": 279,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:11:07+07:00"
    }
  },
  "CO2017-chapter-5-slide-280-0000": {
    "id": "CO2017-chapter-5-slide-280-0000",
    "text": "Priority scheduling (2)  Priority can be preemptive or nonpreemptive Priorities can be defined internally or externally Internally defined: using some measurable quantities Example: time limit, memory requirement, ratio of I/0 burst to CPU burst Externally defined: set by criteria outside OS Example: importance of process, type/amount of funds for computer usage Indefinite blocking (starvation)  Low-priority processes can wait indefinitely Solution to starvation is aging which involves gradually increasing the priority of processes that waiting too long 590 53/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_053.png",
      "page_index": 280,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:11:09+07:00"
    }
  },
  "CO2017-chapter-5-slide-281-0000": {
    "id": "CO2017-chapter-5-slide-281-0000",
    "text": "Round-robin (RR) scheduling Round-robin scheduling  Each process gets a small unit of CPU time (time quantum or time slice)  After quantum has elapsed, the process is preempted and added to the end of the ready queue 54/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_054.png",
      "page_index": 281,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:11:10+07:00"
    }
  },
  "CO2017-chapter-5-slide-282-0000": {
    "id": "CO2017-chapter-5-slide-282-0000",
    "text": "Round-robin (RR) scheduling Round-robin scheduling  Each process gets a small unit of CPU time (time quantum or time slice)  After quantum has elapsed, the process is preempted and added to the end of the ready queue Time quantum is usually 10-100 milliseconds n processes in ready queue, time quantum = q (time units) ? no process waits more than (n - 1)q time units 55/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_055.png",
      "page_index": 282,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:11:13+07:00"
    }
  },
  "CO2017-chapter-5-slide-283-0000": {
    "id": "CO2017-chapter-5-slide-283-0000",
    "text": "Round-robin (RR) scheduling Round-robin scheduling  Each process gets a small unit of CPU time (time quantum or time slice)  After quantum has elapsed, the process is preempted and added to the end of the ready queue Time quantum is usually 10-100 milliseconds n processes in ready queue, time quantum = q (time units) > no process waits more than (n - 1)q time units Performance  q large > FCFS q small -> overhead is too high due to context switching 56/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_056.png",
      "page_index": 283,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:11:16+07:00"
    }
  },
  "CO2017-chapter-5-slide-284-0000": {
    "id": "CO2017-chapter-5-slide-284-0000",
    "text": "Round-robin (RR) scheduling Example Process Burst time P1 24 P2 3 P3 3 Time quantum = 4 PS P1 P1 Pi Pi 0 4 7 10 14 18 22 26 30 Average waiting time: ((10 - 4) + (4 - 0) + (7 - 0))/3 = 5.66 57/ 72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_057.png",
      "page_index": 284,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:11:18+07:00"
    }
  },
  "CO2017-chapter-5-slide-285-0000": {
    "id": "CO2017-chapter-5-slide-285-0000",
    "text": "Round-robin (RR) scheduling mpacts of quantum On turnaround time process time 12.5 P1 6 12.0 P2 3 P3 1 11.5 P4 7 11.0 10.5 10.0 9.5 9.0 1 2 3 4 5 6 7 time quantum 58/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_058.png",
      "page_index": 285,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:11:21+07:00"
    }
  },
  "CO2017-chapter-5-slide-286-0000": {
    "id": "CO2017-chapter-5-slide-286-0000",
    "text": "Round-robin (RR) scheduling Impacts of quantum On turnaround time process time 12.5 P1 6 12.0 P2 3 Pa 1 11.5 PA 7 11.0 10.5 10.0 On context switches 9.5 process time= 10 quantum context 9.0 switches 12 0 O 10 1 2 3 4 5 6 7 6 1 time quantum 0 10 6 1 9 0 1 2 3 4 5 6 7 8 9 10 59/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_059.png",
      "page_index": 286,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:11:27+07:00"
    }
  },
  "CO2017-chapter-5-slide-287-0000": {
    "id": "CO2017-chapter-5-slide-287-0000",
    "text": "Multilevel queue scheduling Multilevel queue scheduling Ready queue is partitioned separate queues according to different response-time requirement: foreground interactive) processes and background (batch) processes highest priority systemprocesses interactive processes interactive editing processes batch processes student processes lowest priority 590 60/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_060.png",
      "page_index": 287,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:11:29+07:00"
    }
  },
  "CO2017-chapter-5-slide-288-0000": {
    "id": "CO2017-chapter-5-slide-288-0000",
    "text": "Multilevel queue scheduling Multilevel queue scheduling Ready queue is partitioned separate queues according to different response-time requirement: foreground interactive) processes and background (batch) processes  Each queue has its own scheduling algorithm. For example RR for foreground queue highest priority  FCFS for background queue system processes  Scheduling is needed between the interactive processes queues interactive editing processes Fixed preemptive scheduling - batch processes starvation student processes Time slice: each queue is assigned an lowest priority amount of time For example: 80% for foreground queue; 20% for background queue 590 61/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_061.png",
      "page_index": 288,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:11:33+07:00"
    }
  },
  "CO2017-chapter-5-slide-289-0000": {
    "id": "CO2017-chapter-5-slide-289-0000",
    "text": "Multilevel feedback queue scheduling Multilevel feedback A multilevel queue scheduling but allowing a process to move between queues. Separating processes according to their CPU burst times Process with much CPU time moved to low-priority queue Process waiting too long in low-priority queue moved to higher priority queue quantum = 8 quantum=16 FCFS 62/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_062.png",
      "page_index": 289,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:11:36+07:00"
    }
  },
  "CO2017-chapter-5-slide-290-0000": {
    "id": "CO2017-chapter-5-slide-290-0000",
    "text": "Multilevel feedback queue scheduling Multilevel feedback A multilevel queue scheduling but allowing a process to move between queues.  Separating processes according to their CPU burst times Process with much CPU time moved to low-priority queue Process waiting too long in low-priority queue moved to higher priority queue Parameters of multilevel feedback queue scheduling: quantum = 8 number of queues scheduling algorithm for each queue quantum = 16 method to upgrade a process to higher queue; method to demote (giäng cäp) a process to lower queue FCFS  method to choose which queue to put a process for service 63/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_063.png",
      "page_index": 290,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:11:38+07:00"
    }
  },
  "CO2017-chapter-5-slide-291-0000": {
    "id": "CO2017-chapter-5-slide-291-0000",
    "text": "Multilevel feedback queue scheduling Example Three queues Qo - quantum = 8 Q1 - quantum = 16 Q2 - FCFS Scheduling A new job enters queue Qo which is served FCFS. When it gains CPU, job receives 8 milliseconds. If it does not finish in 8 milliseconds, job is moved to queue Q1 At Q1 job is again served FCFS and receives 16 additional milliseconds. If it still does not complete, it is preempted and moved to queue Q2 590 64/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_064.png",
      "page_index": 291,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:11:40+07:00"
    }
  },
  "CO2017-chapter-5-slide-292-0000": {
    "id": "CO2017-chapter-5-slide-292-0000",
    "text": "Outline 1 Basic concepts 2 Scheduling algorithms 1 Scheduling criteria Scheduling algorithms 3 Multiple-processor scheduling 4 Real-time scheduling  Algorithm evaluation 65/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_065.png",
      "page_index": 292,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:11:42+07:00"
    }
  },
  "CO2017-chapter-5-slide-293-0000": {
    "id": "CO2017-chapter-5-slide-293-0000",
    "text": "Multiple-processor scheduling Challenges Scheduling on multiple-processor systems are more complex  Homogeneous processors within a multiprocessor  Load sharing among multiple CPUs Asymmetric multiprocessing: only one processor accesses the system data structures, alleviating the need for data sharing Most OSs are using symmetric multiprocessing  Processor affinity (than thuöc): a process is not migrated to another one than currently running Migration could lead to cache invalidation or repopulation. 590 66/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_066.png",
      "page_index": 293,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:11:44+07:00"
    }
  },
  "CO2017-chapter-5-slide-294-0000": {
    "id": "CO2017-chapter-5-slide-294-0000",
    "text": "Load balancing Load balancing Keeping the workload evenly distributed across all processors  Only necessary on systems where each processor has its own private ready queue  Load balancing vs. processor affinity  Load balancing can be performed in 2 forms push migration pull migration 590 67/ 72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_067.png",
      "page_index": 294,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:11:46+07:00"
    }
  },
  "CO2017-chapter-5-slide-295-0000": {
    "id": "CO2017-chapter-5-slide-295-0000",
    "text": "Outline 1 Basic concepts 2 Scheduling algorithms 1 Scheduling criteria Scheduling algorithms 3 Multiple-processor scheduling 4 Real-time scheduling  Algorithm evaluation 68/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_068.png",
      "page_index": 295,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:11:48+07:00"
    }
  },
  "CO2017-chapter-5-slide-296-0000": {
    "id": "CO2017-chapter-5-slide-296-0000",
    "text": "Real-time scheduling Real-time scheduling  Hard read-time systems: required to complete a critical task within a guaranteed amount of time  Soft real-time computing: requires that critical processes receive priority over less fortunate ones Event latency kept small in order to increase responsiveness to events (minimizing latency) event E first occurs event latency to real-time system responds to E Time  Real-time system must have priority-based scheduling with preemption 590 69/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_069.png",
      "page_index": 296,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:11:50+07:00"
    }
  },
  "CO2017-chapter-5-slide-297-0000": {
    "id": "CO2017-chapter-5-slide-297-0000",
    "text": "Outline 1 Basic concepts 2 Scheduling algorithms 1 Scheduling criteria Scheduling algorithms 3 Multiple-processor scheduling 4 Real-time scheduling 5  Algorithm evaluation 70/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_070.png",
      "page_index": 297,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:11:52+07:00"
    }
  },
  "CO2017-chapter-5-slide-298-0000": {
    "id": "CO2017-chapter-5-slide-298-0000",
    "text": "Algorithm evaluation  Deterministic modeling takes a particular predetermined workload periormance simulation statistics and defines the forFCFS FCES performance of each /0213 actual algorithm for that performance process 112 simulation CPU statistics execution 2 for SJF 147 workload SJF CPU 173 trace tape Queueing models performance simulation statistlics for RR (q = 14)  Computer simulation RRq=14 (e.g., by discrete-event simulation) 71/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_071.png",
      "page_index": 298,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:11:56+07:00"
    }
  },
  "CO2017-chapter-5-slide-299-0000": {
    "id": "CO2017-chapter-5-slide-299-0000",
    "text": "Homeworks 1 Read materials on Multiple processor scheduling & Realtime-scheduling: textbook, slides (Nguyen Thanh Son) 72/72",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_072.png",
      "page_index": 299,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:11:57+07:00"
    }
  },
  "CO2017-chapter-6-slide-300-0000": {
    "id": "CO2017-chapter-6-slide-300-0000",
    "text": "Process synchronization Tran, Van Hoai Faculty of Computer Science & Engineering HCMC University of Technology E-mail: hoai@hcmut.edu.vn (partly based on slides of Le Thanh Van) 1/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_001.png",
      "page_index": 300,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:11:59+07:00"
    }
  },
  "CO2017-chapter-6-slide-301-0000": {
    "id": "CO2017-chapter-6-slide-301-0000",
    "text": "Outline 1 Basic concepts 2 Critical-section (CS) problem 3 Synchronization hardware 4 Software tools for synchronization Mutex lock Semaphores 5 Synchronization problems 590 2/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_002.png",
      "page_index": 301,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:12:00+07:00"
    }
  },
  "CO2017-chapter-6-slide-302-0000": {
    "id": "CO2017-chapter-6-slide-302-0000",
    "text": "Outline 1 Basic concepts 2 Critical-section CS problem  Synchronization hardware 4 Software tools for synchronization  Mutex lock Semaphores 5 Synchronization problems 3/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_003.png",
      "page_index": 302,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:12:02+07:00"
    }
  },
  "CO2017-chapter-6-slide-303-0000": {
    "id": "CO2017-chapter-6-slide-303-0000",
    "text": "Why do we study synchronization ? (1)  Different CPU schedulers produce different timings for scheduled processes The correctness of a concurrent program should not depend on accidents of timing Cash A B C D machines deposit$100 withdraw $100 deposit$100 get balance to account l from account 2 to account l of account Bank $50 $200 $50 Shared memory account I account2 account3 (Source: mit.edu) Cooperating (concurrent) processes which possibly share a logical address can create the inconsistency in shared data 4/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_004.png",
      "page_index": 303,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:12:06+07:00"
    }
  },
  "CO2017-chapter-6-slide-304-0000": {
    "id": "CO2017-chapter-6-slide-304-0000",
    "text": "Why do we study synchronization ? (2) Account = 0 Machine 3 Machine 2 Machine 1 time 5/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_005.png",
      "page_index": 304,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:12:07+07:00"
    }
  },
  "CO2017-chapter-6-slide-305-0000": {
    "id": "CO2017-chapter-6-slide-305-0000",
    "text": "Why do we study synchronization ? (2) Account = $100 Machine 3 Machine 2 deposit Machine 1 $106 time 590 6/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_006.png",
      "page_index": 305,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:12:08+07:00"
    }
  },
  "CO2017-chapter-6-slide-306-0000": {
    "id": "CO2017-chapter-6-slide-306-0000",
    "text": "Why do we study synchronization ? (2) Account = $300 Machine 3 deposit Machine 2 $200 deposit Machine 1 $106 time 590 7/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_007.png",
      "page_index": 306,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:12:10+07:00"
    }
  },
  "CO2017-chapter-6-slide-307-0000": {
    "id": "CO2017-chapter-6-slide-307-0000",
    "text": "Why do we study synchronization ? (2) Account = $300 get = Machine 3 $300 deposit Machine 2 $200 deposit Machine 1 $100 time 8/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_008.png",
      "page_index": 307,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:12:11+07:00"
    }
  },
  "CO2017-chapter-6-slide-308-0000": {
    "id": "CO2017-chapter-6-slide-308-0000",
    "text": "Why do we study synchronization ? (3) Account = ??? Machine 3 get = ??? Machine 2 deposit $200 Machine 1 deposit $100 time 9/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_009.png",
      "page_index": 308,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:12:13+07:00"
    }
  },
  "CO2017-chapter-6-slide-309-0000": {
    "id": "CO2017-chapter-6-slide-309-0000",
    "text": "Use a counter to remedy (chüa benh) for buffer size of BUFFER SIZE - 1 Producer Consumer item next_produced; item next_consumed; while (true){ while (true){ while ( counter == BUFFER_SIZE  while ( counter == 0 ) ; /* do nothing */ ; /* do nothing */ buffer[ in ] = next_produced; next_consumed = buffer[ out ]; in = ( in + 1 ) % BUFFER_SIZE; out = ( out + 1 ) % BUFFER_SIZE; counter ++; counter --; } } The codes seem correct, but not  Suppose currently counter = 5, then 2 statements counter++ and counter-- executed concurrently After those executed, value of counter could be 4, 5, or 6 (inconsistently). (the expected is 5) 10/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_010.png",
      "page_index": 309,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:12:16+07:00"
    }
  },
  "CO2017-chapter-6-slide-310-0000": {
    "id": "CO2017-chapter-6-slide-310-0000",
    "text": "Inconsistency in shared-memory communication (2) counter++ counter- register1 = counter register2 = counter register1 = register1 + 1 register2 = register2 - 1 counter = register1 counter = register2 Concurrent execution of 2 processes is interleaved in a low-level sequential execution in any arbitrary order, perhaps as follows To: producer execute register1 = counter (register1 = 5) T1: producer execute register1 = register1 + 1 (register1 = 6) T2: consumer execute register2 = counter (register2 = 5) T3: consumer execute register2 = register2 - 1 (register2 = 4) T4: producer execute counter = register1 (counter = 6) T5: consumer execute counter = register2 (counter = 4) 11/ 75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_011.png",
      "page_index": 310,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:12:19+07:00"
    }
  },
  "CO2017-chapter-6-slide-311-0000": {
    "id": "CO2017-chapter-6-slide-311-0000",
    "text": "Inconsistency in shared-memory communication (2) counter++ counter- register1 = counter register2 = counter register1 = register1 + 1 register2 = register2 - 1 counter = registeri counter = register2 Concurrent execution of 2 processes is interleaved in a low-level sequential execution in any arbitrary order, perhaps as follows To:  producer execute register = counter (register1 = 5) Race condition Outcome of executing of multiple cooperating concurrent processes depends on particular order of their access events 12/ 75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_012.png",
      "page_index": 311,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:12:22+07:00"
    }
  },
  "CO2017-chapter-6-slide-312-0000": {
    "id": "CO2017-chapter-6-slide-312-0000",
    "text": "Race condition example: forkQ) P1 pid_t child = fork 0; pid_t child = fork 0; request request pid pid fmle next available pid = 2615 return return 2615 2615 child= 2615 child= 2615 13/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_013.png",
      "page_index": 312,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:12:24+07:00"
    }
  },
  "CO2017-chapter-6-slide-313-0000": {
    "id": "CO2017-chapter-6-slide-313-0000",
    "text": "Outline 1 Basic concepts 2 Critical-section (CS) problem  Synchronization hardware 4 Software tools for synchronization  Mutex lock Semaphores Synchronization problems 14/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_014.png",
      "page_index": 313,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:12:26+07:00"
    }
  },
  "CO2017-chapter-6-slide-314-0000": {
    "id": "CO2017-chapter-6-slide-314-0000",
    "text": "Critical section Multiple processes should have the following structure to avoid race condition do { entry section critical section exit section remainder section } while (true); 15/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_015.png",
      "page_index": 314,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:12:28+07:00"
    }
  },
  "CO2017-chapter-6-slide-315-0000": {
    "id": "CO2017-chapter-6-slide-315-0000",
    "text": "Critical section Multiple processes should have the following structure to avoid race condition do { Critical section in kernel-mode process entry section  Kernel-mode processes share some critical section kernel data structures list of opened files exit section 2 approaches to handle critical remainder section sections in OS } while (true);  Nonpreemptive kernel: kernel-mode process cannot be preempted ? No race conditions C  Preemptive kernel: kernel-mode process can be preempted  more responsive, but prone to critical section 16/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_016.png",
      "page_index": 315,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:12:31+07:00"
    }
  },
  "CO2017-chapter-6-slide-316-0000": {
    "id": "CO2017-chapter-6-slide-316-0000",
    "text": "Conditions to critical section Mutual exclusion: at most one process allowed in critical section Progress: if no process in critical section and some (one or more) wish to enter critical section, the selection of which (of these processes) will enter cannot be postponed indefinitely Bounded waiting: a limit on number of times which other processes allowed to enter critical section after a process makes a request and before that request granted. 17/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_017.png",
      "page_index": 316,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:12:34+07:00"
    }
  },
  "CO2017-chapter-6-slide-317-0000": {
    "id": "CO2017-chapter-6-slide-317-0000",
    "text": "Algorithm 1 for CS assumed for case of 2 processes  Processes do not know which is in CS Process Pj -? use a shared variable \"turn do { while ( turn != i  ; to know which is in CS. (Initially /* critical section code is here */ turn = j; /* remainder section code is here */ turn=0) } while(true); turn = i =y P; is in its CS 18/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_018.png",
      "page_index": 317,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:12:37+07:00"
    }
  },
  "CO2017-chapter-6-slide-318-0000": {
    "id": "CO2017-chapter-6-slide-318-0000",
    "text": "Algorithm 1 for CS assumed for case of 2 processes  Processes do not know which is in CS Process Pj -? use a shared variable \"turn do { while ( turn != i  ; to know which is in CS. (Initially /* critical section code is here */ turn = j; /* remainder section code is here */ turn=0) } while(true); turn = i =y P is in its CS Satisfies mutual exclusion, bounded waiting 19/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_019.png",
      "page_index": 318,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:12:39+07:00"
    }
  },
  "CO2017-chapter-6-slide-319-0000": {
    "id": "CO2017-chapter-6-slide-319-0000",
    "text": "Algorithm 1 for CS assumed for case of 2 processes  Processes do not know which is in CS Process Pj -? use a shared variable \"turn do { while ( turn != i  ;) to know which is in CS. (Initially /* critical section code is here */ turn = j; /* remainder section code is here */ turn=0) } while(true); turn = i = P is in its CS Satisfies mutual exclusion, bounded waiting turn=0 time 20/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_020.png",
      "page_index": 319,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:12:42+07:00"
    }
  },
  "CO2017-chapter-6-slide-320-0000": {
    "id": "CO2017-chapter-6-slide-320-0000",
    "text": "Algorithm 1 for CS assumed for case of 2 processes  Processes do not know which is in CS Process Pj -? use a shared variable \"turn do { while ( turn != i  ;) to know which is in CS. (Initially /* critical section code is here */ turn = j; /* remainder section code is here */ turn=0) } while(true); turn = i = P is in its CS Satisfies mutual exclusion, bounded waiting (1==uan4) turn=0 - time 21/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_021.png",
      "page_index": 320,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:12:45+07:00"
    }
  },
  "CO2017-chapter-6-slide-321-0000": {
    "id": "CO2017-chapter-6-slide-321-0000",
    "text": "Algorithm 1 for CS assumed for case of 2 processes  Processes do not know which is in CS Process Pj -? use a shared variable \"turn do { while ( turn != i  ; to know which is in CS. (Initially /* critical section code is here */ turn = j; /* remainder section code is here */ turn=0) } while(true); turn = i =y P is in its CS Satisfies mutual exclusion, bounded waiting t i(1==uan4) (0==un4) turn=0 time 22/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_022.png",
      "page_index": 321,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:12:48+07:00"
    }
  },
  "CO2017-chapter-6-slide-322-0000": {
    "id": "CO2017-chapter-6-slide-322-0000",
    "text": "Algorithm 1 for CS assumed for case of 2 processes  Processes do not know which is in CS Process Pj -? use a shared variable \"turn do { while ( turn != i  ;) to know which is in CS. (Initially /* critical section code is here */ turn = j; /* remainder section code is here */ turn=0) } while(true); turn = i = P is in its CS Satisfies mutual exclusion, bounded waiting ter t t T (I==un4) turn=0 D time 23/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_023.png",
      "page_index": 322,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:12:51+07:00"
    }
  },
  "CO2017-chapter-6-slide-323-0000": {
    "id": "CO2017-chapter-6-slide-323-0000",
    "text": "Algorithm 1 for CS assumed for case of 2 processes  Processes do not know which is in CS Process Pj -? use a shared variable \"turn do { while ( turn != i  ; to know which is in CS. (Initially /* critical section code is here */ turn = j; /* remainder section code is here */ turn=0) } while(true); turn = i =y P; is in its CS Satisfies mutual exclusion, bounded waiting t T ys!uy 8 i(1==un4) turn=1 ==un+ =uxn time 24/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_024.png",
      "page_index": 323,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:12:55+07:00"
    }
  },
  "CO2017-chapter-6-slide-324-0000": {
    "id": "CO2017-chapter-6-slide-324-0000",
    "text": "Algorithm 1 for CS assumed for case of 2 processes  Processes do not know which is in CS Process Pj -? use a shared variable \"turn do { while ( turn != i  ;) to know which is in CS. (Initially /* critical section code is here */ turn = j; /* remainder section code is here */ turn=0) } while(true); turn = i = P is in its CS Satisfies mutual exclusion, bounded waiting ter t T 1 i(1==uans) i(1==uns) turn=1 0= 1=uxn o time 25/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_025.png",
      "page_index": 324,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:12:58+07:00"
    }
  },
  "CO2017-chapter-6-slide-325-0000": {
    "id": "CO2017-chapter-6-slide-325-0000",
    "text": "Algorithm 1 for CS assumed for case of 2 processes  Processes do not know which is in CS Process Pj -? use a shared variable \"turn do { while ( turn != i  ;) to know which is in CS. (Initially /* critical section code is here */ turn = j; /* remainder section code is here */ turn=0) } while(true); turn = i = P is in its CS Satisfies mutual exclusion, bounded waiting , but not progress Cs t T 1 i(I==uan4) i(1==uns) turn=1 turn=0 0= T 1=uxn o time time 26/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_026.png",
      "page_index": 325,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:13:02+07:00"
    }
  },
  "CO2017-chapter-6-slide-326-0000": {
    "id": "CO2017-chapter-6-slide-326-0000",
    "text": "Algorithm 1 for CS assumed for case of 2 processes  Processes do not know which is in CS Process Pj -? use a shared variable \"turn do { while ( turn != i  ; to know which is in CS. (Initially /* critical section code is here */ turn = j; /* remainder section code is here */ turn=0) } while(true); turn = i =y P is in its CS Satisfies mutual exclusion, bounded waiting , but not progress Cs So ys!uiy t T 1 i(1==un4) i(1==uns) turn=1 turn=1 0= T 1=uxn =uxn o time time 27/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_027.png",
      "page_index": 326,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:13:07+07:00"
    }
  },
  "CO2017-chapter-6-slide-327-0000": {
    "id": "CO2017-chapter-6-slide-327-0000",
    "text": "Algorithm 1 for CS assumed for case of 2 processes  Processes do not know which is in CS Process Pj -? use a shared variable \"turn do { while ( turn != i  ;) to know which is in CS. (Initially /* critical section code is here */ turn = j; /* remainder section code is here */ turn=0) } while(true); turn = i = P is in its CS Satisfies mutual exclusion, bounded waiting , but not progress ysiuiy t T 1 i(I==uan4) i(1==un4) turn=1 i(I==uxn) turn=1 0= T 1=uxn =uxn+ un o & time time 28/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_028.png",
      "page_index": 327,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:13:11+07:00"
    }
  },
  "CO2017-chapter-6-slide-328-0000": {
    "id": "CO2017-chapter-6-slide-328-0000",
    "text": "Algorithm 1 for CS assumed for case of 2 processes  Processes do not know which is in CS Process Pj -? use a shared variable \"turn do { while ( turn != i  ;) to know which is in CS. (Initially /* critical section code is here */ turn = j; /* remainder section code is here */ turn=0) } while(true); turn = i = P is in its CS Satisfies mutual exclusion, bounded waiting , but not progress ysiuiy t T 1 i(I==uan4) i(1==uns) turn=1 ==uxn+ turn=0 T I 1=uxn =un un o time time 29/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_029.png",
      "page_index": 328,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:13:16+07:00"
    }
  },
  "CO2017-chapter-6-slide-329-0000": {
    "id": "CO2017-chapter-6-slide-329-0000",
    "text": "Algorithm 1 for CS assumed for case of 2 processes  Processes do not know which is in CS Process Pj -? use a shared variable \"turn do { while ( turn != i  ; to know which is in CS. (Initially /* critical section code is here */ turn = j; /* remainder section code is here */ turn=0) } while(true); turn = i =y P; is in its CS Satisfies mutual exclusion, bounded waiting , but not progress t T K t T i(1==un4) i(1==un4) turn=1 &(I==uan4) 2 turn=0 T & I =uxn 0=uan ==uan =un un 1 1 time time 30/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_030.png",
      "page_index": 329,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:13:22+07:00"
    }
  },
  "CO2017-chapter-6-slide-330-0000": {
    "id": "CO2017-chapter-6-slide-330-0000",
    "text": "Algorithm 2 for CS turn cannot keep the state of Process P: readiness into CS do { flag[i] = true; > use a shared variable \"flag while ( flag[j] )  /* critical section code is here */ to keep the state of all processes flag[i] = false; /* remainder section code is here */ flag[i] = true => P; is in CS } while(true); 31/ 75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_031.png",
      "page_index": 330,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:13:25+07:00"
    }
  },
  "CO2017-chapter-6-slide-331-0000": {
    "id": "CO2017-chapter-6-slide-331-0000",
    "text": "Algorithm 2 for CS turn cannot keep the state of Process Pj readiness into CS do { flag[i] = true; > use a shared variable \"flag while ( flag[j] ) /* critical section code is here */ to keep the state of all processes flag[i] = false; /* remainder section code is here */ flag[i] = true =y P; is in CS } while(true); mutual exclusion, but not bounded waiting, and not progress 32/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_032.png",
      "page_index": 331,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:13:26+07:00"
    }
  },
  "CO2017-chapter-6-slide-332-0000": {
    "id": "CO2017-chapter-6-slide-332-0000",
    "text": "Algorithm 2 for CS turn cannot keep the state of Process Pj readiness into CS do { flag[i] = true; > use a shared variable \"flag while ( flag[j]  /* critical section code is here */ to keep the state of all processes flag[i] = false; /* remainder section code is here */ flag[i] = true = P; is in CS } while(true); mutual exclusion, but not bounded waiting, and not progress flag[0]=1 flag[1]=0 time 33/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_033.png",
      "page_index": 332,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:13:29+07:00"
    }
  },
  "CO2017-chapter-6-slide-333-0000": {
    "id": "CO2017-chapter-6-slide-333-0000",
    "text": "Algorithm 2 for CS turn cannot keep the state of Process Pj readiness into CS do { flag[i] = true; > use a shared variable \"flag while ( flag[j]  /* critical section code is here */ to keep the state of all processes flag[i] = false; /* remainder section code is here */ flag[i] = true = P; is in CS } while(true); mutual exclusion, but not bounded waiting, and not progress SD ys!u!y 0=[O]8eTJ[ flag[0]=0 Tuon una flag[1]=0 time 34/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_034.png",
      "page_index": 333,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:13:31+07:00"
    }
  },
  "CO2017-chapter-6-slide-334-0000": {
    "id": "CO2017-chapter-6-slide-334-0000",
    "text": "Algorithm 2 for CS turn cannot keep the state of Process Pj readiness into CS do { flag[i] = true; > use a shared variable \"flag while ( flag[j]  /* critical section code is here */ to keep the state of all processes flag[i] = false; /* remainder section code is here */ flag[i] = true = P; is in CS } while(true); mutual exclusion, but not bounded waiting, and not progress t i(I==[0]8TJ 0=[0]81J flag[0]=0 flag[1]=1  una time 35/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_035.png",
      "page_index": 334,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:13:36+07:00"
    }
  },
  "CO2017-chapter-6-slide-335-0000": {
    "id": "CO2017-chapter-6-slide-335-0000",
    "text": "Algorithm 2 for CS turn cannot keep the state of Process Pj readiness into CS do { flag[i] = true; > use a shared variable \"flag while ( flag[j]  /* critical section code is here to keep the state of all processes flag[i] = false; /* remainder section code is here */ flag[i] = true = P; is in CS } while(true); mutual exclusion, but not bounded waiting, and not progress 1== flag[0]=0 0= 0= [0]8 T flag[1]=0 time 36/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_036.png",
      "page_index": 335,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:13:39+07:00"
    }
  },
  "CO2017-chapter-6-slide-336-0000": {
    "id": "CO2017-chapter-6-slide-336-0000",
    "text": "Algorithm 2 for CS turn cannot keep the state of Process Pj readiness into CS do { flag[i] = true; > use a shared variable \"flag while ( flag[j] ) /* critical section code is here to keep the state of all processes flag[i] = false; /* remainder section code is here */ flag[i] = true = P; is in CS } while(true); mutual exclusion, but not bounded waiting, and not progress eteer 1== 1== [ T flag[0]=0 0= 0= [0]81] LO flag[1]=1 b0 una J 11 time 37/ 75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_037.png",
      "page_index": 336,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:13:44+07:00"
    }
  },
  "CO2017-chapter-6-slide-337-0000": {
    "id": "CO2017-chapter-6-slide-337-0000",
    "text": "Algorithm 2 for CS turn cannot keep the state of Process Pj readiness into CS do { flag[i] = true; > use a shared variable \"flag while ( flag[j] ) /* critical section code is here to keep the state of all processes flag[i] = false; /* remainder section code is here */ flag[i] = true =y P; is in CS } while(true); mutual exclusion, but not bounded waiting, and not progress etmer 1== 1== flag[0]=0 flag[0]=0 0= 0= [0]8 0 flag[1]=1 flag[1]=0 b0 60 una TJ time time 38/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_038.png",
      "page_index": 337,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:13:48+07:00"
    }
  },
  "CO2017-chapter-6-slide-338-0000": {
    "id": "CO2017-chapter-6-slide-338-0000",
    "text": "Algorithm 2 for CS turn cannot keep the state of Process Pj readiness into CS do { flag[i] = true; > use a shared variable \"flag while ( flag[j] ) /* critical section code is here to keep the state of all processes flag[i] = false; /* remainder section code is here */ flag[i] = true = P; is in CS } while(true); mutual exclusion, but not bounded waiting, and not progress etmer 1== 1== 0== flag[0]=0 flag[0]=1 0= 0= = [0] 0 [0] flag[1]=1 flag[1]=0 b0 una TJ time time 39/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_039.png",
      "page_index": 338,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:13:53+07:00"
    }
  },
  "CO2017-chapter-6-slide-339-0000": {
    "id": "CO2017-chapter-6-slide-339-0000",
    "text": "Algorithm 2 for CS turn cannot keep the state of Process Pj readiness into CS do { flag[i] = true; > use a shared variable \"flag while ( flag[j] ) /* critical section code is here to keep the state of all processes flag[i] = false; /* remainder section code is here */ flag[i] = true =y P; is in CS } while(true); mutual exclusion, but not bounded waiting, and not progress etmer 1== 1== 0== 0== flag[0]=0 flag[0]=1 0= 0= [0] 0 flag[1]=1 flag[1]=1 b0 bl una TJ DO 11 time time 40/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_040.png",
      "page_index": 339,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:13:58+07:00"
    }
  },
  "CO2017-chapter-6-slide-340-0000": {
    "id": "CO2017-chapter-6-slide-340-0000",
    "text": "Algorithm 2 for CS turn cannot keep the state of Process Pj readiness into CS do { flag[i] = true; > use a shared variable \"flag while ( flag[j] ) /* critical section code is here to keep the state of all processes flag[i] = false; /* remainder section code is here */ flag[i] = true = P; is in CS } while(true); mutual exclusion, but not bounded waiting, and not progress etmer 1== 1== 0== flag[0]=0 flag[0]=0 0= 0= [0] 0 flag[1]=1 flag[1]=1 time time 41/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_041.png",
      "page_index": 340,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:14:01+07:00"
    }
  },
  "CO2017-chapter-6-slide-341-0000": {
    "id": "CO2017-chapter-6-slide-341-0000",
    "text": "Algorithm 2 for CS turn cannot keep the state of Process Pj readiness into CS do { flag[i] = true; > use a shared variable \"flag while ( flag[j]  /* critical section code is here to keep the state of all processes flag[i] = false; /* remainder section code is here */ flag[i] = true =y P; is in CS } while(true); mutual exclusion, but not bounded waiting, and not progress etmer 1== 1== 0== &0== flag[0]=0 flag[0]=1 0= 0= = [0] 0 flag[1]=1 flag[1]=1 b0 ol b una TJ C time time 42/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_042.png",
      "page_index": 341,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:14:07+07:00"
    }
  },
  "CO2017-chapter-6-slide-342-0000": {
    "id": "CO2017-chapter-6-slide-342-0000",
    "text": "Algorithm 2 for CS turn cannot keep the state of Process Pj readiness into CS do { flag[i] = true; > use a shared variable \"flag while ( flag[j]  /* critical section code is here to keep the state of all processes flag[i] = false; /* remainder section code is here */ flag[i] = true = P; is in CS } while(true); mutual exclusion, but not bounded waiting, and not progress 8 etmer 1== 1== &0== &0== &(0==[0]9TJ flag[0]=0 flag[0]=1 0= 0= 1= 1=[0] [0] LO flag[1]=1 flag[1]=1 b0 bf una TJ 1 time time 43/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_043.png",
      "page_index": 342,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:14:12+07:00"
    }
  },
  "CO2017-chapter-6-slide-343-0000": {
    "id": "CO2017-chapter-6-slide-343-0000",
    "text": "Peterson's algorithm for CS Satisfy mutual exclusion Use both kinds of variables of Algorithm 1 & 2 Process P: do { flag[i] = true; turn = j; while ( flag[j] && turn == j  ; /* critical section code is here */ flag[i] = false; /* remainder section code is here */ } while(true); 44/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_044.png",
      "page_index": 343,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:14:15+07:00"
    }
  },
  "CO2017-chapter-6-slide-344-0000": {
    "id": "CO2017-chapter-6-slide-344-0000",
    "text": "Bakery algorithm (1) Peterson's algorithm is only for 2 processes. Bakery algorithm is for n processes  Before entering its critical section, process receives a ticket number. Holder of the smallest number enters its CS  If processes P; and P; receive the same number, if i < j. then P; is served first; else P; is served first  The numbering scheme always generates numbers in increasing order of enumeration; i.e., 1,2,3,3,3,3,4,5,.. 45/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_045.png",
      "page_index": 344,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:14:17+07:00"
    }
  },
  "CO2017-chapter-6-slide-345-0000": {
    "id": "CO2017-chapter-6-slide-345-0000",
    "text": "Bakery algorithm (2)  A process is assigned a pair (pid,ticket #) which is ordered lexicographically Shared data boolean choosing[n] number[n]: ticket # Process Pj do { choosing[i] = true; number[i] = max(number[o],number[1],...,number[n-1]) + 1; choosing[i] = false; for( j=0; j<n; j++){ while( choosing[j]  ; while( number[j] != 0 && (number[j] < number[i] ) ; } /* critical section code is here */ number[i] = 0; /* remainder section code is here */ } while(true); 46/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_046.png",
      "page_index": 345,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:14:19+07:00"
    }
  },
  "CO2017-chapter-6-slide-346-0000": {
    "id": "CO2017-chapter-6-slide-346-0000",
    "text": "Outline 1 Basic concepts 2 Critical-section CS problem 3 Synchronization hardware 4 Software tools for synchronization  Mutex lock Semaphores 5 Synchronization problems 47/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_047.png",
      "page_index": 346,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:14:20+07:00"
    }
  },
  "CO2017-chapter-6-slide-347-0000": {
    "id": "CO2017-chapter-6-slide-347-0000",
    "text": "Software-based synchronization weakness Perterson's algorithm case Modern computer architecture Multiple cores for multithreaded applications  Processor or compiler can reorder the execution (if checked no data dependency) process turn=1 flag[0] = true cS process turn = 0,flag[1]= true cS time Software-based solutions such as Peterson's are not guaranteed to work on modern computer architectures (mutiple processors/cores) 48/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_048.png",
      "page_index": 347,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:14:24+07:00"
    }
  },
  "CO2017-chapter-6-slide-348-0000": {
    "id": "CO2017-chapter-6-slide-348-0000",
    "text": "Hardware synchronization tools There are 3 forms of hardware instructions to support solving critical-section problem Memory barriers Hardware instructions Atomic variables 49/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_049.png",
      "page_index": 348,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:14:26+07:00"
    }
  },
  "CO2017-chapter-6-slide-349-0000": {
    "id": "CO2017-chapter-6-slide-349-0000",
    "text": "Memory barriers Memory model A model that a computer architecture guarantees to application programs on memory.  Strongly ordered: where a memory modification on one processor is immediately visible to all other processors.  Weakly ordered: where modifications to memory on one processor may not be immediately visible to other processors. 50/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_050.png",
      "page_index": 349,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:14:27+07:00"
    }
  },
  "CO2017-chapter-6-slide-350-0000": {
    "id": "CO2017-chapter-6-slide-350-0000",
    "text": "Memory barriers Memory model A model that a computer architecture guarantees to application programs on memory Strongly ordered: where a memory modification on one processor is immediately visible to all other processors.  Weakly ordered: where modifications to memory on one processor may not be immediately visible to other processors. Memory models vary by processor type. => OS kernel cannot depends on any assumptions regarding the visibility of modifications to memory on a shared-memory multiprocessor. > Computer architectures provide memory barriers to force any changes in memory to be propagated to all other processors. 590 51/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_051.png",
      "page_index": 350,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:14:30+07:00"
    }
  },
  "CO2017-chapter-6-slide-351-0000": {
    "id": "CO2017-chapter-6-slide-351-0000",
    "text": "Memory barriers - example Thread 1 Thread 2 while (!flag) x = 100; memory_barrierO; memory_barrierQ print x; flag = true; flag > x x > flag The memory barrier will ensure thread 1 will output 100 We could place a memory barrier into Peterson's algorithm between flag[i] and turn = j. 52/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_052.png",
      "page_index": 351,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:14:32+07:00"
    }
  },
  "CO2017-chapter-6-slide-352-0000": {
    "id": "CO2017-chapter-6-slide-352-0000",
    "text": "Hardware instructions test_and_set() Use an uninterruptable (atomic) sequence of instructions which modifies a shared variable lock (initially lock=false) Mutual-exclusion by test_and_setO test_and_setQ boolean test_and_set( boolean *target ) do f boolean rv = *target; while( test_and_set( &lock   ;) *target = true; /* critical section code is here return rv; lock = false; } /* remainder section code is here */ } while (true}; 53/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_053.png",
      "page_index": 352,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:14:35+07:00"
    }
  },
  "CO2017-chapter-6-slide-353-0000": {
    "id": "CO2017-chapter-6-slide-353-0000",
    "text": "Hardware instructions compare_and_swap() Swaping the contents of two words (compare_and_swap()) on a shared variable (1ock) (initially lock=0) compare_and_swapQ Mutual-exclusion by boolean compare_and_swap( int *value, compare_and_swapQ int expected int new_value  do { while( compare_and_swap( &lock, 0, 1  != 0   int temp = *value; if ( *value == expected ) /* critical section code is here */ lock=0 *value = new_value; /* remainder section code is here */ return temp; } while (true}; } 54/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_054.png",
      "page_index": 353,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:14:38+07:00"
    }
  },
  "CO2017-chapter-6-slide-354-0000": {
    "id": "CO2017-chapter-6-slide-354-0000",
    "text": "Hardware instructions compare_and_swap() Swaping the contents of two words (compare_and_swap()) on a shared variable (1ock) (initially lock=0) compare_and_swap() Mutual-exclusion by boolean compare_and_swap( int *value, compare_and_swapQ int expected int new_value  do f while( compare_and_swap( &lock, 0, 1  != 0   int temp = *value; if ( *value == expected ) /* critical section code is here */ lock=0; *value = new_value; /* remainder section code is here */ return temp; } while (true}; } The solution compare_and_swap() above is not bounded waiting 55/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_055.png",
      "page_index": 354,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:14:41+07:00"
    }
  },
  "CO2017-chapter-6-slide-355-0000": {
    "id": "CO2017-chapter-6-slide-355-0000",
    "text": "Hardware instructions bounded waiting compare_and_swap() Process P while (true) { waiting initialized to false, waiting[i] = true; key = 1; lock initialized to 0. while (waiting[i] && key == 1) key = compare and swap(&lock,0,1) ;  On leaving CS, P; scans in the waiting[il = false; cyclic ordering /* critical section */ (+1,i+2,...,n-1,0,...,i-1) j = (i +1) % n; while ((j != i) && !waiting[j]) (that waiting[j] == true), j = (j + 1) % n; and then set waiting[j]  if (j == i) lock = 0; false to allow P; enter CS. else waiting[j] = false;  Bounded waiting /* remainder section */ 56/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_056.png",
      "page_index": 355,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:14:45+07:00"
    }
  },
  "CO2017-chapter-6-slide-356-0000": {
    "id": "CO2017-chapter-6-slide-356-0000",
    "text": "Atomic variables Increment and decrement an integer value may produce race condition. compare_and_swap() is used as basic building blocks for constructing synchronization tools.  Atomic variable: providing atomic operations (increment() , decrement()) on basic data types such as integers and booleans. void increment(atomic int *v) int temp; do f temp = *v; } while (temp != compare and swap(v, temp, temp+1)): } 57/ 75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_057.png",
      "page_index": 356,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:14:47+07:00"
    }
  },
  "CO2017-chapter-6-slide-357-0000": {
    "id": "CO2017-chapter-6-slide-357-0000",
    "text": "Outline 1 Basic concepts 2 Critical-section CS problem 3 Synchronization hardware 4 Software tools for synchronization Mutex lock Semaphores 5 Synchronization problems 58/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_058.png",
      "page_index": 357,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:14:49+07:00"
    }
  },
  "CO2017-chapter-6-slide-358-0000": {
    "id": "CO2017-chapter-6-slide-358-0000",
    "text": "Mutex locks Application programmers do not like using hardware-synchronization mechanisms OS designers must provide tools to deal with critical-section with 2 functions acquire() acquire{} { while (!available ; /* busy wait */ available = false; } releaseQ release( { available = true; } Before entering CS, programmers call acquire(), and call release() when leaving CS. Both are atomic which can be implemented by hardware synchronization instructions. 59/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_059.png",
      "page_index": 358,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:14:52+07:00"
    }
  },
  "CO2017-chapter-6-slide-359-0000": {
    "id": "CO2017-chapter-6-slide-359-0000",
    "text": "Mutex locks Application programmers do not like using hardware-synchronization mechanisms OS designers must provide tools to deal with critical-section with 2 functions acquire() acquire{} { while (!available ; /* busy wait */ available = false; } release() Busy waiting = when a process is in CS, other processes loop continuously in order to enter CS (spinlock) Before entering CS, programmers call acquire(), and call release() when leaving CS. Both are atomic which can be implemented by hardware synchronization instructions. 60/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_060.png",
      "page_index": 359,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:14:55+07:00"
    }
  },
  "CO2017-chapter-6-slide-360-0000": {
    "id": "CO2017-chapter-6-slide-360-0000",
    "text": "Semaphores The bouncer represents a semaphore These people representwaiting threads He won't allow threads to proceed They aren't running on any CPU core until instructed to do so. (source:preshing.com) Semaphore S: an integer variable can only be accessed by indivisible (atomic) operations wait(S) { signal(S) { while ( S <= 0 ) ; /* busy wait */) S ++; s --; } } 61/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_061.png",
      "page_index": 360,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:14:57+07:00"
    }
  },
  "CO2017-chapter-6-slide-361-0000": {
    "id": "CO2017-chapter-6-slide-361-0000",
    "text": "Semaphores Calling order wait signal .et next 1 through. Havea nice day.ma'am. signal wait source:preshing.com Same outcome for different orders of calling wait() and signal(). 62/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_062.png",
      "page_index": 361,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:14:59+07:00"
    }
  },
  "CO2017-chapter-6-slide-362-0000": {
    "id": "CO2017-chapter-6-slide-362-0000",
    "text": "Semaphore usage  Binary semaphore ({0,1}): similar to mutex locks Counting semaphore: to control access to resource with a finite number of instances S initialized to number of resource instances Wish to use an instance, call wait(s) Release the resource, call signal(s) All instances are in use, processes blocked until s > 0 Example of using semaphore synch to synchronize 2 processes similar to memory_barrier() synch = 0; P1 S1; wait( synch ); signal( synch ); S2; 63/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_063.png",
      "page_index": 362,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:15:01+07:00"
    }
  },
  "CO2017-chapter-6-slide-363-0000": {
    "id": "CO2017-chapter-6-slide-363-0000",
    "text": "Semaphores without busy waiting Semaphore Semaphore mentioned before could have busy waiting ldea to avoid busy waiting  After the checking of the semaphore fails, the process will be put into waiting queue The process is restarted by wakeup() when other processes send signal() (i.e., put the process into ready queue) 590 64/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_064.png",
      "page_index": 363,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:15:04+07:00"
    }
  },
  "CO2017-chapter-6-slide-364-0000": {
    "id": "CO2017-chapter-6-slide-364-0000",
    "text": "Semaphores without busy waiting mplementation Semaphore data structure typedef struct { int value; struct process *list; } semaphore; wait() signal() wait( semaphore *S }{ signal( semaphore *S ){ S->value --; S->value ++; if ( S->value < 0 ){ if ( S->value >= 0 ) { add this process to S->list; remove a process P from S->list; sleep(); wakeup( P ); } } } } block(), wakeup(): system calls 65/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_065.png",
      "page_index": 364,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:15:07+07:00"
    }
  },
  "CO2017-chapter-6-slide-365-0000": {
    "id": "CO2017-chapter-6-slide-365-0000",
    "text": "Semaphores without busy waiting Implementation Semaphore data structure typedef struct { int value; struct process *list; } semaphore; wait() signal() wait( semaphore *S }{ signal( semaphore *S ){ S->value S->value ++ Remarks  Busy waiting just moved into critical section, not completely eliminated } wait(), signal() must be executed atomically (on SMP, other techniques could be used additionally) 66/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_066.png",
      "page_index": 365,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:15:09+07:00"
    }
  },
  "CO2017-chapter-6-slide-366-0000": {
    "id": "CO2017-chapter-6-slide-366-0000",
    "text": "What is deadlock ? Po P1 Two semaphores S and Q initialized to 1 wait(S); wait(Q); wait(Q); wait(S); After wait(S) of Po and wait(Q) of Pj executed, both processes wait for signal(S); signal(Q); signal(Q) ; signal(S); corresponding signal()s 67/ 75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_067.png",
      "page_index": 366,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:15:11+07:00"
    }
  },
  "CO2017-chapter-6-slide-367-0000": {
    "id": "CO2017-chapter-6-slide-367-0000",
    "text": "What is deadlock ? Po P1  Two semaphores S and Q initialized to 1 wait(S); wait(Q); wait(Q); wait(S); After wait(S) of Po and wait(Q) of Pi executed, both processes wait for signal(s); signal(Q); signal(Q); signal(s); corresponding signal()s Deadlock Two or more processes are waiting indefinitely for an event that can be caused by only one of the waiting processes. livelock 68/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_068.png",
      "page_index": 367,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:15:14+07:00"
    }
  },
  "CO2017-chapter-6-slide-368-0000": {
    "id": "CO2017-chapter-6-slide-368-0000",
    "text": "What is deadlock ? Po P1  Two semaphores S and Q initialized to 1 wait(S); wait(Q); wait(Q); wait(S); After wait(S) of Po and wait(Q) of P executed, both processes wait for signal(s); signal(Q); signal(Q); signal(S); corresponding signal()s Deadlock Two or more processes are waiting indefinitely for an event that can be caused by only one of the waiting processes. Starvation (indefinite blocking) A process may never be removed from the semaphore queue in which it is suspended 69/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_069.png",
      "page_index": 368,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:15:17+07:00"
    }
  },
  "CO2017-chapter-6-slide-369-0000": {
    "id": "CO2017-chapter-6-slide-369-0000",
    "text": "Outline 1 Basic concepts 2 Critical-section CS problem  Synchronization hardware 4 Software tools for synchronization  Mutex lock Semaphores 5 Synchronization problems 70/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_070.png",
      "page_index": 369,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:15:19+07:00"
    }
  },
  "CO2017-chapter-6-slide-370-0000": {
    "id": "CO2017-chapter-6-slide-370-0000",
    "text": "Classic synchronization problems  Only classic problems considered Bounded-buffer problem Readers-writers problem Dining-philosophers problem Use semaphore for synchronization 71/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_071.png",
      "page_index": 370,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:15:20+07:00"
    }
  },
  "CO2017-chapter-6-slide-371-0000": {
    "id": "CO2017-chapter-6-slide-371-0000",
    "text": "Bounded-buffer problem Semaphore data structure int n; semaphore mutex = 1; semaphore empty = n; semaphore full = 0; producer consumer do { do { /* produce an item in */ wait( full ); /* next produced */ wait( mutex ); wait( empty ); /* remove an item from the */ wait( mutex ); /* buffer to next consumed */ /* add next_produced to */ signal( mutex ); /* the buffer */ signal( empty ); /* consume the item in */ signal( mutex ) /* next_consumed */ signal( full ); } while (true); } while (true); 72/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_072.png",
      "page_index": 371,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:15:24+07:00"
    }
  },
  "CO2017-chapter-6-slide-372-0000": {
    "id": "CO2017-chapter-6-slide-372-0000",
    "text": "Readers-writers problem  A database shared among several processes: some are readers, some are writers  If a writer and some other process access database simultaneously chaos may occur First readers-writers problem Reader no reader kept waiting unless a writer has do f already obtained permission to use shared wait( mutex ); objects read_count ++; if ( read_count == 1 ) semaphore rw_mutex = 1; wait( rw_mutex ); semaphore mutex = 1; signal( mutex ) ; int read_count = 0; ./* reading performed */. wait( mutex ); Writer read_count --; do t if ( read_count == 0 ) wait( rw_mutex ) : signal( rw_mutex ); ../* writing performed */.. signal( mutex ) : } while (true); signal( rw_mutex ); } while (true); 73/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_073.png",
      "page_index": 372,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:15:28+07:00"
    }
  },
  "CO2017-chapter-6-slide-373-0000": {
    "id": "CO2017-chapter-6-slide-373-0000",
    "text": "Dining-philosopher Dining-philosopher Resource: 5 single 0 chopsticks  5 Philosophers sitting RICE around the table, with actions Think: do nothing, not critical Eat: need 2 chopsticks (left and right) Semaphores can be used to solve dininig-philosophers synchronization problem, using 5 semaphores 74/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_074.png",
      "page_index": 373,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:15:30+07:00"
    }
  },
  "CO2017-chapter-6-slide-374-0000": {
    "id": "CO2017-chapter-6-slide-374-0000",
    "text": "Dining-philosopher Implementation semaphore chopstick[5] ; Philosopher i do { wait( chopstock[i] ); wait( chopstick[(i+1) % 5] ); /* eat eat eat */ signal( chopstick[i] ); signal( chopstick[(i+1) % 5] ); /* think think think */ } while (true); 75/75",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_075.png",
      "page_index": 374,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:15:31+07:00"
    }
  },
  "CO2017-chapter-8-slide-375-0000": {
    "id": "CO2017-chapter-8-slide-375-0000",
    "text": "Memory management Tran, Van Hoai Faculty of Computer Science & Engineering HCMC University of Technology E-mail: hoai@hcmut.edu.vn (partly based on slides of Le Thanh Van) 1/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_001.png",
      "page_index": 375,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:15:34+07:00"
    }
  },
  "CO2017-chapter-8-slide-376-0000": {
    "id": "CO2017-chapter-8-slide-376-0000",
    "text": "Outline 1 Background 2 Swapping 3 Contiguous memory allocation 4 Segmentation 5 Paging 2/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_002.png",
      "page_index": 376,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:15:35+07:00"
    }
  },
  "CO2017-chapter-8-slide-377-0000": {
    "id": "CO2017-chapter-8-slide-377-0000",
    "text": "Outline 1 Background 2 Swapping 3 Contiguous memory allocation  Segmentation E Paging 3/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_003.png",
      "page_index": 377,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:15:37+07:00"
    }
  },
  "CO2017-chapter-8-slide-378-0000": {
    "id": "CO2017-chapter-8-slide-378-0000",
    "text": "Role of memory PC Program(RAM) I-1I-2I-3I-4 fetch opl Data op2 registers 1-1 (RAM) Instruction Queue decode ALU execute store the output 59C 4/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_004.png",
      "page_index": 378,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:15:39+07:00"
    }
  },
  "CO2017-chapter-8-slide-379-0000": {
    "id": "CO2017-chapter-8-slide-379-0000",
    "text": "Role of memory Memory storing instructions PC ProgramRAM) 1-11-21-31-4 fetch opl Data op2 registers 1-1 (RAM) Instruction Queue decode ALU execute store the output Memory storing data 590 5/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_005.png",
      "page_index": 379,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:15:41+07:00"
    }
  },
  "CO2017-chapter-8-slide-380-0000": {
    "id": "CO2017-chapter-8-slide-380-0000",
    "text": "Role of memory Memory storing instructions PC ProgramRAM 1-11-21-3I-4 fetch opl Data op2 registers 1-1 (RAM) Instruction Queue decode ALU execute store the output Memory storing data Instructions of programs are only executed when they are in memory  Memory management requires some hardware support 6/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_006.png",
      "page_index": 380,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:15:45+07:00"
    }
  },
  "CO2017-chapter-8-slide-381-0000": {
    "id": "CO2017-chapter-8-slide-381-0000",
    "text": "Hardware support Each user process has a separate memory space Base and limit registers give a range of the memory space operating base base + limit system 256000 process 300040 300040 base address yes CPU yes process 420940 120900 no no limit process 880000 trap to operating system 1024000 monitor-addressing error memory 7/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_007.png",
      "page_index": 381,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:15:48+07:00"
    }
  },
  "CO2017-chapter-8-slide-382-0000": {
    "id": "CO2017-chapter-8-slide-382-0000",
    "text": "Hardware support Each user process has a separate memory space Base and limit registers give a range of the memory space operating base base + limit system 256000 process 300040 300040 address base yes CPU yes process 420940 120900 no no limit process 880000 trap to operating system 1024000 monitor-addressing error memory Memory protection mechanism is not applied for operating system executing in kernel mode 8/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_008.png",
      "page_index": 382,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:15:51+07:00"
    }
  },
  "CO2017-chapter-8-slide-383-0000": {
    "id": "CO2017-chapter-8-slide-383-0000",
    "text": "Address binding User program to execution source program Address binding A process to convert one kind of high compiler or compile assembler time abstract memory address to low abstract memory address object other moduie object  a symbolic address to a relocatable moduies address linkage editor a relocatable address to a absolute load load address module time system library Example: loader a variable \"count\" -? a relocatable address \"14 loaded system bytes from the beginning of this module\" library in-memory dynamic binary execution time (run \"14 bytes from the beginning of this module\" -? linking memory time) image an absolute address \"74014\" 9/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_009.png",
      "page_index": 383,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:15:57+07:00"
    }
  },
  "CO2017-chapter-8-slide-384-0000": {
    "id": "CO2017-chapter-8-slide-384-0000",
    "text": "Address binding When it happens? Binding is performed in any of following 3 steps  Compile time: if starting location changes, absolute address must be regenerated (by compile)  Load time: with relocatable code, only reloading is needed when starting address changes Execution time: if a process moved in memory, binding is delayed until its run time. Most general-purpose OSs use this method 10/ 59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_010.png",
      "page_index": 384,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:15:59+07:00"
    }
  },
  "CO2017-chapter-8-slide-385-0000": {
    "id": "CO2017-chapter-8-slide-385-0000",
    "text": "Logical address vs. physical address Logical address Physical address Address generated by CPU Address seen by memory management unit (MMU) 11/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_011.png",
      "page_index": 385,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:16:00+07:00"
    }
  },
  "CO2017-chapter-8-slide-386-0000": {
    "id": "CO2017-chapter-8-slide-386-0000",
    "text": "Logical address vs. physical address Logical address Physical address Address generated by CPU Address seen by memory management unit (MMU) relocation register 14000 logical physical address address CPU memory 346 14346 MMU  Compile/load-time binding: logical address = physical address Execution-time binding: logical address  physical address User program thinks logical (virtual) address range is [0, max], but physical address range is [R + 0, R + max]. 12/ 59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_012.png",
      "page_index": 386,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:16:03+07:00"
    }
  },
  "CO2017-chapter-8-slide-387-0000": {
    "id": "CO2017-chapter-8-slide-387-0000",
    "text": "Dynamic loading Dynamic loading A routine is not loaded until it is called Routine must be in relocatable load format Relocatable linking loader is responsible to load dynamic loading routing when a caller has not loaded yet Better memory=space utilization, useful to handle infrequently occuring cases  Dynamic loading does not require support from OS 13/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_013.png",
      "page_index": 387,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:16:05+07:00"
    }
  },
  "CO2017-chapter-8-slide-388-0000": {
    "id": "CO2017-chapter-8-slide-388-0000",
    "text": "Dynamic linking and shared library If multiple programs use a same routine, dynamic loading requires duplication of the routine in memory 14/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_014.png",
      "page_index": 388,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:16:06+07:00"
    }
  },
  "CO2017-chapter-8-slide-389-0000": {
    "id": "CO2017-chapter-8-slide-389-0000",
    "text": "Dynamic linking and shared library If multiple programs use a same routine, dynamic loading requires duplication of the routine in memory Dynamic linking A routine is linked to user programs when the programs are run Program X Program Y Static libraries Static libraries (°.a) (°.a) Static linking at compile-time Program X Program Y Shared libraries (* so) Dynamic linking of shared libraries at run-time (source:ibm) 15/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_015.png",
      "page_index": 389,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:16:09+07:00"
    }
  },
  "CO2017-chapter-8-slide-390-0000": {
    "id": "CO2017-chapter-8-slide-390-0000",
    "text": "Dynamic linking and shared library If multiple programs use a same routine, dynamic loading requires duplication of the routine in memory Dynamic linking A routine is linked to user programs when the programs are run Program X Program Y  A stub is put in the image Static libraries Static libraries of each reference (°.a) (°.a) Static linking at compile-time  The stub is replaced with the address of the needed Program X Program Y routine, and then can be Shared libraries (° so) Dynamic linking referred to by other of shared libraries at run-time references without loading (source:ibm) 16/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_016.png",
      "page_index": 390,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:16:12+07:00"
    }
  },
  "CO2017-chapter-8-slide-391-0000": {
    "id": "CO2017-chapter-8-slide-391-0000",
    "text": "Dynamic linking and shared library If multiple programs use a same routine, dynamic loading requires duplication of the routine in memory Dynamic linking A routine is linked to user programs when the programs are run Program X Program Y  A stub is put in the image Static libraries Static libraries of each reference (°.a) (°.a) Static linking at compile-time  The stub is replaced with the address of the needed Program X Program Y routine, and then can be Shared libraries (° so) Dynamic linking referred to bv other of shared libraries Dynamic linking requires support from OS 17/ 59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_017.png",
      "page_index": 391,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:16:16+07:00"
    }
  },
  "CO2017-chapter-8-slide-392-0000": {
    "id": "CO2017-chapter-8-slide-392-0000",
    "text": "Outline 1 Background 2 Swapping 3 Contiguous memory allocation  Segmentation E Paging 18/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_018.png",
      "page_index": 392,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:16:17+07:00"
    }
  },
  "CO2017-chapter-8-slide-393-0000": {
    "id": "CO2017-chapter-8-slide-393-0000",
    "text": "Standard swapping Backing store must be large enough to operating systern accommodate copies of all process P  swap out memory images of all process P2 users swap in Images of processes in user space backing store ready queue are in backing main memory store 19/ 59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_019.png",
      "page_index": 393,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:16:19+07:00"
    }
  },
  "CO2017-chapter-8-slide-394-0000": {
    "id": "CO2017-chapter-8-slide-394-0000",
    "text": "Standard swapping Backing store must be large enough to operating system accommodate copies of all process P  swap out memory images of all process P users  swap in Images of processes in user space backing store ready queue are in backing main memory store Swapping is influenced by factors Transfer time between fast disk and memory Informing mechanism to activate swapping  1/O waiting processes should be swapped out carefully 20/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_020.png",
      "page_index": 394,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:16:22+07:00"
    }
  },
  "CO2017-chapter-8-slide-395-0000": {
    "id": "CO2017-chapter-8-slide-395-0000",
    "text": "Standard swapping Backing store must be large enough to operating system accommodate copies of all process P 1 swap out memory images of all process P users  swap in Images of processes in user space backing store ready queue are in backing main memory store Swapping is influenced by factors Transfer time between fast disk and memory Informing mechanism to activate swapping l/O waiting processes should be swapped out carefully Standard swapping is not used in modern OSs 21/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_021.png",
      "page_index": 395,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:16:25+07:00"
    }
  },
  "CO2017-chapter-8-slide-396-0000": {
    "id": "CO2017-chapter-8-slide-396-0000",
    "text": "Swapping on mobile systems Flash drives have finite number of write/erase cycles  Mobile OSs do not prefer swapping  OSs may terminate processes if memory is not sufficient Developers for mobile systems must carefully allocate and release memory 22/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_022.png",
      "page_index": 396,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:16:26+07:00"
    }
  },
  "CO2017-chapter-8-slide-397-0000": {
    "id": "CO2017-chapter-8-slide-397-0000",
    "text": "Outline 1 Background 2 Swapping 3 Contiguous memory allocation 4 Segmentation 5 Paging 590 23/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_023.png",
      "page_index": 397,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:16:28+07:00"
    }
  },
  "CO2017-chapter-8-slide-398-0000": {
    "id": "CO2017-chapter-8-slide-398-0000",
    "text": "Contiguous memory allocation  Memory divided into 2 partitions: resident OS & user processes Interrupt vector is often in low memory = resident OS is low memory partition 24/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_024.png",
      "page_index": 398,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:16:29+07:00"
    }
  },
  "CO2017-chapter-8-slide-399-0000": {
    "id": "CO2017-chapter-8-slide-399-0000",
    "text": "Contiguous memory allocation Memory divided into 2 partitions: resident OS & user processes Interrupt vector is often in low memory = resident OS is low memory partition Contiguous memory allocation Each process is contained in a single section of memory that is contiguous to the section of the next process 25/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_025.png",
      "page_index": 399,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:16:31+07:00"
    }
  },
  "CO2017-chapter-8-slide-400-0000": {
    "id": "CO2017-chapter-8-slide-400-0000",
    "text": "Contiguous memory allocation Memory divided into 2 partitions: resident OS & user processes Interrupt vector is often in low memory = resident OS is low memory partition Contiguous memory allocation Each process is contained in a single section of memory that is contiguous to the section of the next process OSs use relocation register for memory protection limit relocation register register logical physical address yes address CPU memory no trap: addressing error 26/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_026.png",
      "page_index": 400,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:16:35+07:00"
    }
  },
  "CO2017-chapter-8-slide-401-0000": {
    "id": "CO2017-chapter-8-slide-401-0000",
    "text": "Memory allocation There are 2 ways  Fixed-partition: memory is divided into several fixed-size partitions. A process is in a single partition  Variable-partition: only assign enough memory for processes and OS keeps a table storing status of memory 27/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_027.png",
      "page_index": 401,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:16:36+07:00"
    }
  },
  "CO2017-chapter-8-slide-402-0000": {
    "id": "CO2017-chapter-8-slide-402-0000",
    "text": "Memory allocation There are 2 ways  Fixed-partition: memory is divided into several fixed-size partitions. A process is in a single partition Variable-partition: only assign enough memory for processes and OS keeps a table storing status of memory Job list: J1 (30K) J2 (50K) Original state J3 (30K) J4 (25K) partition 1 100K partition 2 25K partition 3 25K partition 4 50K 28/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_028.png",
      "page_index": 402,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:16:39+07:00"
    }
  },
  "CO2017-chapter-8-slide-403-0000": {
    "id": "CO2017-chapter-8-slide-403-0000",
    "text": "Memory allocation There are 2 ways  Fixed-partition: memory is divided into several fixed-size partitions. A process is in a single partition Variable-partition: only assign enough memory for processes and OS keeps a table storing status of memory Job list: J1 (30K) J2 (50K) Original state first fit J3 (30K) J4 (25K) partition 1 100K partition 2 25K partition 3 25K partition 4 50K 29/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_029.png",
      "page_index": 403,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:16:41+07:00"
    }
  },
  "CO2017-chapter-8-slide-404-0000": {
    "id": "CO2017-chapter-8-slide-404-0000",
    "text": "Memory allocation There are 2 ways  Fixed-partition: memory is divided into several fixed-size partitions. A process is in a single partition Variable-partition: only assign enough memory for processes and OS keeps a table storing status of memory Job list: J1 (30K) J2 (50K) Original state J3 (30K) J4 (25K) partition 1 100K partition 2 25K partition 3 25K partition 4 50K 30/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_030.png",
      "page_index": 404,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:16:44+07:00"
    }
  },
  "CO2017-chapter-8-slide-405-0000": {
    "id": "CO2017-chapter-8-slide-405-0000",
    "text": "Memory allocation There are 2 ways  Fixed-partition: memory is divided into several fixed-size partitions. A process is in a single partition  Variable-partition: only assign enough memory for processes and OS keeps a table storing status of memory Job list: J1 (30K) J2 (50K) Original state J3 (30K) J4 (25K) partition 1 100K partition 2 25K partition 3 25K partition 4 50K 31/ 59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_031.png",
      "page_index": 405,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:16:47+07:00"
    }
  },
  "CO2017-chapter-8-slide-406-0000": {
    "id": "CO2017-chapter-8-slide-406-0000",
    "text": "Memory allocation There are 2 ways  Fixed-partition: memory is divided into several fixed-size partitions. A process is in a single partition  Variable-partition: only assign enough memory for processes and OS keeps a table storing status of memory Job list: J1 (30K) J2 (50K) Original state J3 (30K) After job allocatior J4 (25K) J1 (30K) partition 1 100K partition 2 25K J4 (25K) partition 3 25K partition 4 50K J2 (50K) 32/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_032.png",
      "page_index": 406,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:16:49+07:00"
    }
  },
  "CO2017-chapter-8-slide-407-0000": {
    "id": "CO2017-chapter-8-slide-407-0000",
    "text": "Variable partition  Fixed-partition scheme limits the level of multiprogramming Variable-partition scheme needs a mechanism to deal efficiently with set of holes os os os os process 5 process 5 process 5 process 5 process 9 process 8 process 10 process 2 process 2 process2 process 2 33/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_033.png",
      "page_index": 407,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:16:52+07:00"
    }
  },
  "CO2017-chapter-8-slide-408-0000": {
    "id": "CO2017-chapter-8-slide-408-0000",
    "text": "Variable partition Fixed-partition scheme limits the level of multiprogramming  Variable-partition scheme needs a mechanism to deal efficiently with set of holes os os os os process 5 process 5 process 5 process 5 process 9 process 9 process8 process 10 process 2 process 2 process 2 process 2 State: list of available (free) block sizes, input queue Dynamic storage-allocation problem: how to satisfy a request of size n from a list of free holes Strategies: first-fit, best-fit, worst-fit 34/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_034.png",
      "page_index": 408,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:16:56+07:00"
    }
  },
  "CO2017-chapter-8-slide-409-0000": {
    "id": "CO2017-chapter-8-slide-409-0000",
    "text": "Fragmentation Internal vs. external oS Internal fragmentation job A job B External fragmentation job C External fragmentation: small holes which cannot satisfy large request Internal fragmentation: unused memory which has been allocated for process 35/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_035.png",
      "page_index": 409,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:16:58+07:00"
    }
  },
  "CO2017-chapter-8-slide-410-0000": {
    "id": "CO2017-chapter-8-slide-410-0000",
    "text": "Outline 1 Background 2 Swapping 3 Contiguous memory allocation 4 Segmentation E Paging 36/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_036.png",
      "page_index": 410,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:16:59+07:00"
    }
  },
  "CO2017-chapter-8-slide-411-0000": {
    "id": "CO2017-chapter-8-slide-411-0000",
    "text": "What is segmentation ? Memory management should be convenient to both OS and programmers Programmers think of programs as set of data structures and methods subroutine stack With memory, they need  Collection of yariable-sized symbol table memory blocks (segments) Sqrt No neccessary ordering among main program segments logical address 37/ 59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_037.png",
      "page_index": 411,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:17:01+07:00"
    }
  },
  "CO2017-chapter-8-slide-412-0000": {
    "id": "CO2017-chapter-8-slide-412-0000",
    "text": "What is segmentation ? Memory management should be convenient to both OS and programmers Programmers think of programs as set of data structures and methods subroutine stack With memory, they need  Collection of yariable-sized symbol table memory blocks (segments) Sqrt No neccessary ordering among main program segments logical address Segment address = <segment-number, offset> 38/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_038.png",
      "page_index": 412,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:17:05+07:00"
    }
  },
  "CO2017-chapter-8-slide-413-0000": {
    "id": "CO2017-chapter-8-slide-413-0000",
    "text": "Segmentation hardware Segment address is 2-dimensional, but physical memory address is 1-dimensional limit_base subroutine stack 1400 segment segment 3 segment o CPU table sd 240 symbol segment  table mi base yes Sqrt segment 4 000 1400 6300 3200 main no program segment3 segment 1 segment 2 segment table 4300 4700 segment2 trap: addressing error physical memory logical address space segment4 5700 6300 segment 1 6700 physical memory Segment table is an array of base-limit register pairs 39/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_039.png",
      "page_index": 413,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:17:09+07:00"
    }
  },
  "CO2017-chapter-8-slide-414-0000": {
    "id": "CO2017-chapter-8-slide-414-0000",
    "text": "Outline 1 Background 2 Swapping 3 Contiguous memory allocation 4 Segmentation 5 Paging 40/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_040.png",
      "page_index": 414,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:17:10+07:00"
    }
  },
  "CO2017-chapter-8-slide-415-0000": {
    "id": "CO2017-chapter-8-slide-415-0000",
    "text": "What is paging ? Segmentation still has external fragmentation, requiring compaction Physical memory is divided into fixed-sized blocks (frame)  Logical memory is divided into same-sized blocks (page) frame number page 0 0 page 1 page 0 lagical page2 physical 2 address address f0000...0000 CPU d page 3 page table 3 page 2 f1111. .1111 logical 4 page 1 memory 5 6 physical page table memory page 3 physical memory Page address = <page number, page offset> 41/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_041.png",
      "page_index": 415,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:17:15+07:00"
    }
  },
  "CO2017-chapter-8-slide-416-0000": {
    "id": "CO2017-chapter-8-slide-416-0000",
    "text": "Paging in practice Logical address space = 2m page number page offset Page size = 2\" p d m - n n 42/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_042.png",
      "page_index": 416,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:17:16+07:00"
    }
  },
  "CO2017-chapter-8-slide-417-0000": {
    "id": "CO2017-chapter-8-slide-417-0000",
    "text": "Paging in practice Logical address space = 2m page number page offset Page size = 2\" p d m -n n 0 56 4 C 5 Y 7 6 8 ly 8 m 9 2 n 10 11 page table p 12 m 12 13 co 14 15 p logical memory 16 20 24 + 28 n = 2,m = 4 physical memory 43/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_043.png",
      "page_index": 417,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:17:20+07:00"
    }
  },
  "CO2017-chapter-8-slide-418-0000": {
    "id": "CO2017-chapter-8-slide-418-0000",
    "text": "Paging in practice Logical address space = 2m page number page offset Page size = 2n p d m -n n OTNm 0 5 A 6 5 Y 6 8 ly 8 m 2 n 10 k 11 page table p 12 m 12 13 c0 14 15 p logical memory 16 20 6 = 01102 page=012 24 + offset=102 28 2,m = 4 physical memory n= 44/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_044.png",
      "page_index": 418,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:17:25+07:00"
    }
  },
  "CO2017-chapter-8-slide-419-0000": {
    "id": "CO2017-chapter-8-slide-419-0000",
    "text": "Paging in practice Logical address space = 2m page number page offset Page size = 2n p d m -n n OTNm 0 5 6 8 8 m 2 n 10 k 11 22 page table p m c0 12 13 14 15 p logical memory 16 20 6 = 01102 page=012 24 + offset=102 28 2,m = 4 physical memory n = 45/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_045.png",
      "page_index": 419,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:17:29+07:00"
    }
  },
  "CO2017-chapter-8-slide-420-0000": {
    "id": "CO2017-chapter-8-slide-420-0000",
    "text": "Paging in practice Logical address space = 2m page number page offset Page size = 2n p d m -n n OTNm 0 56 8 m 2 cOa 10 k 11 page table 12 m 13 c01 12 14 15 p 16 phy.mem=26[=(6x4)+2] logical memory 20 6 = 01102 page=012 24  + offset=102 28 2,m = 4 physical memory n = 46/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_046.png",
      "page_index": 420,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:17:32+07:00"
    }
  },
  "CO2017-chapter-8-slide-421-0000": {
    "id": "CO2017-chapter-8-slide-421-0000",
    "text": "Paging in practice Logical address space = 2m page number page offset Page size = 2\" p d m -n n OTNm 0 56 4 8 m cOa 10 k 2 11 page table 13 m c0 12 14 15 p 16 phy.mem=26[=(6x4)+2] logical memory 20 6 = 01102 page=012 24 offset=102 g Paging has no external fragmentation, but has internal fragmentation. 47/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_047.png",
      "page_index": 421,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:17:37+07:00"
    }
  },
  "CO2017-chapter-8-slide-422-0000": {
    "id": "CO2017-chapter-8-slide-422-0000",
    "text": "Frame allocation free-frame list free-frame list 14 15 13 13page 1 13 18 20 14 14 page 0 15 15 15 page 0 16 page 0 16 page 1 page 1 page 2 17 page 2 17 page 3 page 3 new process 18 new process 18 page 2 19 014 19 113 20 218 20 page 3 320 21 new-process page table 21 A process can be given a non-contiguous set of frames 48/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_048.png",
      "page_index": 422,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:17:40+07:00"
    }
  },
  "CO2017-chapter-8-slide-423-0000": {
    "id": "CO2017-chapter-8-slide-423-0000",
    "text": "Frame allocation free-frame list free-frame list 14 15 13 13 page 1 13 18 20 14 14 page 0 15 15 15 page 0 16 page 0 16 page 1 page 1 page 2 17 page 2 17 page 3 page 3 new process 18 new process 18 page 2 19 014 19 113 20 218 20 page 3 320 21 new-process page table 21 A process can be given nntinunir A data structure (frame-table) is needed to manage frames. 49/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_049.png",
      "page_index": 423,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:17:45+07:00"
    }
  },
  "CO2017-chapter-8-slide-424-0000": {
    "id": "CO2017-chapter-8-slide-424-0000",
    "text": "Hardware support  Page table stored in main memory,  A page table for each process, pointer to it in PCB  Few page tables for all processes 50/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_050.png",
      "page_index": 424,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:17:46+07:00"
    }
  },
  "CO2017-chapter-8-slide-425-0000": {
    "id": "CO2017-chapter-8-slide-425-0000",
    "text": "Hardware support  Page table stored in main memory,  A page table for each process, pointer to it in PCB Few page tables for all processes  Page-address translation overhead => hardware support Page-table base register (PTBR): point to page table Translation look-aside buffer (TLB): associative, high-speed memory (<key,value>) 51/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_051.png",
      "page_index": 425,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:17:48+07:00"
    }
  },
  "CO2017-chapter-8-slide-426-0000": {
    "id": "CO2017-chapter-8-slide-426-0000",
    "text": "Hardware support  Page table stored in main memory,  A page table for each process, pointer to it in PCB  Few page tables for all processes  Page-address translation overhead = hardware support Page-table base register (PTBR): point to page table Translation look-aside buffer (TLB): associative, high-speed memory (<key,value>) hit ratio logical address CPU pd 80% effective access time: page frame 80% x 100(ns) + 20% x 200(ns) = 120(ns) number number 99% TLB hit physical effective access time = address 99% x 100(ns) + 1% x 200(ns) = 101(ns) TLB TLB miss physical memory page table 52/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_052.png",
      "page_index": 426,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:17:51+07:00"
    }
  },
  "CO2017-chapter-8-slide-427-0000": {
    "id": "CO2017-chapter-8-slide-427-0000",
    "text": "Protection From access permission: read-write/read-only bit From out-of-range access: valid-invalid bit Just keep a small range of pages => page-table length register (PTLR) 0 2 page 0 00000 frame number valid-invalid bit page 0 3 page 1 0 2 page 1 4 page 2 3 page 2 2 4 T 5 3 7 page 3 4 6 5 9 page 4 7 page 3 10,468 page 5 8 page 4 12,287 page table 9 page 5 . .. page n 53/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_053.png",
      "page_index": 427,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:17:56+07:00"
    }
  },
  "CO2017-chapter-8-slide-428-0000": {
    "id": "CO2017-chapter-8-slide-428-0000",
    "text": "Shared pages ed 1 0 3 ed 2 data 1 4 ed3 6 2 data 3 data 1 page table 3 ed 1 for P, ed 1 process P 4 ed 2 3 ed2 4 5 6 ed 3 7 6 ed 3 data 2 page table for P2 7 data 2 ed 1 process P2 3 8 ed2 4 6 9 ed3 2 10 data 3 page table for Pa 11 An advantage of paging is possibility of sharing common code 54/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_054.png",
      "page_index": 428,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:18:00+07:00"
    }
  },
  "CO2017-chapter-8-slide-429-0000": {
    "id": "CO2017-chapter-8-slide-429-0000",
    "text": "Hierarchical paging 2-level paging scheme ... ... 100 500 : ogicaladdress ... P1 P 100 500 ... ... 708 Pa .. 708 outer page table d  outer page 929 : 900 page of table page table : 900 : page of 929 page table : page table memory It is often applied for 32(or less)-bit address space 55/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_055.png",
      "page_index": 429,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:18:04+07:00"
    }
  },
  "CO2017-chapter-8-slide-430-0000": {
    "id": "CO2017-chapter-8-slide-430-0000",
    "text": "Hashed paging physical logical address address hash physical function memory hash table It is often applied for 32(or more)-bit address space 56/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_056.png",
      "page_index": 430,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:18:06+07:00"
    }
  },
  "CO2017-chapter-8-slide-431-0000": {
    "id": "CO2017-chapter-8-slide-431-0000",
    "text": "Hashed paging physical logical address address hash physical function memory hash table It is often applied for 32(or more)-bit address space 57/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_057.png",
      "page_index": 431,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:18:08+07:00"
    }
  },
  "CO2017-chapter-8-slide-432-0000": {
    "id": "CO2017-chapter-8-slide-432-0000",
    "text": "Inverted paging Just keep a page table for all processes. PID is needed to search for an address-space identifier logical physical address address pidp physical CPU d d memory search pid page table 58/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_058.png",
      "page_index": 432,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:18:10+07:00"
    }
  },
  "CO2017-chapter-8-slide-433-0000": {
    "id": "CO2017-chapter-8-slide-433-0000",
    "text": "Swapping with paging Mobile OSs (iOS, Android) follow the idea of swapping with paging, not swapping entire the process process page out A d 121314 g page in 1617f18h19j process B 20212223 y backing store main memory 59/59",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_059.png",
      "page_index": 433,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:18:12+07:00"
    }
  },
  "CO2017-chapter-9-slide-434-0000": {
    "id": "CO2017-chapter-9-slide-434-0000",
    "text": "Virtual memory Tran, Van Hoai Faculty of Computer Science & Engineering HCMC University of Technology E-mail: hoai@hcmut.edu.vn (partly based on slides of Le Thanh Van) 1/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_001.png",
      "page_index": 434,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:18:15+07:00"
    }
  },
  "CO2017-chapter-9-slide-435-0000": {
    "id": "CO2017-chapter-9-slide-435-0000",
    "text": "Outline 1 Background 2 Operations on virtual memory 3 Page-replacement algorithms 4 Frame allocation 5 Thrashing 6 Other consideration 2/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_002.png",
      "page_index": 435,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:18:16+07:00"
    }
  },
  "CO2017-chapter-9-slide-436-0000": {
    "id": "CO2017-chapter-9-slide-436-0000",
    "text": "Outline 1 Background 2 Operations on virtual memory  Page-replacement algorithms 4 Frame allocation 5 Thrashing 6 Other consideration 3/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_003.png",
      "page_index": 436,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:18:18+07:00"
    }
  },
  "CO2017-chapter-9-slide-437-0000": {
    "id": "CO2017-chapter-9-slide-437-0000",
    "text": "Role of virtual memory There needs a mechanism to load partially a program into physical memory for execution Why do we need to load those into memory ? Partially loaded programs may provide some advantages  Code to handle unusual error Programmers can write program for extremely large virtual conditions space Array allocated largely, but seldomly User program takes less physical memory = used fully multiprogramming increases without any sacrifice of response/turnaround time Less l/O needed to load/swap programs into memory 4/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_004.png",
      "page_index": 437,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:18:20+07:00"
    }
  },
  "CO2017-chapter-9-slide-438-0000": {
    "id": "CO2017-chapter-9-slide-438-0000",
    "text": "Role of virtual memory There needs a mechanism to load partially a program into physical memory for execution Why do we need to load those into memory ? Partially loaded programs may provide some advantages  Code to handle unusual error Programmers can write program for extremely large virtual conditions space Array allocated largely, but seldomly User program takes less physical memory = used fully multiprogramming increases without any sacrifice of response/turnaround time  Less l/O needed to load/swap programs into memory page 0 page 1 page2 Virtual memory involves the separation of logical memory as perceived by users from physical memory memory map page v physical virtual memory memory 5/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_005.png",
      "page_index": 438,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:18:24+07:00"
    }
  },
  "CO2017-chapter-9-slide-439-0000": {
    "id": "CO2017-chapter-9-slide-439-0000",
    "text": "Demand paging Idea Demand paging is a strategy to load pages only as they are needed (pager is not swapper) 0 2 B valid-invalid frame bit 3 2 C 0 4 Valid-invalid bit is D 5 E 6 C used to check 5 F  7 G memory resident of a 6 8 H 9 H page logical page table 10 memory 11 12 13 14 15 physical memory 6/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_006.png",
      "page_index": 439,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:18:28+07:00"
    }
  },
  "CO2017-chapter-9-slide-440-0000": {
    "id": "CO2017-chapter-9-slide-440-0000",
    "text": "Steps in demand paging Pure demand paging page is on backing store operating system Pure demand paging reference trap = only bringing pages into memory as load M required restart page table instruction free frame reset page bring in table missing page physical memory 7/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_007.png",
      "page_index": 440,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:18:30+07:00"
    }
  },
  "CO2017-chapter-9-slide-441-0000": {
    "id": "CO2017-chapter-9-slide-441-0000",
    "text": "Hardware support  Page table: marking valid-invalid of a page  Secondary memory (disk): known as swap device or swap space An instruction may have page fault anywhere, restarting the whole instruction is needed. Consider three-address instruction ADD A,B,C. 1 Fetch and decode the instruction (ADD) 2 Fetch A 3 Fetch B 4 Add A and B 5 Store sum to C 8/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_008.png",
      "page_index": 441,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:18:33+07:00"
    }
  },
  "CO2017-chapter-9-slide-442-0000": {
    "id": "CO2017-chapter-9-slide-442-0000",
    "text": "Hardware support  Page table: marking valid-invalid of a page  Secondary memory (disk): known as swap device or swap space An instruction may have page fault anywhere, restarting the whole instruction is needed. Consider three-address instruction ADD A, B, C. What happens if A, B, C 1 Fetch and decode the instruction (ADD) 2 Fetch A cannot be in main 3 Fetch B memory at the time of 4 Add A and B instruction ADD 5 Store sum to C executed ? 9/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_009.png",
      "page_index": 442,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:18:36+07:00"
    }
  },
  "CO2017-chapter-9-slide-443-0000": {
    "id": "CO2017-chapter-9-slide-443-0000",
    "text": "Performance of demand paging Denote p be probability of a page fault Effective access time = (1 - p) x memory access time +p x page fault time Page fault time generally consists of 11 Service the page-fault interrupt Read in the page Restart the process 590 10/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_010.png",
      "page_index": 443,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:18:38+07:00"
    }
  },
  "CO2017-chapter-9-slide-444-0000": {
    "id": "CO2017-chapter-9-slide-444-0000",
    "text": "Performance of demand paging Denote p be probability of a page fault Effective access time = (1 - p) x memory access time +p x page fault time Page fault time generally consists of 1 Service the page-fault interrupt Read in the page 2 3 Restart the process If page fault time = 8ms and memory access time = 200ns, then Effective access time (in ns) = 200 + 7,999,800 x p If page-fault rate p = 1/1000 then effective access time = 8.2 microseconds ( 40 x 200ns). 11/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_011.png",
      "page_index": 444,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:18:40+07:00"
    }
  },
  "CO2017-chapter-9-slide-445-0000": {
    "id": "CO2017-chapter-9-slide-445-0000",
    "text": "Outline 1 Background 2 Operations on virtual memory Page-replacement algorithms 4Frame allocation 5 Thrashing 6 Other consideration 12/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_012.png",
      "page_index": 445,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:18:41+07:00"
    }
  },
  "CO2017-chapter-9-slide-446-0000": {
    "id": "CO2017-chapter-9-slide-446-0000",
    "text": "Copy-on-write Copy-on-write Rapid process creation Minimizing the number of new pages allocated to newly created processes Before physical process memory process page A page B Applied for forkO page C vforkQ has no copy-on-write (more After process 1 modifies page C efficient), and physical process, memory process. parent process is page A suspended page B page C Copy of page C 13/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_013.png",
      "page_index": 446,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:18:45+07:00"
    }
  },
  "CO2017-chapter-9-slide-447-0000": {
    "id": "CO2017-chapter-9-slide-447-0000",
    "text": "Page replacement Some processes can utilize less pages than demanding = In order to increase multiprogramming degree, OS could over-allocating memory (when increasing multiprogramming degree) frame valid-invalic 0 A PC V B 2 C 3 D logicalmemory page table for kerne for process 1 process 1 1 2 D 3 C frame valid-invalid 4 F K bit 5 H F 6 A 2 G LLI H physical memory backing store ogical memory page table for for process2 process 2 14/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_014.png",
      "page_index": 447,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:18:50+07:00"
    }
  },
  "CO2017-chapter-9-slide-448-0000": {
    "id": "CO2017-chapter-9-slide-448-0000",
    "text": "Page replacement Some processes can utilize less pages than demanding = In order to increase multiprogramming degree, OS could over-allocating memory (when increasing multiprogramming degree) frame valid-invalic bit 0 A PC B 2 C ogical memory page table for kerne for process 1 process 1 1 2 D 3 C frame valid-invalid bit A F E 5 H F 6 A 2 G H physical memor No free frames. Options: ogical memory page table for for process2 process 2 - kill the process - swap out other process - page replacement 15/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_015.png",
      "page_index": 448,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:18:55+07:00"
    }
  },
  "CO2017-chapter-9-slide-449-0000": {
    "id": "CO2017-chapter-9-slide-449-0000",
    "text": "Basic page replacement Find location of desired page on disk frame validinvalid bit Find a free frame page out change victim a. if there is a free frame, use it 0 to invalid page b. if there is no free frame, call page-replacement algorithm victim reset page to select a victim frame page table table for new page C Write victim to disk and page in desired change status of related data page structures 3 Read desired page into frame, change data structures physical memory 4 Continue the process where page fault occurred 16/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_016.png",
      "page_index": 449,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:18:58+07:00"
    }
  },
  "CO2017-chapter-9-slide-450-0000": {
    "id": "CO2017-chapter-9-slide-450-0000",
    "text": "Basic page replacement Find location of desired page on disk frame valid-invalid bit 2 Find a free frame page out change victim a. if there is a free frame, use it 0 to invalid page b. if there is no free frame, call page-replacement algorithm victim resetpage to select a victim frame page table table for new page page in C. Write victim to disk and desired change status of related data page structures 3 Read desired page into frame change data structures physical memory 4 Continue the process where page fault occurred Minor tunnings Many stuffs in above scheme can be modified to get better performance, such as  modify bit (no need to write pages without any modification)  Read-only pages can be discarded when desired. 290 17/ 42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_017.png",
      "page_index": 450,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:19:02+07:00"
    }
  },
  "CO2017-chapter-9-slide-451-0000": {
    "id": "CO2017-chapter-9-slide-451-0000",
    "text": "Outline 1 Background 2 Operations on virtual memory 3 Page-replacement algorithms 4 Frame allocation 5 Thrashing 6 Other consideration 18/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_018.png",
      "page_index": 451,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:19:05+07:00"
    }
  },
  "CO2017-chapter-9-slide-452-0000": {
    "id": "CO2017-chapter-9-slide-452-0000",
    "text": "Page replacement algorithm Questions  How many frames allocated for a process ? Which frame to be replaced ? Different programs have different memory references (namely reference string)  Recording an address sequence as follows 0100, 0432, 0101, 0612, 0102, 0103, 0104, 0101, 0611, 0102, 0103, 0104, 0101, 0610, 0102, 0103, 0104, 0609, 0102, 0105 100 bytes per page, then address sequence converted to reference string 1,4,1,6,1,6,1,6,1,6,1 19/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_019.png",
      "page_index": 452,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:19:07+07:00"
    }
  },
  "CO2017-chapter-9-slide-453-0000": {
    "id": "CO2017-chapter-9-slide-453-0000",
    "text": "FIFO r page replacement Let's try the following reference string for three-frame memory 7,0,1,2,0,3,0,4,2,3,0,3,2,1,2,0,1,7,0,1 20/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_020.png",
      "page_index": 453,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:19:08+07:00"
    }
  },
  "CO2017-chapter-9-slide-454-0000": {
    "id": "CO2017-chapter-9-slide-454-0000",
    "text": "FIFO page replacement Let's try the following reference string for three-frame memory 7,0,1,2,0,3,0,4,2,3,0,3,2,1,2,0,1,7,0,1 FIFO page replacement Choose next page to be replaced in FIFO scheme reference string 0 1 2 0 3 0 4 2 3 0 3 2 2 0 1 7 0 7 2 2 2 4 4 0 0 0 0 3 3 2 0 0 3 2 page frames 15 page faults 21/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_021.png",
      "page_index": 454,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:19:13+07:00"
    }
  },
  "CO2017-chapter-9-slide-455-0000": {
    "id": "CO2017-chapter-9-slide-455-0000",
    "text": "Optimal replacement algorithm Bélädy's anomaly for FIFO 16 Number of available frames increases, but page fault does increase (proved to be unbounded (2010)) 2 3 4 5 6 number of frames 22/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_022.png",
      "page_index": 455,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:19:15+07:00"
    }
  },
  "CO2017-chapter-9-slide-456-0000": {
    "id": "CO2017-chapter-9-slide-456-0000",
    "text": "Optimal replacement algorithm Bélädy's anomaly for FIFO 16 Number of available frames increases, but page fault does increase (proved to be unbounded (2010)) 1 2 3 4 5 6 number of frames Optimal (MIN/OPT) page replacement Replace the page that will not be used for the longest period of time reference string 0 2 0 3 0 4 2 3 0 3 2 1 0 7 2 2 2 2 2 7 0 0 0 4 0 3 3 3 1 page frames 23/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_023.png",
      "page_index": 456,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:19:20+07:00"
    }
  },
  "CO2017-chapter-9-slide-457-0000": {
    "id": "CO2017-chapter-9-slide-457-0000",
    "text": "Optimal replacement algorithm Bélädy's anomaly for FIFO 16 20 Number of available frames increases, but page fault does increase (proved to be unbounded (2010)) 1 2 3 4 5 6 number of frames Optimal (MIN/OPT) page replacement Replace the page that will not be used for the longest period of time reference string C 2 0 3 3 0 - 2 2 2 2 9 page faults 0 0 0 4 0 3 3 1 1 page frames 24/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_024.png",
      "page_index": 457,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:19:25+07:00"
    }
  },
  "CO2017-chapter-9-slide-458-0000": {
    "id": "CO2017-chapter-9-slide-458-0000",
    "text": "Optimal replacement algorithm Bélädy's anomaly for FIFO 16 20 Number of available frames increases, but page fault does increase (proved to be unbounded (2010)) 2 1 2 3 4 5 6 number of frames Optimal (MIN/OPT) page replacement Replace the page that will not be used for the longest period of time reference string C 7 2 0 3 3 0 1 2 2 2 2 2 9 page faults 0 3 3 3 1 1 There is no information of the future 29C 25/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_025.png",
      "page_index": 458,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:19:29+07:00"
    }
  },
  "CO2017-chapter-9-slide-459-0000": {
    "id": "CO2017-chapter-9-slide-459-0000",
    "text": "LRU replacement algorithm LRU page replacement LRU (Least recently used) chooses the page that has not been used for the longest period of time reference string 0 1 2 3 3 0 3 2 0 0 2 2 0 1 1 1 0 0 3 3 O 3 2 2 2 page frames 26/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_026.png",
      "page_index": 459,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:19:32+07:00"
    }
  },
  "CO2017-chapter-9-slide-460-0000": {
    "id": "CO2017-chapter-9-slide-460-0000",
    "text": "LRU replacement algorithm LRU page replacement LRU (Least recently used) chooses the page that has not been used for the longest period of time reference string 0 2 0 2 0 0 2 2 0 1 1 1 0 3 3 O 3 2 2 2 page frames 27/ 42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_027.png",
      "page_index": 460,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:19:36+07:00"
    }
  },
  "CO2017-chapter-9-slide-461-0000": {
    "id": "CO2017-chapter-9-slide-461-0000",
    "text": "LRU replacement algorithm LRU page replacement LRU (Least recently used) chooses the page that has not been used for the longest period of time reference string 7 0 2 4 0 2 0 Q 2 2 0 1 1 1 0 3 3 O O 3 2 2 2 7 page frames We need hardware support to implement LRU algorithm Counters: an additional field in each page-table entry to store time-of-use (clock or counter). Referencing a page - copying storing clock register to time-of-use field Stack: using the idea of a stack, \"Last In First Out\" 28/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_028.png",
      "page_index": 461,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:19:39+07:00"
    }
  },
  "CO2017-chapter-9-slide-462-0000": {
    "id": "CO2017-chapter-9-slide-462-0000",
    "text": "Other algorithms LRU-approximation page replacement Additional-reference-bits algorithm Second-chance algorithm Enhanced second-chance algorithm  Counting-based page replacement Least frequently used (LFU) Most frequently used (MFU) Page-buffering algorithm 590 29/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_029.png",
      "page_index": 462,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:19:41+07:00"
    }
  },
  "CO2017-chapter-9-slide-463-0000": {
    "id": "CO2017-chapter-9-slide-463-0000",
    "text": "Outline 1 Background 4 Frame allocation 5 Thrashing 6 Other consideration 30/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_030.png",
      "page_index": 463,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:19:42+07:00"
    }
  },
  "CO2017-chapter-9-slide-464-0000": {
    "id": "CO2017-chapter-9-slide-464-0000",
    "text": "Minimum number of frames Minimum number of frames is defined by computer architecture IBM MVC instruction needs a 6 bytes (can straddle 2 pages) b) source location (2 pages) c) destination location (2 pages) > 6 pages totally Number levels of indirection should be limited 31/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_031.png",
      "page_index": 464,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:19:45+07:00"
    }
  },
  "CO2017-chapter-9-slide-465-0000": {
    "id": "CO2017-chapter-9-slide-465-0000",
    "text": "Allocation algorithms There are m frames  Equal allocation: n processes -? for each process  Proportional allocation: virtual memory size of p: is s: ai possibly depends on a combination of size and priority of the process 32/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_032.png",
      "page_index": 465,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:19:47+07:00"
    }
  },
  "CO2017-chapter-9-slide-466-0000": {
    "id": "CO2017-chapter-9-slide-466-0000",
    "text": "Allocation algorithms There are m frames  Equal allocation: n processes -?m for each process  Proportional allocation: virtual memory size of p: is sj a; possibly depends on a combination of size and priority of the process Performance issues  Global vs. local allocation Global replacement: replacement frame is any in the set of all frames  Local replacement: replacement frame is in its own set of allocated frames  Non-uniform memory access (NUMA) 33/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_033.png",
      "page_index": 466,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:19:49+07:00"
    }
  },
  "CO2017-chapter-9-slide-467-0000": {
    "id": "CO2017-chapter-9-slide-467-0000",
    "text": "Outline 1 Background Page-replacement algorithms 4 Frame allocation 5 Thrashing 6 Other consideration 34/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_034.png",
      "page_index": 467,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:19:50+07:00"
    }
  },
  "CO2017-chapter-9-slide-468-0000": {
    "id": "CO2017-chapter-9-slide-468-0000",
    "text": "Thrashing A process has no enough frames. Page faults occur frequently Time for paging is more than that for execution. SQC 35/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_035.png",
      "page_index": 468,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:19:52+07:00"
    }
  },
  "CO2017-chapter-9-slide-469-0000": {
    "id": "CO2017-chapter-9-slide-469-0000",
    "text": "Thrashing A process has no enough frames. Page faults occur frequently Time for paging is more than that for execution Thrashing High paging activity is called thrashing thrashing degree of multiprogramming 590 36/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_036.png",
      "page_index": 469,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:19:54+07:00"
    }
  },
  "CO2017-chapter-9-slide-470-0000": {
    "id": "CO2017-chapter-9-slide-470-0000",
    "text": "Working with thrashing We can limit effects of thrashing by  Using local replacement algorithm, not steal frames from another process Working-set strategy: using a locality model (locality = set of pages that are actively used together) A function has its own B locality which consists of  its local variables  subset of global variables sseuppe uowaw 24 22 suaqwnu eled 20 37/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_037.png",
      "page_index": 470,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:19:56+07:00"
    }
  },
  "CO2017-chapter-9-slide-471-0000": {
    "id": "CO2017-chapter-9-slide-471-0000",
    "text": "Working-set model : working-set window Working set: set of pages in the most recent  pages references  = 10 page reference table 2615777751623412344434344413234443444 4 12 WS(t,) ={1,2,5,6,7} WS(tz) ={3,4} Denote WSS; be working-set size of process i. Total demand is d=Z WSS: We can monitor D and respond accordingly when D > m 38/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_038.png",
      "page_index": 471,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:19:59+07:00"
    }
  },
  "CO2017-chapter-9-slide-472-0000": {
    "id": "CO2017-chapter-9-slide-472-0000",
    "text": "Page-fault frequency (PFF) increase number of frames upper bound lower bound decrease number of frames number of frames 590 39/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_039.png",
      "page_index": 472,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:20:00+07:00"
    }
  },
  "CO2017-chapter-9-slide-473-0000": {
    "id": "CO2017-chapter-9-slide-473-0000",
    "text": "Outline 1 Background Page-replacement algorithms 4Frame allocation 5 Thrashing 6 Other consideration 40/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_040.png",
      "page_index": 473,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:20:02+07:00"
    }
  },
  "CO2017-chapter-9-slide-474-0000": {
    "id": "CO2017-chapter-9-slide-474-0000",
    "text": "Prepaging: prevent large number of page faults that occur when a process is started  Page size: choice of page sige is often performed in OS design TLB reach Inverted page tables Program structure int i, j; int i, j; int data[128] [128] ; int data[128][128]; for( j = 0; j < 128; j++ ) for( i = 0; i < 128; i++ ) for( i = 0; i < 128; i++ ) for( j = 0; j < 128; j++ ) data[i][j] = 0; data[i][j] = 0; 41/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_041.png",
      "page_index": 474,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:20:05+07:00"
    }
  },
  "CO2017-chapter-9-slide-475-0000": {
    "id": "CO2017-chapter-9-slide-475-0000",
    "text": "Prepaging: prevent large number of page faults that occur when a process is started  Page size: choice of page sige is often performed in OS design TLB reach Inverted page tables Program structure int i, j; int i, j; int data[128][128] ; int data[128][128]; for( j = 0; j < 128; j++ ) for( i = 0; i < 128; i++  for( i = 0; i < 128; i++ ) for( j = O; j < 128; j++ ) data[i][j] = 0; data[i][j] = 0; If OS allocates fewer than 128 frames of 128 words for entire program, the left code has 128 x 128 = 16,384 page faults The right code possibly has only 128 page faults. 42/42",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_042.png",
      "page_index": 475,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:20:08+07:00"
    }
  },
  "CO2017-chapter-10-slide-476-0000": {
    "id": "CO2017-chapter-10-slide-476-0000",
    "text": "Chapter 1 10.A: File-System  lnterface 8 M What lsar OPERATING SYSTEM (OS) and How Does lt Work CLEVERISM.COM Silberschatz, Galvin and Gagne C2018 Operating System Concepts",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_001.png",
      "page_index": 476,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:20:10+07:00"
    }
  },
  "CO2017-chapter-10-slide-477-0000": {
    "id": "CO2017-chapter-10-slide-477-0000",
    "text": "BK Chapter 10.A: Outline TP.HCM File Concept Access Methods Disk and Directory Structure File-System Mounting File Sharing Protection Operating System Concepts 2 Silberschatz, Galvin and Gagne @2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_002.png",
      "page_index": 477,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:20:14+07:00"
    }
  },
  "CO2017-chapter-10-slide-478-0000": {
    "id": "CO2017-chapter-10-slide-478-0000",
    "text": "BK Obiectives TP.HCM To explain the function of file systems To describe the interfaces to file systems To discuss file-system design tradeoffs, including access methods file sharing, file locking, and directory structures To explore file-system protection Operating System Concepts 3 Silberschatz, Galvin and Gagne O2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_003.png",
      "page_index": 478,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:20:17+07:00"
    }
  },
  "CO2017-chapter-10-slide-479-0000": {
    "id": "CO2017-chapter-10-slide-479-0000",
    "text": "BK File Concept TP.HCM Contiguous logical address space Types: Data  complex numeric character  binary Program Contents defined by file's creator Many types Text file Source file Executable file Operating System Concepts 4 Silberschatz, Galvin and Gagne @2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_004.png",
      "page_index": 479,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:20:20+07:00"
    }
  },
  "CO2017-chapter-10-slide-480-0000": {
    "id": "CO2017-chapter-10-slide-480-0000",
    "text": "BK File Attributes TP.HCM Name - only information kept in human-readable form Identifier - unique tag (number) identifies file within file system Type - needed for systems that support different types Location - pointer to file location on device Size - current file size Protection - controls who can do reading, writing, executing Time, date, and user identification - data for protection, security, and usage monitoring Information about files are kept in the directory structure, which is maintained on the disk Many variations, including extended file attributes such as file checksum Operating System Concepts 5 Silberschatz, Galvin and Gagne O2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_005.png",
      "page_index": 480,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:20:25+07:00"
    }
  },
  "CO2017-chapter-10-slide-481-0000": {
    "id": "CO2017-chapter-10-slide-481-0000",
    "text": "BK A window of file info on Mac OS X TP.HCM O O O TX 11.tex Info TEX 11.tex 111KB Modified:Today2:00 PM Spotlight Comments: Ceneral: Kind:Tex Document Size:111,389 bytes (115 K8 on disk Where:/Users/greg/Dropbox/osc9e/tex CreatedToday 1:46 PM Modificd:Today 2:00 PM Label: C - Stationery pad D Locked More Info: Last opened:Today 1:47 PM Name&Extension: 11.tex Hide extension Open with: Tixtexmaker Use thisapplication to open all documents like this one. ChangeAll.. Preview. Sharing &Permissions: You can read and write Name Privilege greg (Me) Read&Write staff Read only everyone NoAccess Operating System Concepts 6 Silberschatz, Galvin and Gagne C2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_006.png",
      "page_index": 481,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:20:31+07:00"
    }
  },
  "CO2017-chapter-10-slide-482-0000": {
    "id": "CO2017-chapter-10-slide-482-0000",
    "text": "BK File Operations TP.HCM File is an abstract data type Create Write - at write pointer location Read - at read pointer location Reposition within file (or seek) Delete Truncate Open(F) - search the directory structure on disk for entry F, and move the content of entry to memory Close(F) - move the content of entry F in memory to directory structure on disk Operating System Concepts 7 Silberschatz, Galvin and Gagne O2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_007.png",
      "page_index": 482,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:20:35+07:00"
    }
  },
  "CO2017-chapter-10-slide-483-0000": {
    "id": "CO2017-chapter-10-slide-483-0000",
    "text": "BK Open Files TP.HCM Several pieces of data are needed to manage open files: Open-file table: tracks open files File pointer: pointer to last read/write location, per process that has the file open File-open count: counter of number of times a file is open - to allow removal of data from open-file table when last processes closes it Disk location of the file: cache of data access information Access rights: per-process access mode information Operating System Concepts 8 Silberschatz, Galvin and Gagne O2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_008.png",
      "page_index": 483,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:20:38+07:00"
    }
  },
  "CO2017-chapter-10-slide-484-0000": {
    "id": "CO2017-chapter-10-slide-484-0000",
    "text": "BK Open File Locking TP.HCM Provided by some operating systems and file systems Similar to reader-writer locks Shared lock similar to reader lock - several processes can acguire concurrently Exc/usive /ock similar to writer lock Mediates access to a file Mandatory or advisory Mandatory - access is denied depending on locks held and requested Advisory - processes can find status of locks and decide what to do Operating System Concepts 9 Silberschatz, Galvin and Gagne O2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_009.png",
      "page_index": 484,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:20:41+07:00"
    }
  },
  "CO2017-chapter-10-slide-485-0000": {
    "id": "CO2017-chapter-10-slide-485-0000",
    "text": "BK File Locking  Example - Java APl TP.HCM import java.io.*: import java.nio.channels.* : public class LockingExample { public static final boolean EXCLUSIVE = false; public static final boolean SHARED = true; public static void main(String arsg[] throws IoException { FileLock sharedLock = null; FileLock exclusiveLock = null; try { RandomAccessFile raf = new RandomAccessFile(\"file.txt\" \"rw\"); // get the channel for the file Filechannel ch = raf.getchannelO : // this locks the first half of the file - exclusive exclusiveLock = ch.lock(0, raf.length(O)/2, ExcLusIVE) : // release the lock exclusiveLock.releaseQ ; Operating System Concepts 10 Silberschatz, Galvin and Gagne O2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_010.png",
      "page_index": 485,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:20:47+07:00"
    }
  },
  "CO2017-chapter-10-slide-486-0000": {
    "id": "CO2017-chapter-10-slide-486-0000",
    "text": "BK File Locking Example - Java API (Cont.) TP.HCM // this locks the second half of the file - shared sharedlock = ch.lock(raf.lengthO/2+1 raf.lengthO, SHARED); / * * Now read the data .  // release the lock sharedlock. releaseO ; } catch (java.io.IoException ioe) { System.err -println(ioe) ; }finally { if (exclusiveLock != null) exclusiveLock.releaseO ; if (sharedlock != null) sharedlock. releaseO) ; 2 2 2 Operating System Concepts 11 Silberschatz, Galvin and Gagne O2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_011.png",
      "page_index": 486,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:20:51+07:00"
    }
  },
  "CO2017-chapter-10-slide-487-0000": {
    "id": "CO2017-chapter-10-slide-487-0000",
    "text": "BK File Types - Name, Extension TP.HCM file type usual extension function executable exe, com, bin ready-to-run machine- or none language program object obj, o compiled, machine language, not linked source code c, cc, java, pas, source code in various asm, a languages batch bat, sh commands to the command interpreter text txt, doc textual data, documents word processor wp, tex, rtf, various word-processor doc formats library lib, a, so, dll libraries of routines for programmers print or view ps, pdf, jpg ASCll or binary file in a format for printing or viewing archive arc, zip, tar related files grouped into one file, sometimes com- pressed, for archiving or storage multimedia mpeg, mov, rm, binary file containing mp3, avi audio or A/V information Operating System Concepts 12 Silberschatz, Galvin and Gagne @2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_012.png",
      "page_index": 487,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:20:58+07:00"
    }
  },
  "CO2017-chapter-10-slide-488-0000": {
    "id": "CO2017-chapter-10-slide-488-0000",
    "text": "BK File Structure TP.HCM None - sequence of words or bytes Simple record structures Lines Fixed length Variable length Complex structures Formatted document Relocatable load file (i.e., executable file) Can simulate last two with first method by inserting appropriate control characters Who decides: Operating system Program Operating System Concepts 13 Silberschatz, Galvin and Gagne O2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_013.png",
      "page_index": 488,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:21:01+07:00"
    }
  },
  "CO2017-chapter-10-slide-489-0000": {
    "id": "CO2017-chapter-10-slide-489-0000",
    "text": "BK Sequential-Access  File TP.HCM current position beginning end rewind read or write Operating System Concepts 14 Silberschatz, Galvin and Gagne C2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_014.png",
      "page_index": 489,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:21:04+07:00"
    }
  },
  "CO2017-chapter-10-slide-490-0000": {
    "id": "CO2017-chapter-10-slide-490-0000",
    "text": "BK Access Methods TP.HCM Sequential Access Direct Access - file is fixed- length logical records read next read n write next write n reset position to n no read after last write read next (rewrite) write next rewrite n n = relative block number Relative block numbers allow OS to decide where file should be placed See allocation problem in Chapter 12 Operating System Concepts 15 Silberschatz, Galvin and Gagne O2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_015.png",
      "page_index": 490,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:21:08+07:00"
    }
  },
  "CO2017-chapter-10-slide-491-0000": {
    "id": "CO2017-chapter-10-slide-491-0000",
    "text": "Simulation of Sequential-Access on Direct- BK Access  File TP.HCM sequential access implementation for direct access reset cp = 0; read next read cp: cp= cp+ 1; write next write cp; cp= cp+ 1; Operating System Concepts 16 Silberschatz, Galvin and Gagne C2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_016.png",
      "page_index": 491,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:21:12+07:00"
    }
  },
  "CO2017-chapter-10-slide-492-0000": {
    "id": "CO2017-chapter-10-slide-492-0000",
    "text": "BK Other Access Methods TP.HCM Can be built on top of base methods General involve creation of an index for the file Keep index in memory for fast determination of location of data to be operated on (consider UPC code plus record of data about that item) If too large, index (in memory) of the index (on disk) E.g., IBM Indexed Sequential-Access Method (IsAM) Small master index, points to disk blocks of secondary index File kept sorted on a defined key All done by the OS VMs operating system provides index and relative files as another example (see next slide) Operating System Concepts 17 Silberschatz, Galvin and Gagne O2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_017.png",
      "page_index": 492,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:21:16+07:00"
    }
  },
  "CO2017-chapter-10-slide-493-0000": {
    "id": "CO2017-chapter-10-slide-493-0000",
    "text": "BK Example of Index and Relative Files TP.HCM logical record last name number Adams Arthur Asher smith, john social-security age Smith index file relative file Operating System Concepts 18 Silberschatz, Galvin and Gagne C2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_018.png",
      "page_index": 493,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:21:19+07:00"
    }
  },
  "CO2017-chapter-10-slide-494-0000": {
    "id": "CO2017-chapter-10-slide-494-0000",
    "text": "BK Directory Structure TP.HCM A collection of nodes containing information about all files Directory Files F 2 F 4 F 1 F 3 F n Both the directory structure and the files reside on disk Operating System Concepts 19 Silberschatz, Galvin and Gagne C2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_019.png",
      "page_index": 494,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:21:22+07:00"
    }
  },
  "CO2017-chapter-10-slide-495-0000": {
    "id": "CO2017-chapter-10-slide-495-0000",
    "text": "BK Disk Structure TP.HCM Disk can be subdivided into partitions Disks or partitions can be RAiD protected against failure Disk or partition can be used raw - without a file system, or formatted with a file system Partitions also known as minidisks, slices Entity containing file system known as a volume Each volume containing file system also tracks that file system's info in device directory or volume table of contents As well as general-purpose file systems there are many special- purpose file systems, frequently all within the same operating system or computer Operating System Concepts 20 Silberschatz, Galvin and Gagne O2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_020.png",
      "page_index": 495,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:21:26+07:00"
    }
  },
  "CO2017-chapter-10-slide-496-0000": {
    "id": "CO2017-chapter-10-slide-496-0000",
    "text": "BK A Typical File-System Organization TP.HCM directory directory partition A disk 2 files disk 1 directory partition C files partition B files disk 3 Operating System Concepts 21 Silberschatz, Galvin and Gagne C2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_021.png",
      "page_index": 496,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:21:30+07:00"
    }
  },
  "CO2017-chapter-10-slide-497-0000": {
    "id": "CO2017-chapter-10-slide-497-0000",
    "text": "BK Types of File Systems TP.HCM We mostly talk of general-purpose file systems But systems frequently have many file systems, some general- and some special- purpose E.g., Solaris has tmpfs - memory-based volatile FS for fast, temporary l/O objfs - interface into kernel memory to get kernel symbols for debugging ctfs - contract file system for managing daemons lofs - loopback file system allows one FS to be accessed in place of another procfs - kernel interface to process structures ufs, zfs - general purpose file systems Operating System Concepts 22 Silberschatz, Galvin and Gagne O2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_022.png",
      "page_index": 497,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:21:34+07:00"
    }
  },
  "CO2017-chapter-10-slide-498-0000": {
    "id": "CO2017-chapter-10-slide-498-0000",
    "text": "BK Operations Performed on Directory TP.HCM Search for a file Create a file Delete a file List a directory Rename a file Traverse the file system Operating System Concepts 23 Silberschatz, Galvin and Gagne @2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_023.png",
      "page_index": 498,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:21:37+07:00"
    }
  },
  "CO2017-chapter-10-slide-499-0000": {
    "id": "CO2017-chapter-10-slide-499-0000",
    "text": "BK Directory Organization TP.HCM The directory is organized logically to obtain Efficiency - locating a file quickly Naming - convenient to users Two users can have same name for different files  The same file can have several different names Grouping - logical grouping of files by properties, (e.g., all Java programs, all games, ...) Operating System Concepts 24 Silberschatz, Galvin and Gagne @2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_024.png",
      "page_index": 499,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:21:40+07:00"
    }
  },
  "CO2017-chapter-10-slide-500-0000": {
    "id": "CO2017-chapter-10-slide-500-0000",
    "text": "BK Single-Level Directory TP.HCM A single directory for all users directory cat bo a test data mail cont hexrecords files Naming problem Grouping problem Operating System Concepts 25 Silberschatz, Galvin and Gagne @2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_025.png",
      "page_index": 500,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:21:43+07:00"
    }
  },
  "CO2017-chapter-10-slide-501-0000": {
    "id": "CO2017-chapter-10-slide-501-0000",
    "text": "BK Two-Level Directory TP.HCM Separate directory for each user Master file directory (MFD) User file directory (UFD) master file user 1 user 2 user 3 user 4 directory user file cat bo a test a data a test x data a directory Path name Can have the same file name for different user Efficient searching No grouping capability Operating System Concepts 26 Silberschatz, Galvin and Gagne O2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_026.png",
      "page_index": 501,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:21:48+07:00"
    }
  },
  "CO2017-chapter-10-slide-502-0000": {
    "id": "CO2017-chapter-10-slide-502-0000",
    "text": "BK Tree-Structured Directories TP.HCM root spell bin programs stat mail dist find count hex reorder p e mail prog copy prt exp reorder list find hex count list obj spell all last frst Operating System Concepts 27 Silberschatz, Galvin and Gagne @2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_027.png",
      "page_index": 502,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:21:53+07:00"
    }
  },
  "CO2017-chapter-10-slide-503-0000": {
    "id": "CO2017-chapter-10-slide-503-0000",
    "text": "BK Tree-Structured Directories  (Cont.) TP.HCM Efficient searching Grouping Capability Current directory (or working directory) E.g., For Linux OS cd /spell/mail/prog type list Operating System Concepts 28 Silberschatz, Galvin and Gagne C2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_028.png",
      "page_index": 503,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:21:56+07:00"
    }
  },
  "CO2017-chapter-10-slide-504-0000": {
    "id": "CO2017-chapter-10-slide-504-0000",
    "text": "BK Tree-Structured Directories (Cont.) TP.HCM Using absolute or relative path name Creating a new file is done in current directory Delete a file rm <file-name> Creating a new subdirectory is done in current directory mkdir <dir -name> Example: if in current directory /mail mkdir count mail prog copy prt exp count Operating System Concepts 29 Silberschatz, Galvin and Gagne O2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_029.png",
      "page_index": 504,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:21:59+07:00"
    }
  },
  "CO2017-chapter-10-slide-505-0000": {
    "id": "CO2017-chapter-10-slide-505-0000",
    "text": "BK Acyclic-Graph Directories TP.HCM Have shared subdirectories and files root dict spell Two different names (aliasing)  If dict deletes list = dangling list all W count countwords list pointer. Solutions: Backpointers, so we can delete all pointers Variable size records a problem fist rade  w7 Backpointers using a daisy chain organization Entry-hold-count solution Operating System Concepts 30 Silberschatz, Galvin and Gagne O2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_030.png",
      "page_index": 505,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:22:05+07:00"
    }
  },
  "CO2017-chapter-10-slide-506-0000": {
    "id": "CO2017-chapter-10-slide-506-0000",
    "text": "BK Acyclic-Graph Directories (Cont.) TP.HCM New directory entry type Link - another name (pointer) to an existing file Resolve the link - follow pointer to locate the file Operating System Concepts 31 Silberschatz, Galvin and Gagne C2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_031.png",
      "page_index": 506,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:22:07+07:00"
    }
  },
  "CO2017-chapter-10-slide-507-0000": {
    "id": "CO2017-chapter-10-slide-507-0000",
    "text": "General Graph Directory BK TP.HCM root avi tc jim text mail countbook book mail unhex hyp avi count unhex hex Operating System Concepts 32 Silberschatz, Galvin and Gagne O2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_032.png",
      "page_index": 507,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:22:11+07:00"
    }
  },
  "CO2017-chapter-10-slide-508-0000": {
    "id": "CO2017-chapter-10-slide-508-0000",
    "text": "BK General Graph Directory (Cont.) TP.HCM How do we guarantee no cycles? Allow on/y links to file not subdirectories Garbage collection Every time a new link is added use a cycle detection algorithm to determine whether it is OK Operating System Concepts 33 Silberschatz, Galvin and Gagne @2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_033.png",
      "page_index": 508,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:22:14+07:00"
    }
  },
  "CO2017-chapter-10-slide-509-0000": {
    "id": "CO2017-chapter-10-slide-509-0000",
    "text": "BK File System n Mounting TP.HCM A file system must be mounted before it can be accessed A unmounted file system (i.e., Fig. (b) is mounted at a mount point Qusers bill fred sue jane C Ohelp Odoc prog (a) (b) Operating System Concepts 34 Silberschatz, Galvin and Gagne O2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_034.png",
      "page_index": 509,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:22:19+07:00"
    }
  },
  "CO2017-chapter-10-slide-510-0000": {
    "id": "CO2017-chapter-10-slide-510-0000",
    "text": "BK Mount Point TP.HCM users jane sue doc prog Operating System Concepts 35 Silberschatz, Galvin and Gagne C2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_035.png",
      "page_index": 510,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:22:21+07:00"
    }
  },
  "CO2017-chapter-10-slide-511-0000": {
    "id": "CO2017-chapter-10-slide-511-0000",
    "text": "BK File Sharing TP.HCM Sharing of files on multi-user systems is desirable Sharing may be done through a protection scheme On distributed systems, files may be shared across a network Network File System (NFs) is a common distributed file-sharing method If multi-user system Owner of a file / directory  User /Ds identify users, allowing permissions and protections to be per-user Group of a file / directory  Group /Ds allow users to be in groups, permitting group access rights Operating System Concepts 36 Silberschatz, Galvin and Gagne O2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_036.png",
      "page_index": 511,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:22:25+07:00"
    }
  },
  "CO2017-chapter-10-slide-512-0000": {
    "id": "CO2017-chapter-10-slide-512-0000",
    "text": "BK File Sharing - Remote File Systems TP.HCM Uses networking to allow file system access between systems Manually via programs like FTP Automatically, seamlessly using distributed file systems Semi automatically via the world wide web Client-server model allows clients to mount remote file systems from servers Server can serve multiple clients Client and user-on-client identification is insecure or complicated NFs is standard UNIX client-server file sharing protocol CIFs is standard Windows protocol Standard operating system file calls are translated into remote calls Distributed Information Systems (distributed naming services) such as LDAP, DNS, NIS, Active Directory implement unified access to information needed for remote computing Operating System Concepts 37 Silberschatz, Galvin and Gagne O2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_037.png",
      "page_index": 512,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:22:29+07:00"
    }
  },
  "CO2017-chapter-10-slide-513-0000": {
    "id": "CO2017-chapter-10-slide-513-0000",
    "text": "BK File Sharing - Failure  Modes TP.HCM All file systems have failure modes For example corruption of directory structures or other non-user data, called metadata Remote file systems add new failure modes, due to network failure server failure Recovery from failure can involve state information about status of each remote request Stateless protocols such as NFS v.3 include all information in each request, allowing easy recovery but less security Operating System Concepts 38 Silberschatz, Galvin and Gagne O2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_038.png",
      "page_index": 513,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:22:34+07:00"
    }
  },
  "CO2017-chapter-10-slide-514-0000": {
    "id": "CO2017-chapter-10-slide-514-0000",
    "text": "BK File Sharing - Consistency Semantics TP.HCM Specify how multiple users are to access a shared file simultaneously Similar to Ch. 5 process synchronization algorithms  Tend to be less complex due to disk l/O and network latency (for remote file systems Andrew File System (AFs) implemented complex remote file sharing semantics AFS has session semantics Writes only visible to sessions starting after the file is closed Unix file system (uFs) implements:  Writes to an open file visible immediately to other users of the same open file Sharing file pointer to allow multiple users to read and write concurrently Operating System Concepts 39 Silberschatz, Galvin and Gagne O2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_039.png",
      "page_index": 514,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:22:38+07:00"
    }
  },
  "CO2017-chapter-10-slide-515-0000": {
    "id": "CO2017-chapter-10-slide-515-0000",
    "text": "BK Protection TP.HCM File owner/creator should be able to control: what can be done by whom Types of access Read Write Execute Append Delete List Operating System Concepts 40 Silberschatz, Galvin and Gagne 2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_040.png",
      "page_index": 515,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:22:40+07:00"
    }
  },
  "CO2017-chapter-10-slide-516-0000": {
    "id": "CO2017-chapter-10-slide-516-0000",
    "text": "BK Access Lists and Groups TP.HCM Mode of access: read (R), write (W), execute (X) Three classes of users on Unix / Linux RWX owner access 7 = 111 owner group public RWX 6 roup access = 110 chmod 761 game RWX c) public access 1 0 0 1 Ask manager to create a group (unique name), say G, and add some users to the group For a particular file (say game) or subdirectory, define an appropriate access. Attach a group to a file chgrp G game Operating System Concepts 41 Silberschatz, Galvin and Gagne O2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_041.png",
      "page_index": 516,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:22:45+07:00"
    }
  },
  "CO2017-chapter-10-slide-517-0000": {
    "id": "CO2017-chapter-10-slide-517-0000",
    "text": "Windows 7 Access-Control List BK Management TP.HCM ListPanel.java Properties General Security Details Previous Versions Object name: HDATAPattems MaterialSrcistPaneljava Group or user names: 8 SYSTEM  Gregory G. Gagne (ggagne@wcusers.int) &Guest(WCUSERSGuest) g3 FileAdmins (WCUSERSFileAdmins) g3 Administrators (FILESAdministrators) To change pemissions.click Edit Edit... Pemissions for Guest Allow Deny Full control Modify V Read & execute V Read Write Special permissions For special permissions or advanced settings Advanced click Advanced Leam about access control and permissions OK Cancel Apply Operating System Concepts 42 Silberschatz, Galvin and Gagne O2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_042.png",
      "page_index": 517,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:22:50+07:00"
    }
  },
  "CO2017-chapter-10-slide-518-0000": {
    "id": "CO2017-chapter-10-slide-518-0000",
    "text": "BK A Sample UNIX Directory Listing TP.HCM 1 pbg staff 31200 Sep 3 08:30 intro.ps rw-rw-r-- drwx--- 5 pbg staff 512 Jul 8 09.33 private/ drwxrwxr-x 2 pbg staff 512 Jul 8 09:35 doc/ 2 pbg drwxrwx--- student 512 Aug 3 14:13 student-proj 1 pbg staff 9423 Feb 24 2003 rw-r--r-- program.c 1 pbg staff 20471 Feb 24 2003 rwxr-xr-x program drwx--x--x 4 pbg faculty 512 Jul 31 10:31 lib/ 3 pbg drwx---- staff 1024 Aug 29 06:52 mail/ drwxrwxrwx 3 pbg staff 512 Jul 8 09:35 test/ Operating System Concepts 43 Silberschatz, Galvin and Gagne O2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_043.png",
      "page_index": 518,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:22:56+07:00"
    }
  },
  "CO2017-chapter-10-slide-519-0000": {
    "id": "CO2017-chapter-10-slide-519-0000",
    "text": "BK Summary TP.HCM A file is an abstract data type defined and implemented by the operating system. It is a sequence of logical records. A logical record may be a byte, a line (of fixed or variable length), or a more complex data item. The operating system may specifically support various record types or may leave that support to the application program. A major task for the operating system is to map the /ogical file concept onto physical storage devices such as hard disk or NVM device. Since the physical record size of the device may not be the same as the logical record size, it may be necessary to order logical records into physical records. Again, this task may be supported by the operating system or left for the application program. Operating System Concepts 44 Silberschatz, Galvin and Gagne O2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_044.png",
      "page_index": 519,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:23:00+07:00"
    }
  },
  "CO2017-chapter-10-slide-520-0000": {
    "id": "CO2017-chapter-10-slide-520-0000",
    "text": "BK Summary (Cont.) TP.HCM Within a file system, it is useful to create directories to allow files to be organized. A sing/e-level directory in a multiuser system causes naming problems, since each file must have a unique name. A two- level directory solves this problem by creating a separate directory for each user's files. The directory lists the files by name and includes the file's location on the disk, length, type, owner, time of creation, time of last use, ... The natural generalization of a two-level directory is a tree-structured directory. A tree-structured directory allows a user to create subdirectories to organize files. Acyclic-graph directory structures enable users to share subdirectories and files but complicate searching and deletion. A general graph structure allows complete flexibility in the sharing of files and direc- tories but sometimes requires garbage collection to recover unused disk space Operating System Concepts 45 Silberschatz, Galvin and Gagne O2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_045.png",
      "page_index": 520,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:23:05+07:00"
    }
  },
  "CO2017-chapter-10-slide-521-0000": {
    "id": "CO2017-chapter-10-slide-521-0000",
    "text": "BK Summary (Cont.) TP.HCM Remote file systems present challenges in reliability, performance and security. Distributed information systems maintain user, host, and access information so that clients and servers can share state information to man- age use and access. Since files are the main information-storage mechanism in most computer systems, file protection is needed on multiuser systems. Access to files can be controlled separately for each type of access - read, write, execute, append, delete, list directory, and so on. File protection can be provided by access lists, passwords, or other techniques Operating System Concepts 46 Silberschatz, Galvin and Gagne O2018",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_046.png",
      "page_index": 521,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:23:09+07:00"
    }
  },
  "CO2017-chapter-10-slide-522-0000": {
    "id": "CO2017-chapter-10-slide-522-0000",
    "text": "End of Chapter 1 10.A. M Whatlar OPERATING SYSTEM (OS) and How Does lt Work CLEVERISM.COM Silberschatz, Galvin and Gagne @2018 Operating System Concepts",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_047.png",
      "page_index": 522,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:23:12+07:00"
    }
  },
  "CO2017-chapter-10-slide-523-0000": {
    "id": "CO2017-chapter-10-slide-523-0000",
    "text": "Chapter 10.B: File-System Implementation M Whatlgar OPERATING SYSTEM (OS and How loes lt Work CLEVERISM.COM Some slides from the Silberschatz, Galvin and Gagne \"Operating System Concepts\", 10th eds, 2018 @2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_001.png",
      "page_index": 523,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:23:15+07:00"
    }
  },
  "CO2017-chapter-10-slide-524-0000": {
    "id": "CO2017-chapter-10-slide-524-0000",
    "text": "BK File-System  Structure TP.HCM File structure Logical storage unit Collection of related information File system resides on secondary storage (e.g., disks) Provided user interface to storage, mapping logical to physical Provides efficient and convenient access to disk by allowing data to be stored, located, and retrieved easily Disk provides in-place rewrite and random access l/O transfers performed in blocks of sectors (usually 512 bytes) File control block (FCB) - storage structure consisting of information about a file Device driver controls the physical device File system is organized into layers Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 4 2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_002.png",
      "page_index": 524,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:23:19+07:00"
    }
  },
  "CO2017-chapter-10-slide-525-0000": {
    "id": "CO2017-chapter-10-slide-525-0000",
    "text": "BK Layered File System TP.HCM Layering useful for reducing complexity and application programs redundancy, but adds overhead and can decrease performance logical file system Device drivers_manage l/O devices at the I/O control layer E.g., Given commands like \"read drive1, cylinder file-organization module 72, track 2, sector 10, into memory location 1060' outputs low-level hardware specific commands to hardware controller basic file system Basic file system_given command like \"retrieve block 123\" translates to device driver Also manages memory buffers and caches l/O control (allocation, freeing, replacement) Buffers hold data in transit devices Caches hold frequently used data Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 5 2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_003.png",
      "page_index": 525,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:23:25+07:00"
    }
  },
  "CO2017-chapter-10-slide-526-0000": {
    "id": "CO2017-chapter-10-slide-526-0000",
    "text": "BK Layered File System TP.HCM application programs File organization module_understands files, logical address, and physical blocks Translates logical block # to physical block # logical file system Manages free space, disk allocation Logical file system_manages metadata information file-organization module Translates file name into file number, file handle location by maintaining file control blocks (i.e. inodes in UNIX) basic file system Directory management Protection l/O control Logical layers can be implemented by any coding method according to OS designer devices Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 6 2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_004.png",
      "page_index": 526,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:23:29+07:00"
    }
  },
  "CO2017-chapter-10-slide-527-0000": {
    "id": "CO2017-chapter-10-slide-527-0000",
    "text": "BK File-System Implementation TP.HCM We have system cal/s at the API level, but how do we implement their functions? On-disk and in-memory structures Boot control block contains info needed by system to boot OS from that volume Needed if volume contains OS, usually first block of volume Volume control block (e.g., superblock, master file table) contains volume details Total # of blocks, # of free blocks, block size, free block pointers or array Directory structure organizes the files Names and inode numbers, master file table Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 8 2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_005.png",
      "page_index": 527,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:23:32+07:00"
    }
  },
  "CO2017-chapter-10-slide-528-0000": {
    "id": "CO2017-chapter-10-slide-528-0000",
    "text": "BK File-System Implementation (Cont.) TP.HCM Entire disk Partition table Disk partition MBR Boot sector Partition control block FCB's Files and directories Some slides from the Silberschatz, Galvin and Gagne. \"Operating System Concepts\", 10th eds, 2018. 9 C2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_006.png",
      "page_index": 528,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:23:36+07:00"
    }
  },
  "CO2017-chapter-10-slide-529-0000": {
    "id": "CO2017-chapter-10-slide-529-0000",
    "text": "BK File-System Implementation (Cont.) TP.HCM Per-file File Control Block (FCB) contains many details about the file typically inode number, permissions, size, dates NTFS stores into in master file table using relational DB structures file permissions file dates (create, access, write file owner, group, ACL file size file data blocks or pointers to file data blocks Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 10 2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_007.png",
      "page_index": 529,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:23:40+07:00"
    }
  },
  "CO2017-chapter-10-slide-530-0000": {
    "id": "CO2017-chapter-10-slide-530-0000",
    "text": "BK In-Memory File System Structures TP.HCM Mount table storing file system mounts, mount points, file system types System-wide open-file table contains a copy of the FCB of each file and other info Per-process open-file table contains pointers to appropriate entries in system-wide open-file table as well as other info The following figure illustrates the necessary file system structures provided by the operating systems Figure (a) refers to opening a file Figure (b) refers to reading a file Plus buffers hold data blocks from secondary storage Open returns a file handle for subsequent use Data from read copied to specified user process memory address Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 11 2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_008.png",
      "page_index": 530,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:23:45+07:00"
    }
  },
  "CO2017-chapter-10-slide-531-0000": {
    "id": "CO2017-chapter-10-slide-531-0000",
    "text": "BK In-Memory File System Structures TP.HCM directory structure open (file name) directory structure file-control block kernel memory user space secondary storage (a) index data blocks read (index) per-process system-wide file-control block open-file table open-file table kernel memory user space secondary storage (b) Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 12 2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_009.png",
      "page_index": 531,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:23:49+07:00"
    }
  },
  "CO2017-chapter-10-slide-532-0000": {
    "id": "CO2017-chapter-10-slide-532-0000",
    "text": "BK Directory Implementation TP.HCM Linear list of file names with pointer to the data blocks Simple to program Time-consuming to execute  Linear search time Could keep ordered alphabetically via linked list or use B+ tree Hash Table - linear list with hash data structure Decreases directory search time Collisions - situations where two file names hash to the same location Only good if entries are fixed size, or use chained-overflow method Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 13 2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_010.png",
      "page_index": 532,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:23:52+07:00"
    }
  },
  "CO2017-chapter-10-slide-533-0000": {
    "id": "CO2017-chapter-10-slide-533-0000",
    "text": "BK Allocation Methods - Contiguous TP.HCM An allocation method refers to how disk blocks are allocated for files Contiguous allocation - each file occupies set of contiguous blocks Best performance in most cases Simple - only starting location (block #) and length (number of blocks are required Problems include finding space for file, knowing file size, external fragmentation, need for compaction off-line (downtime) or on-line Some slides from the Silberschatz, Galvin and Gagne. \"Operating System Concepts\", 10th eds, 2018. 14 2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_011.png",
      "page_index": 533,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:23:56+07:00"
    }
  },
  "CO2017-chapter-10-slide-534-0000": {
    "id": "CO2017-chapter-10-slide-534-0000",
    "text": "BK Contiguous Allocation TP.HCM Mapping from logical to physical directory file start length count count 0 2 tr 14 3 mail 19 6 Q list 28 4 91011 : f 6 2 tr LA/512 12 131415 16171819 R mail 20212223 24252627 list 28293031 Block to be accessed = Q + starting address Displacement into block = R Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 15 C2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_012.png",
      "page_index": 534,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:24:01+07:00"
    }
  },
  "CO2017-chapter-10-slide-535-0000": {
    "id": "CO2017-chapter-10-slide-535-0000",
    "text": "BK Extent-Based Systems TP.HCM Many newer file systems (e.g., Veritas File System) use a modified contiguous allocation scheme Extent-based file systems allocate disk blocks in extents An extent is a contiguous block of disks Extents are allocated for file allocation A file consists of one or more extents Some slides from the Silberschatz, Galvin and Gagne. \"Operating System Concepts\", 10th eds, 2018. 16 2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_013.png",
      "page_index": 535,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:24:05+07:00"
    }
  },
  "CO2017-chapter-10-slide-536-0000": {
    "id": "CO2017-chapter-10-slide-536-0000",
    "text": "BK Allocation Methods - Linked TP.HCM Linked allocation - each file is a linked list of blocks File ends at nil pointer No external fragmentation Each block contains pointer to next block No compaction, external fragmentation Free space management system called when new block needed Improve efficiency by clustering blocks into groups but increases internal fragmentation Reliability can be a problem Locating a block can take many l/Os and disk seeks File Allocation Table (FAT) variation Beginning of volume has table, indexed by block number Much like a linked list. but faster on disk and cacheable New block allocation simple Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 17 2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_014.png",
      "page_index": 536,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:24:10+07:00"
    }
  },
  "CO2017-chapter-10-slide-537-0000": {
    "id": "CO2017-chapter-10-slide-537-0000",
    "text": "BK Linked Allocation TP.HCM directory file start end jeep 9 25 2 3 4 5 6 8 10 11 12131415 16171819 20212223 24252627 28293031 Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 19 2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_015.png",
      "page_index": 537,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:24:15+07:00"
    }
  },
  "CO2017-chapter-10-slide-538-0000": {
    "id": "CO2017-chapter-10-slide-538-0000",
    "text": "BK File-Allocation Table  (FAT) TP.HCM directory entry test 217 name start block 0  217 618 339 618 339 number of disk blocks FAT Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 20 2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_016.png",
      "page_index": 538,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:24:18+07:00"
    }
  },
  "CO2017-chapter-10-slide-539-0000": {
    "id": "CO2017-chapter-10-slide-539-0000",
    "text": "BK Allocation Methods - lndexed TP.HCM Indexed allocation Each file has its own index block(s) of pointers to its data blocks Logical view index table Some slides from the Silberschatz, Galvin and Gagne. \"Operating System Concepts\", 10th eds, 2018. 21 C2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_017.png",
      "page_index": 539,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:24:21+07:00"
    }
  },
  "CO2017-chapter-10-slide-540-0000": {
    "id": "CO2017-chapter-10-slide-540-0000",
    "text": "BK Example of Indexed Allocation TP.HCM directory file index block jeep 19 2 5 8 1011 9 16 12 13 1 10 19 18 19 25 -1 202122Z23 -1 -1 24252627 28293031 Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 22 2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_018.png",
      "page_index": 540,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:24:26+07:00"
    }
  },
  "CO2017-chapter-10-slide-541-0000": {
    "id": "CO2017-chapter-10-slide-541-0000",
    "text": "BK Indexed Allocation (Cont.) TP.HCM Need index table Random access Dynamic access without external fragmentation, but have overhead of index block E.g., Mapping from logical to physical in a file of maximum size of 256K bytes and block size of 512 bytes. We need only 1 block for index table Q = displacement into index table Q R = displacement into block LA/512 R Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 23 C2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_019.png",
      "page_index": 541,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:24:30+07:00"
    }
  },
  "CO2017-chapter-10-slide-542-0000": {
    "id": "CO2017-chapter-10-slide-542-0000",
    "text": "Combined Scheme: UNIX UFS BK Suppose that on a computer, the Os uses i- TP.HCM nodes and each disk block is 4KB. Assume that an i-node contains 12 direct block numbers (disk addresses) and the block numbers for one indirect block file one double indirect block metadata and one triple indirect block. Assume also that a block data number is 4 bytes. What is the largest possible file on that direct blocks data computer (assuming the disk is large enough) data single indirect blocks data data 4K bytes per data double indirect blocks block,32-bit data triple indirect addresses data data blocks data More index data blocks than can data be addressed data with 32-bit file data pointer data data Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018 27 2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_020.png",
      "page_index": 542,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:24:37+07:00"
    }
  },
  "CO2017-chapter-10-slide-543-0000": {
    "id": "CO2017-chapter-10-slide-543-0000",
    "text": "BK File (user view) TP.HCM directory inode#1109 triple-indirect block#32 foo.txt (10 blocks) file inode# double-indirect=2 A B C D E 123 double-indirect=3 . G H 1 11 foo.txt 777 A B E file inode#777 2 3 4 5 6 7 8 9 permissions size 10 11 12 13 14 15 16 17 18 19 moditication time access time directblock=0 20 21 directblock=1 22 23 24 25 26 27 28 29 indirectblock=20 double-indirect=30 C D triple-indirect=32 30 31 32 33 34 35 36 37 38 39 single indirect block#20 double-indirect block#30 single indirect block #38 directblock=35 indirectblock=38 direct-block=9 directblock=36 indirectblock=39 direct-block=19 Some slides fron \"Operating Syste 28022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_021.png",
      "page_index": 543,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:24:46+07:00"
    }
  },
  "CO2017-chapter-10-slide-544-0000": {
    "id": "CO2017-chapter-10-slide-544-0000",
    "text": "BK Free-Space Management TP.HCM File system maintains free-space list to track available blocks/clusters (Using term \"block\" for simplicity) Bit vector or bit map (n blocks) 0 1 2 n-1 bit[1]= 1 => block[i] free 8 0 =block[i] occupied Block number calculation number of bits per word)* (number of 0-value words) + offset of first 1 bit CPUs have instructions to return offset within word of first \"1\" bit Some slides from the Silberschatz, Galvin and Gagne. \"Operating System Concepts\", 10th eds, 2018. 31 2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_022.png",
      "page_index": 544,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:24:50+07:00"
    }
  },
  "CO2017-chapter-10-slide-545-0000": {
    "id": "CO2017-chapter-10-slide-545-0000",
    "text": "BK Free-Space  Management .(Cont.) TP.HCM Bit map requires extra space Example: block size = 4KB = 212 bytes disk size = 240 bytes (1 terabyte) n = 240/212 = 228 bits (or 32MB if clusters of 4 blocks -> 8MB of memory Easy to get contiguous files Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 32 C2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_023.png",
      "page_index": 545,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:24:55+07:00"
    }
  },
  "CO2017-chapter-10-slide-546-0000": {
    "id": "CO2017-chapter-10-slide-546-0000",
    "text": "BK Linked Free Space List on Disk TP.HCM Linked list (free list) Cannot get contiguous space free-space list head - easily 2 3 No waste of space No need to traverse the entire 8 list (if # free blocks recorded) 12 13 16 18 19 20212223 24 25 26 27 28293031 Some slides from the Silberschatz, Galvin and Gagne. \"Operating System Concepts\", 10th eds, 2018. 33 C2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_024.png",
      "page_index": 546,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:24:59+07:00"
    }
  },
  "CO2017-chapter-10-slide-547-0000": {
    "id": "CO2017-chapter-10-slide-547-0000",
    "text": "BK Free-Space e Management (Cont.) TP.HCM Grouping Modify linked list to store address of next (n-1) free blocks in first free block, plus a pointer to next block that contains free-block-pointers (like this one) Counting Because space is frequently contiguously used and freed, with contiguous-allocation allocation, extents, or clustering  Keep address of first free block and count of following free blocks  Free space list then has entries containing addresses and counts Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 34 C2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_025.png",
      "page_index": 547,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:25:03+07:00"
    }
  },
  "CO2017-chapter-10-slide-548-0000": {
    "id": "CO2017-chapter-10-slide-548-0000",
    "text": "BK Free-Space  Management .(Cont.) TP.HCM Grouping 2 3 Modify linked list to store address of 4 5 6 7 next (n) free blocks in first free block. plus a pointer to next block that 8 9 10 11 contains free-block-pointers (like this 12 13 14 15 one) 16 17 18 19 Grouping, n = 3 20 21 22 23 Bock 2 stores 3,4,5 24 25 26 27 Bock 5 stores 8,9,10 28 29 30 31 Block 10 stores 11, 12, 13 Bock 13 stores 17,28,25 Bock 25 stores 26,27 Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 35 2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_026.png",
      "page_index": 548,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:25:09+07:00"
    }
  },
  "CO2017-chapter-10-slide-549-0000": {
    "id": "CO2017-chapter-10-slide-549-0000",
    "text": "BK Free-Space  Management .(Cont.) TP.HCM Counting 0 2 3 Because space is frequently 4 5 6 7 contiguously used and freed, with contiguous-allocation allocation, 8 9 10 11 extents, or clustering 12 13 14 15 Keep address of first free block and 16 17 18 19 count of following free blocks 20 21 22 23 Free space list then has entries 24 25 26 27 containing addresses and counts 28 29 30 31 start count 2 4 8 6 17 2 25 3 Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 36 2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_027.png",
      "page_index": 549,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:25:16+07:00"
    }
  },
  "CO2017-chapter-10-slide-550-0000": {
    "id": "CO2017-chapter-10-slide-550-0000",
    "text": "BK Efficiency and Performance TP.HCM Efficiency dependent on: Disk allocation and directory algorithms Types of data kept in file's directory entry Pre-allocation or as-needed allocation of metadata structures Fixed-size or varying-size data structures Performance Keeping data and metadata close together Buffer cache - separate section of main memory for frequently used blocks Synchronous writes sometimes requested by apps or needed by Os  No buffering / caching - writes must hit disk before acknowledgement Asynchronous writes more common, buffer-able, faster Free-behind and read-ahead - techniques to optimize sequential access Reads frequently slower than writes Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018 39 2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_028.png",
      "page_index": 550,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:25:20+07:00"
    }
  },
  "CO2017-chapter-10-slide-551-0000": {
    "id": "CO2017-chapter-10-slide-551-0000",
    "text": "BK Recovery TP.HCM Consistency checking - compares data in directory structure with data blocks on disk, and tries to fix inconsistencies Can be slow and sometimes fails Use system programs to back up data from disk to another storage device (magnetic tape, other magnetic disk, optical) Recover lost file or disk by restoring data from backup Some slides from the Silberschatz, Galvin and Gagne. \"Operating System Concepts\", 10th eds, 2018. 43 2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_029.png",
      "page_index": 551,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:25:25+07:00"
    }
  },
  "CO2017-chapter-10-slide-552-0000": {
    "id": "CO2017-chapter-10-slide-552-0000",
    "text": "BK Log Structured File Systems TP.HCM Log structured (or iournaling) file systems record each metadata update to the file system as a transaction All transactions are written to a log A transaction is considered committed once it is written to the log (sequentially)  Sometimes to a separate device or section of disk  However, the file system may not yet be updated The transactions in the log are asynchronously written to the file system structures When the file system structures are modified, the transaction is removed from the log If the file system crashes, all remaining transactions in the log must still be performed Faster recovery from crash, removes chance of inconsistency of metadata Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 44 2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_030.png",
      "page_index": 552,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:25:29+07:00"
    }
  },
  "CO2017-chapter-10-slide-553-0000": {
    "id": "CO2017-chapter-10-slide-553-0000",
    "text": "BK The Apple File System TP.HCM In 2017, Apple, Inc., released a new file system to replace its 30-year-old HFS+ file system. HFS+ had been stretched to add many new features, but as usual, this process added complexity, along with lines of code, and made adding more features more difficult. Starting from scratch on a blank page allows a design to start with current technologies and methodologies and provide the exact set of features needed. Apple File System (APFS) is a good example of such a design. Its goal is to run on all current Apple devices, from the Apple Watch through the iPhone to the Mac computers. Creating a file system that works in watchOs, I/Os, tvOS, and macOS is certainly a challenge. APFS is feature-rich, including 64-bit pointers, clones for files and directories, snapshots, space sharing, fast directory sizing, atomic safe-save primitives, copy-on-write design, encryp- tion (single- and multi-key), and I/O coalescing. It understands NVM as well as HDD storage. Most of these features we've discussed, but there are a few new concepts worth exploring. Space sharing is a ZFS-like feature in which storage is avail able as one or more large free spaces (containers) from which file systems can draw allocations (allowing APFS-formatted volumes to grow and shrink)) Fast directory sizing provides quick used-space calculation and updating. Atomic safe-save is a primitive (available via API, not via file-system com- mands) that performs renames of files, bundles of files, and directories as single atomic operations. I/O coalescing is an optimization for NVM devices in which several small writes are gathered together into a large write to optimize write performance. Apple chose not to implement RAID as part of the new APFS, instead depending on the existing Apple RAID volume mechanism for software RAID. APFS is also compatible with HFS+, allowing easy conversion for existing deployments. Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 47 2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_031.png",
      "page_index": 553,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:25:37+07:00"
    }
  },
  "CO2017-chapter-10-slide-554-0000": {
    "id": "CO2017-chapter-10-slide-554-0000",
    "text": "BK Summary TP.HCM Most file systems reside on secondary storage, which is designed to hold a large amount of data permanently. The most common secondary-storage medium is the disk, but the use of NVM devices is increasing Storage devices are segmented into partitions to control media use and to allow multiple, possibly varying, file systems on a single device. These file systems are mounted onto a logical file system architecture to make them available for use. File systems are often implemented in a layered or modular structure. The lower levels deal with the physical properties of storage devices and communicating with them. Upper levels deal with symbolic file names and logical properties of files. Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 48 2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_032.png",
      "page_index": 554,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:25:41+07:00"
    }
  },
  "CO2017-chapter-10-slide-555-0000": {
    "id": "CO2017-chapter-10-slide-555-0000",
    "text": "BK Summary (Cont. TP.HCM The various files within a file system can be allocated space on the storage device in three ways: through contiguous, linked, or indexed allocation. Contiguous allocation can suffer from external fragmentation. Direct access is very inefficient with linked allocation. Indexed allocation may require substantial overhead for its index block. These algorithms can be optimized in many ways. Contiguous space can be enlarged through extents to increase flexibility and to decrease external fragmentation. Indexed allocation can be done in clusters of multiple blocks to increase throughput and to reduce the number of index entries needed. Indexing in large clusters is similar to contiguous allocation with extents. Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 49 2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_033.png",
      "page_index": 555,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:25:47+07:00"
    }
  },
  "CO2017-chapter-10-slide-556-0000": {
    "id": "CO2017-chapter-10-slide-556-0000",
    "text": "BK Summary (Cont.) TP.HCM Free-space allocation methods also influence the efficiency of disk- space use, the performance of the file system, and the reliability of secondary storage. The methods used include bit vectors and linked lists. Optimizations include grouping, counting, and the FAT, which places the linked list in one contiguous area. Directory-management routines must consider efficiency, performance, and reliability. A hash table is a commonly used method, as it is fast and efficient. Unfortunately, damage to the table or a system crash can result in inconsistency between the directory information and the disk's contents. A consistency checker can be used to repair damaged file-system structures. Operating-system backup tools allow data to be copied to magnetic tape or other storage devices, enabling the user to recover from data loss or even entire device loss due to hardware failure operating system bug, or user error. Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 50 2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_034.png",
      "page_index": 556,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:25:51+07:00"
    }
  },
  "CO2017-chapter-10-slide-557-0000": {
    "id": "CO2017-chapter-10-slide-557-0000",
    "text": "BK Summary (Cont.) TP.HCM Due to the fundamental role that file systems play in system operation, their performance and reliability are crucial. Techniques such as log structures and caching help improve performance, while log structures and RAID improve reliability. The WAFL file system is an example of optimization of performance to match a specific l/0 load. Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 51 2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_035.png",
      "page_index": 557,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:25:55+07:00"
    }
  },
  "CO2017-chapter-10-slide-558-0000": {
    "id": "CO2017-chapter-10-slide-558-0000",
    "text": "End of Chapter 1 10.B M Whatlgar OPERATING SYSTEM (OS and How loes lt Work CLEVERISM.COM Some slides from the Silberschatz, Galvin and Gagne \"Operating System Concepts\", 10th eds, 2018 2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_036.png",
      "page_index": 558,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:25:58+07:00"
    }
  },
  "CO2017-chapter-11-slide-559-0000": {
    "id": "CO2017-chapter-11-slide-559-0000",
    "text": "Chapter 11: Mass-Storage  Systems H Whatlgar OPERATING SYSTEM (OS) and How loes lt Work CLEVERISM.COM Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. Chapter 10,OS Slides, CSE-HCMUT O2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_001.png",
      "page_index": 559,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:26:01+07:00"
    }
  },
  "CO2017-chapter-11-slide-560-0000": {
    "id": "CO2017-chapter-11-slide-560-0000",
    "text": "BK Outline TP.HCM Overview of Mass Storage Structure HDD Scheduling NVM Scheduling Error Detection and Correction Storage Device Management Swap-Space Management Storage Attachment RAlD Structure Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 2 OS Slides,CSE-HCMUT O2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_002.png",
      "page_index": 560,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:26:04+07:00"
    }
  },
  "CO2017-chapter-11-slide-561-0000": {
    "id": "CO2017-chapter-11-slide-561-0000",
    "text": "BK Obiectives TP.HCM Describe the physical structure of secondary storage devices and the effect of a device's structure on its uses Explain the performance characteristics of mass-storage devices Evaluate l/O scheduling algorithms Discuss operating-system services provided for mass storage including RAID Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 3 OS Slides,CSE-HCMUT @2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_003.png",
      "page_index": 561,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:26:08+07:00"
    }
  },
  "CO2017-chapter-11-slide-562-0000": {
    "id": "CO2017-chapter-11-slide-562-0000",
    "text": "BK Overview of Mass Storage Structure TP.HCM Bulk of secondary storage for modern computers is hard disk drives (HDDs) and nonvolatile memory (NVM) devices HDDs spin platters of magnetically-coated material under moving read-write heads Disks can be removable Head crash results from disk head making contact with the disk surface That's bad Performance Drive rotation is at 60 to 250 times per second Transfer rate is rate at which data flow between drive and computer Positioning time (random-access time) is time to move disk arm to desired cylinder (seek time) and time for desired sector to rotate under the disk head (rotational latency) Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 4 OS Slides,CSE-HCMUT O2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_004.png",
      "page_index": 562,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:26:12+07:00"
    }
  },
  "CO2017-chapter-11-slide-563-0000": {
    "id": "CO2017-chapter-11-slide-563-0000",
    "text": "BK Moving-head Disk Mechanism TP.HCM track t -spindle t-armassembl sectors read-write cylinder c- head platter arm rotation Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 5 OS Slides, CSE-HCMUT C2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_005.png",
      "page_index": 563,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:26:16+07:00"
    }
  },
  "CO2017-chapter-11-slide-564-0000": {
    "id": "CO2017-chapter-11-slide-564-0000",
    "text": "BK Example of Hard Disk Drives TP.HCM Platters range from .85\" to 14\" (historically) Commonly 3.5\", 2.5\", and 1.8 Range from 30GB to 3TB per drive Performance Transfer Rate - theoretical - 6 Gb/sec  Effective Transfer Rate - real - 1Gb/sec Seek time from 3ms to 12ms (e.g., 9ms is common for desktop drives)  Average seek time is measured or calculated based on 1/3 of tracks Latency based on spindle speed 1/ (RPM / 60) = 60 /RPM  Average latency = 1/2 latency Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 6 OS Slides,CSE-HCMUT O2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_006.png",
      "page_index": 564,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:26:20+07:00"
    }
  },
  "CO2017-chapter-11-slide-565-0000": {
    "id": "CO2017-chapter-11-slide-565-0000",
    "text": "BK Hard Disk Performance TP.HCM Access Latency = Average access time = average seek time + average rotational latency For fastest disk: 3ms + 2ms = 5ms For slow disk: 9ms + 5.56ms = 14.56ms Average I/O time = average access time + (amount to transfer 1 transfer rate) + controller overhead For example, to transfer a 4KB block on a 7200 RPM disk with a 5ms average seek time, 1Gb/sec transfer rate with a 0.1ms controller overhead, the average l/O time for 4KB block is = 5ms + 4.17ms + 0.1ms + transfer time  Transfer time = 4KB / 1Gb/s = /4*8 (KB) *1000 (ms)l/ 10242 (KB) = 0.031 ms = 9.27ms + .031ms = 9.301ms Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 7 OS Slides,CSE-HCMUT @2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_007.png",
      "page_index": 565,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:26:25+07:00"
    }
  },
  "CO2017-chapter-11-slide-566-0000": {
    "id": "CO2017-chapter-11-slide-566-0000",
    "text": "BK Address Mapping TP.HCM Disk drives are addressed as large 1-dimensional arrays of logical b/ocks, where the logical block is the smallest unit of transfer Low-level formatting creates logical blocks on physical media The 1-dimensional array of logical blocks is mapped into the sectors of the disk sequentially Sector 0 is the first sector of the first track on the outermost cylinder Mapping proceeds in order through that track, then the rest of the tracks in that cylinder, and then through the rest of the cylinders from outermost to innermost Logical to physical address should be easy Except for bad sectors Non-constant # of sectors per track via constant angular velocity Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 15 OS Slides,CSE-HCMUT O2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_008.png",
      "page_index": 566,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:26:29+07:00"
    }
  },
  "CO2017-chapter-11-slide-567-0000": {
    "id": "CO2017-chapter-11-slide-567-0000",
    "text": "BK HDD Scheduling TP.HCM The operating system is responsible for using hardware efficiently - for the disk drives, this means having a fast access time and disk bandwidth Seek time  seek distance Disk bandwidth is the total number of bytes transferred, divided by the total time between the first request for service and the completion of the last transfer Minimize seek time Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 16 OS Slides,CSE-HCMUT O2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_009.png",
      "page_index": 567,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:26:32+07:00"
    }
  },
  "CO2017-chapter-11-slide-568-0000": {
    "id": "CO2017-chapter-11-slide-568-0000",
    "text": "BK Disk Scheduling (Cont.) TP.HCM There are many sources of disk l/O request OS System processes Users processes I/O request includes input or output mode, disk address, memory address, number of sectors to transfer OS maintains queue of requests, per disk or device Idle disk can immediately work on l/O request, busy disk means work must queue Optimization algorithms only make sense when a queue exists In the past, operating system responsible for queue management, disk drive head scheduling Now, built into the storage devices, controllers Just provide LBAs, handle sorting of requests Some slides from the Silberschatz, Galvin and Gagne \"Operating System Concepts\", 10th eds, 2018. 17 OS Slides,CSE-HCMUT O2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_010.png",
      "page_index": 568,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:26:37+07:00"
    }
  },
  "CO2017-chapter-11-slide-569-0000": {
    "id": "CO2017-chapter-11-slide-569-0000",
    "text": "BK Disk Scheduling (Cont.) TP.HCM Note that drive controllers have small buffers and can manage a queue of I/O requests (of varying \"depth\") Several algorithms exist to schedule the servicing of disk I/O requests The analysis is true for one or many platters E.g., We illustrate scheduling algorithms with a request queue (0- 199) 98, 183, 37, 122, 14, 124, 65, 67 Head pointer -> 53 Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 18 OS Slides,CSE-HCMUT O2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_011.png",
      "page_index": 569,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:26:41+07:00"
    }
  },
  "CO2017-chapter-11-slide-570-0000": {
    "id": "CO2017-chapter-11-slide-570-0000",
    "text": "BK First Come First Served (FCFS) TP.HCM Illustration shows total head movement of 640 cylinders queue = 98, 183, 37, 122, 14, 124, 65, 67 head starts at 53 0 14 37 536567 98 122124 183199 Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 19 OS Slides,CSE-HCMUT C2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_012.png",
      "page_index": 570,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:26:45+07:00"
    }
  },
  "CO2017-chapter-11-slide-571-0000": {
    "id": "CO2017-chapter-11-slide-571-0000",
    "text": "BK SCAN TP.HCM The disk arm starts at one end of the disk, and moves toward the other end, servicing requests until it gets to the other end of the disk where the head movement is reversed and servicing continues. SCAN algorithm sometimes called the elevator algorithm But note that if requests are uniformly dense, largest density at other end of disk and those wait the longest Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 20 OS Slides,CSE-HCMUT O2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_013.png",
      "page_index": 571,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:26:48+07:00"
    }
  },
  "CO2017-chapter-11-slide-572-0000": {
    "id": "CO2017-chapter-11-slide-572-0000",
    "text": "BK SCAN (Cont.) TP.HCM Illustration shows total head movement of 208 cylinders queue = 98,183, 37, 122, 14, 124, 65, 67 head starts at 53 0 14 37 536567 98 122124 183199 Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 21 OS Slides,CSE-HCMUT C2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_014.png",
      "page_index": 572,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:26:52+07:00"
    }
  },
  "CO2017-chapter-11-slide-573-0000": {
    "id": "CO2017-chapter-11-slide-573-0000",
    "text": "BK C-SCAN TP.HCM Provides a more uniform wait time than SCAN The head moves from one end of the disk to the other, servicing requests as it goes When it reaches the other end, however, it immediately returns to the beginning of the disk, without servicing any requests on the return trip Treats the cylinders as a circular list that wraps around from the last cylinder to the first one Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 22 OS Slides,CSE-HCMUT O2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_015.png",
      "page_index": 573,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:26:56+07:00"
    }
  },
  "CO2017-chapter-11-slide-574-0000": {
    "id": "CO2017-chapter-11-slide-574-0000",
    "text": "BK C-SCAN (Cont.) TP.HCM Total number of cylinders? queue = 98, 183, 37, 122, 14, 124, 65, 67 head starts at 53 0 14 37 53 65 67 98 122124 183199 Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 23 OS Slides,CSE-HCMUT C2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_016.png",
      "page_index": 574,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:26:59+07:00"
    }
  },
  "CO2017-chapter-11-slide-575-0000": {
    "id": "CO2017-chapter-11-slide-575-0000",
    "text": "BK Selecting a Disk-Scheduling Algorithm TP.HCM FCFS is common and has a natural appeal sCAN and C-sCAN perform better for systems that place a heavy load on the disk (less starvation, but still possible) To avoid starvation Linux implements deadline scheduler Maintains separate read and write queues, gives read priority  Because processes more likely to block on read than write Implements four queues: 2 x read and 2 x write  1 read and 1 write queue sorted in LBA order, (implementing C-SCAN)  1 read and 1 write queue sorted in FCFS order  All I/O requests sent in batch sorted in that queue's order  After each batch, checks if any requests in FCFS older than configured age (default 500ms) If so, LBA queue containing that request is selected for next batch of I/O In RHEL 7, NOOP and completely fair queueing scheduler (CFQ) are also available, defaults vary by storage device Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 24 OS Slides,CSE-HCMUT O2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_017.png",
      "page_index": 575,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:27:05+07:00"
    }
  },
  "CO2017-chapter-11-slide-576-0000": {
    "id": "CO2017-chapter-11-slide-576-0000",
    "text": "BK NVM Scheduling TP.HCM No disk heads or rotational latency but still room for optimization In RHEL 7, NOOP (no scheduling) is used but adiacent LBA requests are combined NVM best at random I/O, HDD at sequential Throughput can be similar Input/Output operations per second (IOPS) much higher with NVM (hundreds of thousands vs hundreds) But write amplification (one write, causing garbage collection and many read/writes) can decrease the performance advantage Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 25 OS Slides,CSE-HCMUT O2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_018.png",
      "page_index": 576,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:27:09+07:00"
    }
  },
  "CO2017-chapter-11-slide-577-0000": {
    "id": "CO2017-chapter-11-slide-577-0000",
    "text": "BK Error Detection and Correction TP.HCM Fundamental aspect of many parts of computing (memory networking, storage) Error detection determines if there a problem has occurred (for example a bit flipping) If detected, can halt the operation Detection frequently done via parity bit Parity - one form of checksum - uses modular arithmetic to compute store, compare values of fixed-length words Another error-detection method common in networking is Cyclic Redundancy Check (CRC) which uses hash function to detect multiple-bit errors Error-correction code (Ecc) not only detects, but can correct some errors Soft errors correctable, hard errors detected but not corrected Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 26 OS Slides,CSE-HCMUT O2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_019.png",
      "page_index": 577,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:27:13+07:00"
    }
  },
  "CO2017-chapter-11-slide-578-0000": {
    "id": "CO2017-chapter-11-slide-578-0000",
    "text": "BK Storage Attachment TP.HCM Computers access storage in three ways host-attached network-attached cloud Host attached access through local I/O ports, using one of several technologies To attach many devices, use storage busses such as USB, firewire thunderbolt High-end systems use fibre channel (FC) High-speed serial architecture using fibre or copper cables Multiple hosts and storage devices can connect to the FC fabric Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 31 OS Slides,CSE-HCMUT O2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_020.png",
      "page_index": 578,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:27:17+07:00"
    }
  },
  "CO2017-chapter-11-slide-579-0000": {
    "id": "CO2017-chapter-11-slide-579-0000",
    "text": "Network-Attached Storage BK TP.HCM Network-attached storage (NAs) is storage made available over a network rather than over a local connection (such as a bus) Remotely attaching to file systems NFS and CIFS are common protocols Implemented via remote procedure calls (RPCs) between host and storage over typically TCP or UDP on IP network iSCsI protocol uses IP network to carry the SCSI protocol Remotely attaching to devices (blocks) client NAS client LANZWAN NAS client Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 32 OS Slides,CSE-HCMUT @2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_021.png",
      "page_index": 579,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:27:21+07:00"
    }
  },
  "CO2017-chapter-11-slide-580-0000": {
    "id": "CO2017-chapter-11-slide-580-0000",
    "text": "BK Cloud Storage TP.HCM Similar to NAS, provides access to storage across a network Unlike NAS, accessed over the Internet or a WAN to remote data center NAS presented as just another file system, while cloud storage is API based, with programs using the APIs to provide access Examples include Dropbox, Amazon S3, Microsoft OneDrive, Apple iCloud Use APIs because of latency and failure scenarios (NAS protocols wouldn't work well) Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 33 OS Slides,CSE-HCMUT O2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_022.png",
      "page_index": 580,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:27:25+07:00"
    }
  },
  "CO2017-chapter-11-slide-581-0000": {
    "id": "CO2017-chapter-11-slide-581-0000",
    "text": "BK Storage Array TP.HCM Can just attach disks, or arrays of disks Avoids the NAS drawback of using network bandwidth Storage Array has controller(s), provides features to attached host(s Ports to connect hosts to array Memory, controlling software (sometimes NVRAM, etc) A few to thousands of disks RAiD, hot spares, hot swap (discussed later Shared storage -> more efficiency Features found in some file systems Snaphots, clones, thin provisioning, replication, deduplication, etc Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 34 OS Slides,CSE-HCMUT O2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_023.png",
      "page_index": 581,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:27:29+07:00"
    }
  },
  "CO2017-chapter-11-slide-582-0000": {
    "id": "CO2017-chapter-11-slide-582-0000",
    "text": "BK RAlD Structure TP.HCM RAiD - redundant array of inexpensive disks multiple disk drives provides reliability via redundancy Increases the mean time to failure Mean time to repair - exposure time when another failure could cause data loss Mean time to data loss based on above factors If mirrored disks fail independently, consider disk with 1300,000 mean time to failure and 10 hour mean time to repair Mean time to data loss is 100, 0002/ (2 * 10) = 500 * 106 hours, or 57,000 years! Frequently combined with NVRAM to improve write performance Several improvements in disk-use techniques involve the use of multiple disks working cooperatively Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 37 OS Slides,CSE-HCMUT O2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_024.png",
      "page_index": 582,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:27:33+07:00"
    }
  },
  "CO2017-chapter-11-slide-583-0000": {
    "id": "CO2017-chapter-11-slide-583-0000",
    "text": "BK RAlD (Cont.) TP.HCM Disk striping uses a group of disks as one storage unit RAlD is arranged into six different levels RAlD schemes improve performance and improve the reliability of the storage system by storing redundant data Mirroring or shadowing (RAID 1) keeps duplicate of each disk Striped mirrors (RAID 1+0) or mirrored stripes (RAID 0+1) provides high performance and high reliability Block interleaved parity (RAID 4, 5, 6) uses much less redundancy RAlD within a storage array can still fail if the array fails, so automatic replication of the data between arrays is common Frequently, a small number of hot-spare disks are left unallocated, automatically replacing a failed disk and having data rebuilt onto them Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 38 OS Slides,CSE-HCMUT O2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_025.png",
      "page_index": 583,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:27:38+07:00"
    }
  },
  "CO2017-chapter-11-slide-584-0000": {
    "id": "CO2017-chapter-11-slide-584-0000",
    "text": "BK Traditional and Pooled Storage TP.HCM FS FS FS volume volume volume a) Traditional volumes and file systems ZFS ZFS ZFS storagepool (b) ZFS and pooled storage Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 43 OS Slides, CSE-HCMUT C2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_026.png",
      "page_index": 584,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:27:42+07:00"
    }
  },
  "CO2017-chapter-11-slide-585-0000": {
    "id": "CO2017-chapter-11-slide-585-0000",
    "text": "BK Object Storage TP.HCM General-purpose computing, file systems Object storage not sufficient for very large scale management software like Hadoop file system Another approach - start with a storage (HDFS) and Ceph pool and place objects in it determine where to store objects, manages Object just a container of data protection No way to navigate the pool to find objects (no directory structures, few Typically by storing N services) copies, across N systems, in the object Computer-oriented, not user-oriented storage cluster Typical sequence Horizontally scalable Create an object within the pool, receive Content addressable an object ID unstructured Access object via that ID Delete object via that ID Some slides from the Silberschatz, Galvin and Gagne \"Operating System Concepts\", 10th eds, 2018. 44 OS Slides,CSE-HCMUT O2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_027.png",
      "page_index": 585,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:27:48+07:00"
    }
  },
  "CO2017-chapter-11-slide-586-0000": {
    "id": "CO2017-chapter-11-slide-586-0000",
    "text": "BK Summary TP.HCM Hard disk drives and nonvolatile memory devices are themajor secondary storage l/O units on most computers. Modern secondary storage is structured as large one-dimensional arrays of logical blocks. Drives of either type may be attached to a computer system in one of three ways: (1) through the local l/O ports on the host computer, (2) directly connected to motherboards, or (3) through a communications network or storage network connection. Requests for secondary storage l/O are generated by the file system and by the virtual memory system. Each request specifies the address on the device to be referenced in the form of a logical block number. Some slides from the Silberschatz, Galvin and Gagne \"Operating System Concepts\", 10th eds, 2018. 45 OS Slides,CSE-HCMUT O2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_028.png",
      "page_index": 586,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:27:53+07:00"
    }
  },
  "CO2017-chapter-11-slide-587-0000": {
    "id": "CO2017-chapter-11-slide-587-0000",
    "text": "BK Summary (Cont.) TP.HCM Disk-scheduling algorithms can improve the effective bandwidth of HDDs, the average response time, and the variance in response time. Algorithms such as SCAN and C-SCAN are designed to make such improvements through strategies for disk-queue ordering. Performance of disks cheduling algorithms can vary greatly on hard disks. In contrast, because solid-state disks have no moving parts, performance varies little among scheduling algorithms, and quite often a simple FCFS strategy is used. Data storage and transmission are complex and freguently result in errors. Error detection attempts to spot such problems to alert the system for corrective action and to avoid error propagation. Error correction can detect and repair problems, depending on the amount of correction data available and the amount of data that was corrupted Some slides from the Silberschatz, Galvin and Gagne \"Operating System Concepts\", 10th eds, 2018. 46 OS Slides,CSE-HCMUT O2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_029.png",
      "page_index": 587,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:27:59+07:00"
    }
  },
  "CO2017-chapter-11-slide-588-0000": {
    "id": "CO2017-chapter-11-slide-588-0000",
    "text": "BK Summary (Cont.) TP.HCM Storage devices are partitioned into one or more chunks of space. Each partition can hold a volume or be part of a multidevice volume. File systems are created in volumes. The operating system manages the storage device's blocks. New devices typically come pre-formatted. The device is partitioned, file systems are created, and boot blocks are allocated to store the system's bootstrap program if the device will contain an operating system. Finally, when a block or page is corrupted, the system must have a way to lock out that block or to replace it logically with a spare. An efficient swap space is a key to good performance in some systems. Some systems dedicate a raw partition to swap space, and others use a file within the file system instead. Still other systems allow the user or system administrator to make the decision by providing both options Some slides from the Silberschatz, Galvin and Gagne \"Operating System Concepts\", 10th eds, 2018. 47 OS Slides,CSE-HCMUT O2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_030.png",
      "page_index": 588,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:28:05+07:00"
    }
  },
  "CO2017-chapter-11-slide-589-0000": {
    "id": "CO2017-chapter-11-slide-589-0000",
    "text": "BK Summary (Cont.) TP.HCM Because of the amount of storage required on large systems, and because storage devices fail in various ways, secondary storage devices are frequently made redundant via RAiD algorithms. These algorithms allow more than one drive to be used for a given operation and allow continued operation and even automatic recovery in the face of a drive failure. RAlD algorithms are organized into different levels; each level provides some combination of reliability and high transfer rates. Object storage is used for big data problems such as indexing the Internet and cloud photo storage. Objects are self-defining collections of data, addressed by object ID rather than file name. Typically it uses replication for data protection, computes based on the data on systems where a copy of the data exists, and is horizontally scalable for vast capacity and easy expansion. Some slides from the Silberschatz, Galvin and Gagne \"Operating System Concepts\", 10th eds, 2018. 48 OS Slides,CSE-HCMUT @2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_031.png",
      "page_index": 589,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:28:11+07:00"
    }
  },
  "CO2017-chapter-11-slide-590-0000": {
    "id": "CO2017-chapter-11-slide-590-0000",
    "text": "End of Chapter 11 M What lar OPERATING SYSTEM (OS) and How Does lt Work CLEVERISM.COM Some slides from the Silberschatz, Galvin and Gagne. \"Operating System Concepts\", 10th eds, 2018. Chapter 10,OS Slides, CSE-HCMUT O2022",
    "metadata": {
      "doc_type": "slide",
      "course_id": "CO2017",
      "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_032.png",
      "page_index": 590,
      "language": "en",
      "ocr_engine": "PaddleOCR 3.2",
      "extractor_version": "1.0.0",
      "timestamp": "2025-10-31T12:28:15+07:00"
    }
  }
}