免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 960 | 回复: 0
打印 上一主题 下一主题

Linux应用技术新动向 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-09-20 19:04 |只看该作者 |倒序浏览

                                Linux Training: Train With The Experts
The Linux Foundation Training Program is for the community, by the
community, and features instructors and content straight from the
leaders of the Linux developer community.
Attendees receive Linux training that is vendor-neutral, technically
advanced and created with the actual leaders of the Linux development
community themselves. The Linux Foundation Linux training courses give
attendees the broad, foundational knowledge and networking needed to
thrive in their careers today. With either online or in person
training, the Linux Foundation classes can keep you or your developers
ahead of the curve on Linux essentials.
LESSON 1 Creating Applications For Linux


Course Description
This course is designed to bring C developers up to speed with a
variety of tools and capabilities of Linux. This includes development
and debugging tools as well as system and library functions. The intent
is to provide background that will be of general interest to all Linux
based developers. Students should be prepared for a some lengthy
programming exercises.
What You Will Learn
1. Linux Development
  • Objectives and format
  • Course overview

2. Overview Of Linux Programming
  • Linux kernel overview
  • System calls and library routines

Lab Exercises
  • Use perror()
  • Examine and use errno.
  • Experiment with different errors from open()
  • Trace errors within library functions

3. Programs In Pieces
  • System Include files
  • Using and creating libraries
  • Linking
  • Using Make

Lab Exercises
  • Create a new dynamic shared library
  • Switch the libraries an executable uses via LD_LIBRARY_PATH
  • Create a Makefile for your library

4. Programming with GNU tools
  • gcc
  • optimization
  • linker
  • debugging with gdb

Lab Exercises
  • Compile programs with different optimization options
  • Examine generated code
  • Experiment with dead code removal
  • Use pre-processor macro features
  • Debug a program after a core dump with GDB
  • Step through a running program and change variable values on the fly

5. Tools
  • eclipse
  • electric fence
  • valgrind
  • gprof
  • gcov
  • patch

Lab Exercises
  • Try eclipse
  • Use gprof to profile a program for performance
  • Use Electric Fence to look for dynamic memory allocation bugs
  • Use valgrind to look for dynamically allocated memory bugs
  • Use cachegrind to examine cache utilization
  • Use dmalloc to test for memory leaks
  • Create and use patches
  • Use source code tools like ctags

6. Process Management
  • Creating processes
  • Process signaling and status
  • Process and user ID's

Lab Exercises
  • Use the variety of exec() calls
  • Write a simple shell that forks and execs commands

7. Linux File System
  • Access Permissions
  • I/O System Calls
  • Manipulating files
  • Higher performance I/O

Lab Exercises
  • Open/Read/Write with files
  • Implement “tail -f” like functionality
  • Use lseek() and mmap()
  • Do non-blocking I/O with devices
  • Use select() and poll()

8. Inter-process Communication
  • Pipes
  • Semaphores
  • Message Queues
  • Sockets
  • Shared Memory

Lab Exercises
  • Use pipe()
  • Use named pipes
  • Create a socket based server
  • Create a xinetd based service

Goal
This course provides practice with key tools and capabilities
available to developers of Linux based applications and system
software. The course shows attendees how to use development and
debugging tools and how to make use of many Linux system calls and
library routines. Attendees will spend approximately 50 percent of the
class time actually gaining hands-on experience with these topics.
Audience
Programmers who are new to Linux. Attendees should have experience with C and be able to perform Linux commands.
Includes

  • 2 days of intensive course training and hands-on lab exercises

  • Laptops pre-configured for the course


  • USB drive for students so that they can bring home course files

  • Linux Foundation promotional items

  • Continental breakfast and coffee breaks will be provided on both days

All other expenses of travel and per diem are the student's responsibility.
LESSON 2 Essential Linux Device Driver Development Skills


Course Description
This fast paced course teaches attendees to develop device drivers
for Linux.  This course acquaints developers with the issues essential
for Linux device driver development. The course progresses through a
number of topics. Each topic is presented along with a supporting
laboratory exercise before moving on to the next topic.  Students
should be prepared for a significant amount of hands-on programming.
What You Will Learn1. How To Configure And Install The Kernel
  • The kernel source code
  • Configure and build a new kernel (Lab Exercise)
  • Install the new kernel

Lab Exercises
  • Peruse Linux kernel source code

2. How Loadable Modules Work
  • Benefits of loadable modules
  • Use of insmod, modprobe, rmmod, and lsmod
  • Passing parameters to a module
  • The GPL and Linux

Lab Exercises

  • Work with loading and unloading modules
  • Work with module dependencies
  • Work with modprobe.conf file

3. Compiling
  • Identifying important header files
  • Writing a simple module
  • Compiling modules
  • Loading/unloading modules
  • Exporting symbols from a loadable module
  • Creating stacked loadable modules

Lab Exercises
  • Write a loadable kernel module
  • Use module macros related to the modinfo command
  • Write a module that uses module parameters
  • Write a module to avoid word size and endian issues.

4. Tracing and Debugging
  • printk for debugging
  • Device information in /proc and /sys
  • strace to track system calls
  • ksyms
  • Debuggers, e.g., gdb, and kgdb

Lab Exercises
  • Work with controlling printk messages on the console (Lab Exercise)
  • Create a proc file
  • Work with an Oops message
  • Use strace to see driver function results

5. Character Devices
  • Classes of device files
  • Major and minor numbers
  • Creating device files with mknod
  • Registering character device file
  • Listing character device driver methods
  • Dynamic major/minor numbers

Lab Exercises
  • Examine /proc/devices
  • Work with device files
  • Create a skeleton character device driver
  • Adapt the driver to act differently depending upon the minor number of the device file.
  • Integrate your driver into a kernel source tree

6. Data: User To/From Kernel
  • Important functions for accessing user space
  • Shared Memory
  • Issues with accessing user space from kernel space

Lab Exercises
  • Implement a write() function
  • Implement a read() function

7.  I/O ports and interrupts
  • Uses of I/O ports and IRQs
  • Platform dependency issues
  • Functions used for reading and writing I/O ports
  • Interrupt Handler functions
  • Restrictions on kernel code running in interrupt context

Lab Exercises
  • Do IO Port operations inb and outb
  • Attach an interrupt handler to the mouse and keyboard interrupts
  • Create a proc file to track interrupts

8. Blocking and Wait Queues
  • Schedule()
  • Wait Queues
  • Safe sleeping
  • Poll()

Lab Exercises
  • Mimic named pipe behavior via a driver
  • Create and use a wait queue
  • Implement non-blocking
  • Implement the fsync() function
  • Implement the poll() function=

Goal
This two day course provides practice with the key steps in
developing Linux device drivers. The course shows attendees how device
drivers work with the Linux kernel, how to compile and load drivers,
and how to debug drivers. Attendees will spend approximately 50 percent
of the class time actually gaining hands-on experience with these
topics.
Audience
The course is designed for software engineers who are new to Linux
device drivers. Attendees should have experience with C and be able to
perform basic Linux commands. Others, such as engineering managers
wishing to gain fundamental understanding of the Linux kernel and
device drivers will also benefit.
Includes (Classroom Only)

  • 2 days of intensive course training and hands-on lab exercises

  • Laptops pre-configured for the course


  • USB drive for students so that they can bring home course files

  • Linux Foundation promotional items

  • Continental breakfast and coffee breaks will be provided on both days

All other expenses of travel and per diem are the student's responsibility.
LESSON 3 Linux Kernel Debugging and Performance


Course Description
This course is designed to train developers in effective debugging
and performance measurement and improvement techniques for the Linux
kernel.
What You Will Learn
1. Linux Kernel Source code and documentation
  • Browsing the source
  • LXR
  • tags
  • cscope
  • documentation

Lab Exercises
  • Find kernel source for various features
  • Customize kernel source
  • Determine kernel functionality from source and specialized documentation

2. Kernel Configuration for Debugging and Performance Measurement
  • spin lock configuration
  • statistics
  • lock usage
  • debug info
  • mutex
  • Magic SysRq
  • KGDB
  • stack
  • Memory allocation

Lab Exercises
  • Create custom kernel configuration for debugging and measurement
  • Enable a variety of debugging features
  • Examine features provided by configuration values
  • Debug spin lock problems

3. Proc Filesystem
  • Tunable kernel parameters
  • Creating proc files, sysfs and debugfs
  • panic, oops, printk, sysrq proc files
  • printk proc file
  • sysrq
  • serial consoles

Lab Exercises
  • sysctl
  • create proc file
  • induce an oops
  • dmesg
  • sysrq usage

4. Debugging the kernel
  • kdb
  • gdb with /proc/kcore
  • Debugging with gdb
  • printk and the console
  • Deadlocks
  • Memory leaks
  • Magic Sysrq

Lab Exercises
  • Using GDB with the kernel (Lab Exercise)
  • Detecting and preventing deadlock (Lab Exercise)
  • Debugging kernel memory leaks (Lab Exercise)
  • Using the sysrq functionality (Lab Exercise)
  • KDB (Lab Exercise)

5. Kernel Performance
  • timing
  • oprofile
  • LTT
  • Lock statistics
  • sar

Lab Exercises
  • Using various oprofile features
  • Using LTT
  • Examining lock performance and contention
  • Using sar

6. Kernel Errors
  • oops
  • panic
  • creating dumps
  • crash

Lab Exercises
  • Oops messages (Lab Exercise)
  • Kernel symbol usage (Lab Exercise)
  • Crash usage (Lab Exercise)

Goal
This course walks participants through kernel documentation, kernel
configuration, kernel debugging, kernel measurement and other tools.
Audience
The course is for programmers who are relatively new to Linux kernel
debugging and performance measurement and improvement. Attendees should
have experience with C and be able to perform Linux commands.
Includes (Classroom Only)

  • 2 days of intensive course training and hands-on lab exercises

  • Laptops pre-configured for the course


  • USB drive for students so that they can bring home course files

  • Linux Foundation promotional items

  • Continental breakfast and coffee breaks will be provided on both days

All other expenses of travel and per diem are the student's responsibility.

                                               
               
               
               
               
               
               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/104096/showart_2056337.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP