Our two exam dates are scheduled as follows:
FINAL EXAM:
OPEN BOOK, OPEN NOTES; NO COMPUTERS, ETC.
CALCULATORS OKAY (NO CHEATING!)
Comprehensive coverage:
Chapters 1-10, 12, Appendix A
(also Midterm Exam)
Synchronization, Semaphores (binary/counting)
Interprocess Communication (IPC)
Shared memory, atomicity, message passing
Sockets
Serializing sockets in Java
Marshalling parameters
Networks, OSI Reference Model
Starvation, Deadlock
Memory Management
Relocatable code, Dynamic Loading/Linking
Swapping
Contiguous/Noncontiguous memory allocation
Allocation algorithms
Fragmentation (external vs. internal)
Address translation
Translation Lookaside buffer (TLB)
Effective Memory-Access Time (EMAT)
Paging
Segmentation
Virtual Memory
Demand paging, pre-paging
Page faults, Thrashing
Page Replacement Algorithms
Principle of Locality!
File Management
Files, Filesystems
Disk Space Allocation (Contiguous/Clustered)
FAT, Unix inodes, Multilevel Indexing
I/O System
Disk access time (seek time + rotational lat.)
Buffering, Caching
Disk I/O Scheduling Algorithms
| Instructor: | David Goldschmidt, Ph.D. |
|---|---|
| Office Hours: | after class |
| Email: | click here to email me |
| TA: | Jing Fu |
|---|---|
| Office Hours: | Wed 8:30-10:30am & Thurs 10:00am-12:00pm (in AE 217) |
| Email: | fuj@cs.rpi.edu |
| TA: | Li Zhang (Emma) |
|---|---|
| Office Hours: | Mon & Thurs 11:30am-1:30pm (in AE 217) |
| Email: | emma.lzhang@gmail.com |
int main()
{
int x = 5;
pid_t pid = fork();
printf("FORKING....\n");
if ( pid == 0 ) {
printf("CHILD: Hello.\n");
x *= 5;
printf("CHILD: %d\n", x);
}
else {
wait(NULL);
printf("PARENT: Child completed.\n");
x *= 5;
printf("PARENT: %d\n", x);
}
}
Process Arrival time CPU burst time ----------------------------------------- P1 0 ms 10 ms P2 7 ms 17 ms P3 6 ms 9 ms P4 11 ms 4 ms
wait(S)
{
while ( S <= 0 )
/** no-op **/ ;
S--;
}
signal(S)
{
S++;
}
1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6If memory access time is 100 nanoseconds and page-fault service time is 5 milliseconds, what is the total memory access time for each of the above page replacement algorithms? Of the three page replacement algorithms considered here, which one is the best? And which one is impossible to implement exactly?
public static void main(String[] args)
{
int[] x = new int[100];
int[] r = new int[100];
boolean done = false;
while ( done == false )
{
int q = 47895;
int index = q % 100;
if ( x[ index ] == q )
{
System.out.println( "==> " + r[ index ] + " (cache hit!)" );
done = true;
}
else
{
int result = q / 100; // integer division
System.out.println( "==> " + result );
x[ index ] = q;
r[ index ] = result;
}
}
}