Download presentation
Presentation is loading. Please wait.
Published byJasmin Gibbs Modified over 9 years ago
1
Geoffrey Trujillo CSE 430
2
POSIX system calls do not handle concurrency well Only one system call can be guaranteed to execute atomically System cannot remain consistent when multiple system calls are made No simple implementation can be made with locks
3
Time-of-check-to-time-of-use Securty risk Race condition Consistency of file system Updates Installations
4
Easier to use than locking mechanism Eliminate race condition Time-of-check-to-time-of-use Able to maintain consistency Use of concurrent application Software installation Software update Isolated from system until commit
5
Commands sys_xbegin, sys_xend, sys_xabort Use sys_xbegin(); ▪ //stuff sys_xend();
6
if ( access (‘foo’) { symlin(‘secret’, ‘foo’); fd = open(‘foo’); write(fd); }
7
sys_xbegin(); if ( access (‘foo’) { symlink(‘secret’, ‘foo’); fd = open(‘foo’); write(fd); } sys_xend(); symlink(‘secret’, ‘foo’);
8
sys_xbegin(); //installor //update sys_xend(); Will have comlete install or update else will have original system
9
Broken into two segments Header The stable part that holds the pointer to data Data The part the hold the private copy of the data in the system header Data
10
Header Data Private Copy Lock
11
Header Data
12
SubsystemTotal SupportPartial SupportExample Credential341Getuid, getcpu Processes133Fork, exit, exec Communication150pipe File system614Link, access, open other136Time, nanosleep Total14 SubsystemTotal SupportPartial SupportExample
13
SubSytemTotalExamples Processes33Nice, uselib Memory15Madvise Filesystem31Mount, sync Communication14Tee, select Timers8Socket, ipc Admin12Alarm Misc22Swapon, reboot 18Futex, times
14
500,000 renames
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.