Discussion7 - 10/24/2010 COP4600 Discussion 7 Assignment 3...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
10/24/2010 1 COP4600 Discussion 7 Assignment 3 TA: Huafeng Jin hj0@cise.ufl.edu Assignment3 is posted on Sakai Reminder Scheduling First-come First-served (FCFS) Round-robin Priority-based Semaphore vs. Monitor (Monitor: abstract data type) Virtual Memory Virtual-Physical Address Mapping (Inverted page table) Page Replacement Algorithms WSClock (others: NRU, FIFO, LRU, Working Set…) Discussion 6 Recap Tau = 500 , current time = 2204 Now, we would like to replace a page using WSClock algorithm, which page would be evicted? What is the state after replacement? Question-1 Page frame: (1502, R = 0, M = 0) will be replaced. Question-1 For the mapping given below, give virtual address = 22400 , what is the page size? What is the offset? What is the physical address? Question-2
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
10/24/2010 2 Page size = 4K = 2 12 = 4096 22400 belongs to page 5 (20K-24K) Page 5 maps to page frame 3 (12K-16K) Offset = 22400%4K = 22400%4096 = 1920 Physical Address = 12K + 1920 = 14208 Question-2 Assignment 3 C Version Description IPC in C Semaphore in C Java Version Description Page Replacement Algorithms Second Chance NRU Aging Outline Assignment 3 C Version Description IPC in C Semaphore in C Java Version Description Page Replacement Algorithms Second Chance NRU Aging Outline Using IPC (interprocess communication) to implement a Producer-Consumer problem using semaphore One shared buffer with size 1 Two processes (NOT threads) One producer One consumer Three Semaphores mutex full empty C Version Description IPC (Interprocess Communication) Exchanging data among multiple processes. Remember: Threads communicate via shared data segment. Processes DON’T share variables. IPC #include <stdio.h> #include <pthread.h> void *increment(); int count = 0; /*count is shared between two threads*/ main(){ pthread_t t1, t2; pthread_create(&t1, NULL, increment, NULL); pthread_create(&t2, NULL, increment, NULL);
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/15/2012 for the course COP 4600 taught by Professor Yavuz-kahveci during the Spring '07 term at University of Florida.

Page1 / 7

Discussion7 - 10/24/2010 COP4600 Discussion 7 Assignment 3...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online