1
00:00:00,000 --> 00:00:05,005
(bright music)

2
00:00:05,005 --> 00:00:07,000
- [Instructor] Got some good challenges

3
00:00:07,000 --> 00:00:10,008
for you about the Linux kernel source code.

4
00:00:10,008 --> 00:00:15,000
So first of all, go get some Linux kernel source code

5
00:00:15,000 --> 00:00:18,000
from, maybe kernel.org, or from your distro.

6
00:00:18,000 --> 00:00:20,001
You might need to do a little bit of web searching

7
00:00:20,001 --> 00:00:22,002
to figure that out or get the one

8
00:00:22,002 --> 00:00:25,008
from Ubuntu that we talked about.

9
00:00:25,008 --> 00:00:29,005
Once you get that, if you got a tarball, expand that,

10
00:00:29,005 --> 00:00:33,003
then do a make cscope and do a make tags.

11
00:00:33,003 --> 00:00:37,008
You might have to install certain packages for that.

12
00:00:37,008 --> 00:00:40,005
So that might take you a little while.

13
00:00:40,005 --> 00:00:41,006
But once you get that all done,

14
00:00:41,006 --> 00:00:43,008
then you could do some searching.

15
00:00:43,008 --> 00:00:49,008
So find the source for the right zero function,

16
00:00:49,008 --> 00:00:54,000
the right function for the device file dev zero.

17
00:00:54,000 --> 00:00:57,000
And then similarly, find the source

18
00:00:57,000 --> 00:01:00,005
for the read zero function and look at the function,

19
00:01:00,005 --> 00:01:03,005
see what you can figure out.

20
00:01:03,005 --> 00:01:05,007
So there's a loop there filling in

21
00:01:05,007 --> 00:01:09,002
the user's buffer with null bytes.

22
00:01:09,002 --> 00:01:12,008
See if you can figure out will that run until it's done

23
00:01:12,008 --> 00:01:16,003
or will it, for example, return

24
00:01:16,003 --> 00:01:19,006
if there's a signal sent to the process

25
00:01:19,006 --> 00:01:21,006
that's doing the read,

26
00:01:21,006 --> 00:01:25,006
or what if the process uses up its time slice?

27
00:01:25,006 --> 00:01:27,001
See if you can figure that out.

28
00:01:27,001 --> 00:01:29,000
Alright, good luck.

