Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 2INC0 Operating Systems practical (part 1) Joris Geurts.

Similar presentations


Presentation on theme: "1 2INC0 Operating Systems practical (part 1) Joris Geurts."— Presentation transcript:

1 1 2INC0 Operating Systems practical (part 1) Joris Geurts

2 2

3 staff Tanir Ozcelebi (lectures) Joris Geurts (instruction,practical) Serdar Guclu (instruction,practical) Mike Holenderski (instruction,practical) Theo Huberts (instruction,practical) Mitchel Brunings (student assistant) Swati Kumar (student assistant) 3

4 practical 3 graded practical assignments (C programming in Linux) OS theory exercises with graded homework Linux introduction C workshop exercises 4

5 grading of 3 Linux-C assignments 8 = fully satisfies requirements o clean code o no deadlock/busy waiting/race conditions o tests OK o documentation o … higher mark: with your investigations strict deadlines (see Peach)

6 way of working Linux-C assignments practical = saves time prepare your questions use XXX_basics.c make small steps

7 schedule practical* weekTue afternoon (5+6)Thu morning (1+2) 1Linux, C helloworldC pointers 2explain assignment 1C structs + memory alloc 3C arraysC strings 4explain assignment 2C bit operations 5 6explain assignment 3 7 * schedule of lectures: will be explained Tue 7+8

8 8 What is Linux?

9 9 characteristics developed in 1970's by Ritchie and Thomson multi user multi tasking

10 10 advantages different hardware: IBM, Mips, Intel, ARM simple structure elaborate software tooling command interpreter: the SHELL principles applied in a consequent way

11 11 disadvantages cryptic names, e.g.: cat filename cryptic syntax: \ / * $ " ' ` ~ e.g.: grep "*.$1" `pick *.c` | lpr many members of the family, and they differ (Debian, Red Hat, Ubuntu, OpenSuse, Fedora, etc.)

12 12 Unix family tree

13 13 Some Unix characteristics ‘Everything is a file’ –including screen, mouse, hard disk etc. All (system) commands are just applications –including login procedure, file and directory management, –large and powerful set of commands The central role of the shell (command interpreter) –typing rather than clicking Built-in management of different users –multi-tasking and multi-user

14 14 Linux take-off

15 Linux family tree 15

16 16 Linux distributions (600+) kernel + libraries + software applications

17 Linux desktop environments 17 GNOME KDE Unity

18 Using Linux: virtualization VMware Linux Ubuntu image 18

19 commands in a shell interaction with the OS, e.g.: ls date whoami cal 19

20 20 Command summary Commands (find out their functionality) –ls –mkdir, cp, mv, which, chmod, echo, grep, pwd, cat, ps –man input/output redirect –ls > file –command1 | command2 | command3 –cat /etc/passwd | sort | less –less /etc/passwd editors –kate, gedit, vi

21 21 Practical assignments (shell) Startup and login to the system –Username: student Password: student Create a directory in –Your home directory (/home/student/) –The temporary directory (/tmp/) –The root directory (/) Copy the password file to your home directory Search where the ls binary is located –Determine its owner and permissions –Record this information in a file Do a tutorial Install Dropbox (via Software Center)

22 C programming language Language of the Linux kernel and many of the applications (see lxr.linux.no)lxr.linux.no Low-level –No memory protection –No garbage collection –No decent string type –Direct memory pointer manipulation High execution performance possible –At the cost of a longer development time 22

23 importance of C 23 source: www.langpop.comwww.langpop.com

24 24 Hello World compile and run $ gcc -o helloworld helloworld.c $./helloworld printf int i = 73; printf ("Hello World\n"); printf ("decimal display: %d\n", i); printf ("hexadecimal display: %04x\n", i); debugger…

25 25 Debugging with nemiver sudo apt-get install nemiver (only once; already done) gcc -g –o myapp myapp.c nemiver myapp & –set breakpoints –run, step, etc. –inspect variables

26 Today install Linux do a Linux tutorial run helloworld.c do C workshop exercises for week 1a


Download ppt "1 2INC0 Operating Systems practical (part 1) Joris Geurts."

Similar presentations


Ads by Google