EO-253 – Operating Systems
Instructor: Vinod Ganapathy
IISc
Slide credits: David Mazieres (Stanford University)
1 / 33
EO-253 Operating Systems Instructor: Vinod Ganapathy IISc Slide - - PowerPoint PPT Presentation
EO-253 Operating Systems Instructor: Vinod Ganapathy IISc Slide credits: David Mazieres (Stanford University) 1 / 33 Outline Administrivia 1 2 Substance 2 / 33 Administrivia Class web page:
IISc
1 / 33
1
2 Substance
2 / 33
http://www.csa.iisc.ac.in/~vg/teaching/E0-253
3 / 33
4 / 33
5 / 33
6 / 33
7 / 33
8 / 33
Stackoverflow)
9 / 33
1
2 Substance
10 / 33
applications
11 / 33
12 / 33
13 / 33
etc.) run another process
14 / 33
etc.) run another process
14 / 33
15 / 33
15 / 33
16 / 33
user kernel
17 / 33
18 / 33
19 / 33
20 / 33
21 / 33
→ “initfile: No such file or directory”
22 / 33
⊲ Returns previous file offset, or -1 on error
23 / 33
24 / 33
void typefile (char *filename) { int fd, nread; char buf[1024]; fd = open (filename, O_RDONLY); if (fd == -1) { perror (filename); return; } while ((nread = read (fd, buf, sizeof (buf))) > 0) write (1, buf, nread); close (fd); }
25 / 33
26 / 33
27 / 33
28 / 33
29 / 33
int main() { while(1) fork(); }
29 / 33
memory
30 / 33
e.g., to handle system call in same address space
(e.g., bring a page in from disk only when accessed)
31 / 33
32 / 33
usually looks like one big fast memory
same process
next process
33 / 33