Operating System Internals – Embedded Linux: Spring 2009 Final Exam Review, Exams of Computer Science

An overview of the topics covered in the final exam for the cse 591el: operating system internals – embedded linux course offered in spring 2009. The exam includes material from atomic operations, test_and_set, spinlocks, semaphores and read/write spinlocks, moving data between user space and kernel space, module management, and laboratory projects. Students are expected to understand concepts, algorithms, and data structures related to these topics, as well as various handouts and readings.

Typology: Exams

Pre 2010

Uploaded on 09/02/2009

koofers-user-jkc
koofers-user-jkc 🇺🇸

10 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CSE 591el Operating System Internals – Embedded Linux Spring 2009
FINAL EXAM REVIEW
Version 1 3 May 2009
Exam is 6:40-9:30pm Wednesday 6 May 2009 in BYAC 110.
Exam is open books and open notes.
Exam consists of questions on the Linux 2.4.1 listings of algorithms and data structures in Linux
Core Kernel Commentary (LCKC) and related information from class lectures, Understanding the
Linux Kernel (ULK) and Linux Device Drivers (LDD). It also covers all programming assignments
and laboratory work this semester and associated reading from LCKC, ULK and LDD.
In general the Final Exam covers (and you are responsible for):
All material included in the MT1 review sheet. However the emphasis will be on the material
covered since MT1 and on the programming assignments and laboratory work. This includes material
covered earlier in the semester needed to answer questions on the material since MT1.
You are also responsible for:
• Lecture notes, slides, handouts, and other in-class information
• CSE 591el web site Linux Sources subfolders routines covered in class.
• Contents of Programming Assignments PP1, ELPP1, ELPP2, ELPP4, ELPP5 and LKM.
Listings Covered and associated readings
Atomic Operations, test_and_set, Spinlocks, Semaphores and Read/Write Spinlocks
Note: This topic description overlaps and includes material covered on MT1 Review
Handout: RW Locks Handout
LCKC chapter 10 pages 679-689 column 1 top. Note: You are not responsible for the four-process
four-CPU example covered in LCKC page 684 bottom thru page 685.
ULK – Chapter 5 pp. 161-166 middle, pp. 167 bottom-172 middle, pp. 173-177
Data Structures: LOCK, struct atomic_t, struct semaphore, LOCK_PREFIX, struct spinlock_t,
kernel_flag, RW_LOCK_BIAS, RW_LOCK_BIAS_STRING, rwlock_t, RW_LOCK_UNLOCKED,
Algorithms and Macros: init_MUTEX, init_MUTEX_LOCKED, sema_init, spin_lock_init,
SPIN_LOCK_UNLOCKED, spin_is_locked, spin_lock, spin_lock_string, spin_unlock,
spin_unlock_string, lock_kernel, unlock_kernel, atomic_dec, atomic_dec_and_test, test_and_set_bit,
test_and_clear_bit, down, __down_failed, __down, down_interruptible, __down_failed_interruptible,
__down_interruptible, down_trylock, __down_failed_trylock, __down_trylock,
atomic_add_negative, atomic_add, up, __up_wakeup, __up, spinlock_irq_save,
spin_unlock_irqrestore, local_irq_save, local_irq_restore
read_lock, __build_read_lock, write_lock, __build_write_lock, __build_read_lock_ptr,
__build_write_lock_ptr, __write_lock_failed, __read_lock_failed, read_unlock, write_unlock,
rwlock_init
pf3
pf4

Partial preview of the text

Download Operating System Internals – Embedded Linux: Spring 2009 Final Exam Review and more Exams Computer Science in PDF only on Docsity!

CSE 591el Operating System Internals – Embedded Linux Spring 2009 FINAL EXAM REVIEW Version 1 3 May 2009 Exam is 6:40-9:30pm Wednesday 6 May 2009 in BYAC 110. Exam is open books and open notes. Exam consists of questions on the Linux 2.4.1 listings of algorithms and data structures in Linux Core Kernel Commentary (LCKC) and related information from class lectures, Understanding the Linux Kernel (ULK) and Linux Device Drivers (LDD). It also covers all programming assignments and laboratory work this semester and associated reading from LCKC, ULK and LDD. In general the Final Exam covers (and you are responsible for): All material included in the MT1 review sheet. However the emphasis will be on the material covered since MT1 and on the programming assignments and laboratory work. This includes material covered earlier in the semester needed to answer questions on the material since MT1. You are also responsible for:

  • Lecture notes, slides, handouts, and other in-class information
  • CSE 591el web site Linux Sources subfolders routines covered in class.
  • Contents of Programming Assignments PP1, ELPP1, ELPP2, ELPP4, ELPP5 and LKM.

Listings Covered and associated readings

Atomic Operations, test_and_set, Spinlocks, Semaphores and Read/Write Spinlocks

Note: This topic description overlaps and includes material covered on MT1 Review Handout: RW Locks Handout LCKC chapter 10 pages 679-689 column 1 top. Note: You are not responsible for the four-process four-CPU example covered in LCKC page 684 bottom thru page 685. ULK – Chapter 5 pp. 161-166 middle, pp. 167 bottom-172 middle, pp. 173- Data Structures : LOCK, struct atomic_t, struct semaphore, LOCK_PREFIX, struct spinlock_t, kernel_flag, RW_LOCK_BIAS, RW_LOCK_BIAS_STRING, rwlock_t, RW_LOCK_UNLOCKED, Algorithms and Macros : init_MUTEX, init_MUTEX_LOCKED, sema_init, spin_lock_init, SPIN_LOCK_UNLOCKED, spin_is_locked, spin_lock, spin_lock_string, spin_unlock, spin_unlock_string, lock_kernel, unlock_kernel, atomic_dec, atomic_dec_and_test, test_and_set_bit, test_and_clear_bit, down, __down_failed, __down, down_interruptible, __down_failed_interruptible, __down_interruptible, down_trylock, __down_failed_trylock, __down_trylock, atomic_add_negative, atomic_add, up, __up_wakeup, __up, spinlock_irq_save, spin_unlock_irqrestore, local_irq_save, local_irq_restore read_lock, __build_read_lock, write_lock, __build_write_lock, __build_read_lock_ptr, __build_write_lock_ptr, __write_lock_failed, __read_lock_failed, read_unlock, write_unlock, rwlock_init

CSE 591el Operating System Internals – Embedded Linux Spring 2009 FINAL EXAM REVIEW

Moving data between User Space and Kernel Space

ULK pages 307 bottom- Copy_from_user flowchart handout You should understand the following about dynamic address checking as data is passed between user and kernel address space:

  1. the basic idea of Fixup Code, Exception Tables and how they are generated and used
  2. how user addresses are verified as valid
  3. how a processes address space is accessed from kernel space
  4. the following algorithms: copy_from_user , __generic_copy_from_user , __address_ok , access_ok , __range_ok , __copy_user_zeroing verify_area (ULK p. 310) __get_user_2 , (ULK p.311), __get_user_1, 2, 3 (ULK p. 315), strlen_user(string) (ULK pp. 315, 316).

Module Management

LCKC Chapter 2 pages 541 col 3-543 col. 1 ULK Appendix B except step 11 on rmmod and code of init_module in step 10 of insmod Handouts: Modules HO#1 – Insmod Calling Tree and Module Insertion Flow Chart Use of modprobe and insmod and calls to kernel module management routines, functions of these routines, and call from a kernel module management routine to a user helper routine. Concepts of module usage counter, exporting symbols, module dependency, module referencing, module linking and module unlinking. Data Structures : module , module_ref , user_struct and the macro INIT_USER , relevant parts of module.h (available via LXR viewer) Algorithms: request_module , exec_modprobe , exec_usermodehelper , flush_signal_handlers , sys_create_module , sys_query_module , qm_modules , qm_deps , qm_refs , qm_symbols , qm_info and sys_init_module – just what it does, not the code.

CSE 591el Operating System Internals – Embedded Linux Spring 2009 FINAL EXAM REVIEW Laboratory Programming Projects Key things you should know from each of the programming projects

1. PP How the mmap , munmap , msync , mremap and mprotect system calls work 2. ELPP The general architecture of a host/target HW/SW configuration for embedded system development as shown in ELPP1 Handout #1. The steps in cross compiling and running a program on a target machine with a different processor from the host. The steps in using a terminal emulator to communicate with a target. The steps in remotely mounting a compact flash card. How to use ftp to communicate between target and host. The general operation of host and target debuggers. 3. ELPP The steps in configuring, compiling, building, downloading and running a debuggable Linux Kernel on a Target System. The steps in compiling, building, downloading and running a MODIFIED debuggable Linux Kernel on a Target System. The difference between dynamic and static system configuration. How to write an application that uses a parallel port driver. 5. ELPP4 and ELPP How to configure, compile, build, download and run a debuggable Linux kernel on a target system configured for module insertion. How to dynamically insert a new driver module. How to display kernel debug messages. Key concepts for writing a USB driver. Major and minor numbers and what they are used for. Use of ioctl file system call. Implementation of delcomioc_ioctl routine of a USB device driver routine. How to write an application that reads version information and DIP switches and writes LEDs on a USB device. Use of usb_control_msg routine to send control message packets to Accelent USB host controller. Use of kmalloc , memset , copy_to_user , copy_from_user , and kfree in a driver. Use of mknod to configure tree. Use of insmod to insert a module in a dynamic system configuration. 6. LKM You should understand how the /proc File System can be used to read and write a kernel data structure as described in: 1. Loadable Kernel Module Programming Project write-up 2. Relevant parts of “Access the Linux Kernel using the /proc file system” available at: http://www.ibm.com/developerworks/linux/library/l-proc.html What module initialization (module_init) and module cleanup (module_exit) functions are (see also LDD chapter 2 pages 15 and 16), how to provide for their access and what needs to be in them. How to create and access /proc file entries. What a callback function is and how to write read and write callback functions. How to test callback functions. Use of a Makefile to build a /proc file system module. Constructing, and inserting a loadable kernel /proc file system module into a running kernel. Contents of utsname.h data structure.