Lecture # 01 Introduction To System Programming
Lecture # 01 Introduction To System Programming
Lecture # 01
Introduction to System Programming
● Resources
getchar()
Program
Scanner putchar()
Speaker
USB Stick
Ethernet
int main()
{
int c;
while ((c = getchar()) != EOF)
putchar(c);
return 0;
}
P9 P2
P11 P1
P10
P8 P3
Scanner
P4
Speaker P5
P7
P6
USB Stick
Ethernet
Lots of users
Lots and lots of programs
Lots of disk files
Lots of devices
Lots and lots and lots of connections
Who is managing all these resources and connecting various devices to correct programs
P9 P2
P11 P1
P10
P8 P3
Scanner
P4
Speaker P5
P7
P6
USB Stick
P9 P2
P11 P1
P10
P8 P3
Scanner
P4
Speaker P5
P7
P6
USB Stick
Kernel Hardware
Addis Ababa Science & Technology University (AASTU) 9
System Programmer Perspective
● A system programmer write programs that may have to
acquire data
● from a file(s) (residing on a local or remote disc) that may
have been opened by some other user(s),
● from other programs running on the same or different
machine,
● from the operating system itself.
User Mode
Kernel Mode
System call Service routine Trap Handler 5
SYS_read() system_call:
{ ---
–-- ---
–-- --- 3
return error
} 4