Presentation is loading. Please wait.

Presentation is loading. Please wait.

Midterm Review Brian Kocoloski

Similar presentations


Presentation on theme: "Midterm Review Brian Kocoloski"— Presentation transcript:

1 Midterm Review Brian Kocoloski
CSE 422S - Operating Systems Organization Washington University in St. Louis St. Louis, MO 63130

2 CSE 422S –Operating Systems Organization
Midterm Exam 8-10 questions, which will test for comprehension, some key terms and details, and a bit of analysis How I would study (in order of importance) Start with LKD readings - Review PPT presentations at the same time that you do the readings Review studios for reinforcement Types of questions: True/False Multiple Choice Open answer / code snippets Bring pen/pencil/eraser/water bottle. No other material permitted on your desk 80 minutes total, 8:40-10am on Thu March 1 Will distribute exams, start promptly at 8:40am CSE 422S –Operating Systems Organization

3 CSE 422S –Operating Systems Organization
Core Concepts LKD Ch 1 Pg 4: Overview of Operating Systems and Kernels Figure 1.1: breakdown between user space and kernel space LKD Ch 2 Pg 16: A Beast of a Different Nature Understand differences between writing user code and writing kernel code (libraries, header files, etc.) CSE 422S –Operating Systems Organization

4 CSE 422S –Operating Systems Organization
Core Concepts LKD Ch 5 What are system calls for? What are some of the system calls we’ve looked at in the studios? (recall strace from studio 5) What operations are done in order to invoke a system call? Why is implementing a new system call not always a great idea? CSE 422S –Operating Systems Organization

5 CSE 422S –Operating Systems Organization
Core Concepts LKD Ch 11 What does HZ represent? How does the kernel keep track of real time? How does the kernel manage timers? How does it know when a timer has expired? What happens when a thread invokes schedule()? Other timing concepts What are hrtimers useful for? Why can’t the system clock (configured via HZ) be used to implement high resolution times – (i.e., on the order of nanosecond resolution) CSE 422S –Operating Systems Organization

6 CSE 422S –Operating Systems Organization
Core Concepts LKD Ch 6 How does the kernel implement “libraries” Why is “rolling your own” data structures frowned upon? Be able to perform basic operations on a linked list (I will give you the linked list API if a question asks you to do this) CSE 422S –Operating Systems Organization

7 CSE 422S –Operating Systems Organization
Core Concepts LKD Ch 3 What are the data structures used to track processes? struct task_struct, struct thread_info What is the difference between task_struct and thread_info? What are the different states a process can be in?(Figure 3.3 on pg 28) What is meant by copy-on-write? How does it make it quicker to create new processes? How are kernel threads different from user threads/processes? CSE 422S –Operating Systems Organization

8 CSE 422S –Operating Systems Organization
Core Concepts LKD Ch 4 What are the two questions that drive the behavior of the Linux scheduler? Which process should run? For how long should it run? Differences in requirements between I/O and compute bound processes Limitations of the O(1) scheduler How CFS addresses those limitations vruntime CSE 422S –Operating Systems Organization

9 CSE 422S –Operating Systems Organization
Core Concepts Real-time scheduling Understand the three real-time scheduling classes Be able to walk through examples of determining which process will execute given different periods, RT priorities, and runtimes (as done in class) Differences between user and kernel preemption (LKD pg 62) and why kernel preemption is useful from a real-time perspective CSE 422S –Operating Systems Organization

10 CSE 422S –Operating Systems Organization
Core Concepts LKD Ch 7 & Ch 8 Interrupt context vs user context Figure 7.1: path from hardware to kernel interrupt handling Difference between interrupt context and executing code with interrupts disabled What is the tension that drove the design of top-half and bottom-half processing? Be able to explain the differences between the three bottom half interrupt handler types, and to choose which would be best if I give you a set of constraints CSE 422S –Operating Systems Organization

11 Linux Kernel Familiarity
Be familiar with the main data structures we’ve looked at (you don’t need to memorize the fields, but be aware of what type of information they record) struct task_struct (include/linux/sched.h) struct sched_entity (include/linux/sched.h) If the slides or a studio refers to particular fields of a data structure, understand what those fields refer to current current->mm find_vpid() pid_task() CSE 422S –Operating Systems Organization

12 Core Concepts (summary)
Kernel execution: Timing: System calls Time sources (clocks) Interrupt handlers Timers Kernel threads Timer granularity Benchmarking Kernel programming: Tracing: Kernel modules Core kernel image Kernel tracing System call tracing CSE 422S –Operating Systems Organization

13 Core Concepts (summary)
Processes: Scheduler tensions Interrupt handling: Process creation Process address space Interrupt context Process family tree Process context Top half processing Scheduling: Bottom half processing O(1) Scheduler IRQs CFS Scheduler Tasklets Real-Time Scheduler Work queues CSE 422S –Operating Systems Organization

14 CSE 422S –Operating Systems Organization
Example Question #1 Imagine you are implementing a new OS feature that communicates with user space. User programs request an action from the kernel, and the kernel returns some data. Consider two options for implementing this feature: syscall vs. kernel module. Give two advantages of implementing this by creating a new system call (4 points): Give two advantages of implementing this by creating a new kernel module that reads and writes files (4 points): If you use the kernel module approach, what must user programs do to pass requests to it after it has been loaded (2 points)? CSE 422S –Operating Systems Organization

15 CSE 422S –Operating Systems Organization
Example Question #2 You have a periodic system where the Linux real-time scheduler runs every ms, the round-robin scheduling interval is 100ms, and there are five tasks, which will consume 300ms, 300ms, 400ms, 500ms, and 700ms of processor time respectively each time they run. If your system schedules tasks in FIFO order on a single core, what is the longest a task might wait before it runs (3 points)? If it instead schedules tasks in round-robin order on a single core, what is the longest a task might wait before it runs (3 points)? Rank the round-robin and FIFO schedulers as as either “HIGH” or “LOW” for each of: response time, overhead, fairness (3 points). CSE 422S –Operating Systems Organization

16 CSE 422S –Operating Systems Organization
Example Question #3 In the blank next to each term below, please write the letter for the text that best matches it and that it best matches (4 points). ___ task structure a. Non-root node of process family tree ___ init process b. Implements process family tree node ___ child process c. Extends process family tree ___ fork call d. Root of the process family tree CSE 422S –Operating Systems Organization


Download ppt "Midterm Review Brian Kocoloski"

Similar presentations


Ads by Google