Question: Suppose that the File Descriptor Table (FDT), System File Table (SFT) and in-memory inode tables are as follows after a process A just starts. Process

Suppose that the File Descriptor Table (FDT), System File Table (SFT) and in-memory inode tables are as follows after a process A just starts. Process A's FDT System File Table inode table STDIN STDOUT STDERR Input Output Error output Suppose that a data file "mydatafile.txt" contains "1234567890", and file operations incur no error. Show the resulting FDT, SFT and inode table after the following code of process A is executed. Also, discuss what are the possible outputs. Code a): int fd,; char buf [5] WXYZ"; fd open ("mydatafile.txt", O RDONLY) ; fork ) read (fd, buf, 1); read (fd, buf+1, 1) print f ("%c%c ", bu f [0], buf[1]); Code b) int fd,; char buf [5] - "WXYZ"; fork ) fd open ("mydatafile.txt", O RDONLY) ; read (fd, buf, 1); read (fd, buf+1, 1) printf ("8c8cln", buf[0,buf[1])
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
