yes to both questions.
Sit
"Yiu Fai Sit" <yf...@cs.utexas.edu> wrote in message
news:d54koa$j60$1...@news.cs.utexas.edu...
Sit
Otherwise an error would be thrown when bufferCache tries to set the pin
for those four blocks.
Thanks,
Powei Feng
Sit
Sit
private boolean readBlockReq( int devNum, int block, OSEvent ev )
{
Dbg.ASSERT( !sync );
MemPage page = this.bufferCache.readAsync( devNum, block, ev );
if ( page != null )
return true;
else
return false;
}
I'm still confused about how we get access to a page if it IS in the cache.
readAsync() returns the page. But readBlockReq doesn't store it anywhere. If
the page was NOT in the cache, readAsync would store it in OSEvent.
"Yiu Fai Sit" <yf...@cs.utexas.edu> wrote in message
news:d5g4v3$qs2$1...@news.cs.utexas.edu...
"Mohnish Rao" <mohni...@hotmail.com> wrote in message
news:d5jpuo$7bu$1...@news.cs.utexas.edu...
Sit
Thanks,
Sidd.
"Yiu Fai Sit" <yf...@cs.utexas.edu> wrote in message
news:d54koa$j60$1...@news.cs.utexas.edu...
When you request the block to be swapped in, you mark the page as
io_pending, right? So if a process tries to read from an io_pending page
you need to block it until the page is done swapping in.
Phong
BC.readAsync returns a null if there was a cache miss. VFS needs to
block the process when this happens. Since the event you passed to BC
contains the SYSCALL type, BD will enqueue an interrupt when it reads.
OS will examine this interrupt after the appropriate delay and call the
callback for the SYSCALL type. The callback should unblock the process.
Compare readAsync and writeCallback to understand how they did the blocking.
-- Chris
After isolating the problem, I found that the error is thrown by this line
of code:
ev.put("MemPage", page);
Can someone point me some possible reasons for it?
Thanks in advance