Вы находитесь на странице: 1из 16

Course Handout - Operating Systems Design

Course Title : Operating Systems Design


Course Code : 19CS2106 S
L-T-P-S Structure : 3-0-2-2
Credits : 4.5
Pre-requisite : Computer Organization & Architecture (19EC1202)
Course Coordinator : Mr M. Vishnuvardhan
Team of Instructors : 19
Theme: “Understanding design trade-offs, explaining/implementing parts of xv6
Operating system from a system design perspective”
Why operating systems design?
For each component of the kernel, the course explores its architecture and design.
The course will describe the differences between the different flavors of UNIX,
such as BSD, SYSTEM V and Linux.
Teaching Pedagogy:
• This Course employs a design-based learning pedagogy where students explore
architecture and design to customize and porting xv6: a simple, Unix-like teaching
operating system that requires understanding and application of knowledge. Students
assess, customize and manipulate internal algorithms and structures that form the basis of
the operating system (kernel) and their relationship to the programmer interface.
• Unlike a top-down teaching approach, which takes a macro view of a subject first, a
bottom-up teaching approach begins with the component parts of a subject, and gradually
builds up to the whole.
• The two entities, files and processes, are the two central concepts in the UNIX system
model.
• Architecture of the UNIX Operating System:
• File subsystem micro view
• Process control sub system micro view
Unix Kernel
The two entities, files and processes, are
the two central concepts in the UNIX
system model.
• The file subsystem is on the left and
the process control subsystem is on the
right.
• The diagram shows 3 levels : user,
kernel, and hardware.
• The system call and library interface
represent the border between user
programs and the kernel.
Unix Kernel: File subsystem micro view
Unix Kernel: Process control sub system micro
view
Course Objective:
• This course provides an in-depth view of the operating system's major
kernel subsystems design & implementation. These include virtual
memory system, process lifetime cycles and scheduling and the UNIX
file system. The course will describe the differences between the
different flavours of UNIX, such as BSD and SYSTEM V. Understanding
design trade-offs, explaining parts of xv6 from a system design
perspective. Students assess, customize and manipulate xv6.
Intended Audience:
Students who aspire to become
• Operating system developers (designers and architects)
• Application programmers
• System administrators.
Course Rationale:
• Examines some general conceptual issues relating to OS
implementation strategies and looks at some low-level techniques
that are often helpful for operating system developers, application
programmers, and system administrators. Programmers on UNIX
systems can gain a deeper understanding of how their programs
interact with the system and thereby code more efficient programs.
Interactive Learning in Virtual Classroom Environments:
• Students are introduced to content at home and practice working through it at
college.
• Students gain necessary knowledge before class, and Instructors guide students
to actively and interactively clarify and apply that knowledge during class.
Theory Sessions Activities Practical Sessions Activities
Pre-Class Pre-lab
1. Prepare lecture notes 1. Prepare lab notes
2. H5P content with poll or quiz 2. H5P content with poll
3. Quiz (Bridge Course: Linux Administration) – skilling component
4. Linux System Calls/Descriptive questions, Exercise (UNIX System
programming, xv6 implementation and customization)
In-class In-lab
1. Lecture, Discussion and poll 1. Exercise (UNIX System programming, xv6 implementation and
2. Case Study – xv6 Design and customization)
Implementation Problems 2. Discussion, Demonstration, viva voce
3. Poll
Post-class Post-lab
1. Quiz 1. Exercise (UNIX System programming, xv6 implementation and
customization)
2. Quiz
Course Outcomes
Course Outcome Blooms Taxonomy Level
CO No PO/PSO
(CO) (BTL)
Understand the internals of UNIX kernel architectures and
PO3, 4, PSO1
CO1 explore design of File Subsystem, buffer cache, and File 3
System Calls.
Understand the internals of system call and explore design
CO2 of structure of processes, process control, process system PO3, 4, PSO1 3
calls and scheduling in UNIX systems
Understand Traps, interrupts, and drivers. Explore design
tradeoffs and Implement parts of memory management
CO3 PO3, 4, PSO1 3
policies, first address space, page tables and virtual
memory in UNIX systems
Analyse theory and implementation of inter-process
CO4 communication, synchronization, concurrency, and Boot PO3, 4 PSO1 4
loader in UNIX variants.
Implement parts of xv6 and develop Programs/commands
CO5 using UNIX System Programming. Perform system PO3, 4, 5, PSO1 5
administration.
Course Outcome Indicators (COIs):
Course Highest COI-1 COI-2 COI-3 COI-4
Outcome No. BTL (BTL2) (BTL3) (BTL4) (BTL5)
Characterize the internals of UNIX Construct buffer cache and File System Calls in
kernel architectures. UNIX systems.
CO 1 3
Visualize File Subsystem Data Explore the design of Lower Level File System
Structures and algorithms Algorithms.
Understand the internals of Explore design of structure of processes and
system call. process control.
CO 2 3 Visualize saving the context of a Implement process system calls in UNIX systems
process, system calls for time, Develop shell in UNIX systems.
clock, console, and init process. Customize scheduling in UNIX systems.
Understand Traps, interrupts, and Implement the first process and address space.
drivers. Perform physical memory allocation and
multiplex address spaces using page tables in xv6.
Manipulate process address space in UNIX
CO 3 3 systems
Explore design trade-offs and Implement parts of
memory management policies: swapping,
segmentation, paging, TLB, Page faults and
Advanced Page Tables
Understand various Locking Apply Mutex, Semaphores, and Condition Analyse Models of
mechanisms, pthreads, and boot variables to Perform concurrent programming inter-process
CO 4 4 loader. Solve classic synchronization problems using communication and
pthreads. Deadlocks for UNIX
systems
Implement parts of xv6 and develop Programs/commands using Porting xv6
CO5 5
UNIX System Programming. Perform system administration.
SYLLABUS:
• Architecture of the UNIX operating system, OS Design Approaches, Operating system
interfaces, Operating system organization, An Overview of the File Subsystem, buffer cache
allocation algorithms: getblk, brelse, bread, breada, bwrite. Log design, Lower Level File
System Algorithms: namei, iget, iput, alloc, free, bmap, ialloc, ifree. File System Calls:
open,read,write,close,creat,mknod,chdir,stat,pipe,dup,link,unlink.
• Processes, Context of a process, Process States and Transitions, kernel data structures,
Under the Hood: The System Call, Paging hardware, Process address space, Physical
memory allocation, Systems calls, exceptions, and interrupts, Assembly trap handlers,
saving the context of a process, Disk driver, console, manipulation of the process address
space: allocreg, loadreg, freereg, dupreg, sleep, wakeup. Process System Calls: fork, kill, exit,
wait, brk, exec, xalloc. Shell
• Process scheduling: Scheduling Parameters, Multiplexing, Controlling Process Priorities, Fair
Share Scheduler, Real-Time Processing. System calls for time, clock, Memory management
policies: swapping, Demand Paging, Page faults, TLB, Segmentation, Hybrid approach:
paging and segments.
• Locking, Models of inter-process communication: shared memory and message passing.
Thread API, mutex, Deadlock, concurrent Linked Lists, Binary Semaphores (Locks), Counting
Semaphores, The Producer/Consumer (Bounded Buffer) Problem, Reader-Writer Locks, The
Dining Philosophers. The boot loader: Assembly bootstrap, C bootstrap, Introduction to
Assembly language programming for X86.
Prescribed Textbooks:
Textbooks:
1. Maurice J. Bach, The Design of The Unix Operating System, 2013 PHI Publishing.
2. Russ Cox, Frans Kaashoek, Robert Morris, xv6: a simple, Unix-like teaching operating system",
Revision https://pdos.csail.mit.edu/6.828/2018/xv6/book-rev11.pdf
3. Frans Kaashoek, Robert Morris, and Russ Cox, The xv6 source code booklet (draft) (revision 11).
https://pdos.csail.mit.edu/6.828/2018/xv6/xv6-rev11.pdf
Reference Books:
1. Operating Systems: Three Easy Pieces, Remzi H. Arpaci-Dusseau and Andrea C. Arpaci- Dusseau,
ArpaciDusseau Books, Createspace Independent Publishing Platform (2018).
http://pages.cs.wisc.edu/~remzi/OSTEP/
3. Advanced programming in the UNIX Environment, 2013 Third Edition, W.Richard Stevens, Stephen A.
Rago, The addison-wesley professional computing series.
5. Tanenbaum, A.S., Modern operating system. 2009 4th Edition Pearson Education, Inc.
10. Sumitabha Das - Your UNIX/Linux The Ultimate Guide, Third Edition-McGraw-Hill Education, 2012.
For each Theory session, we have the following
template for sub-sessions.
Teaching and
Minutes Topic ALM
Learning Methods
Attendance/Recap,
5
Poll/Pop Question
20 Lecture, Theory, Algorithms
Ask for any doubts through
5
Public chat/Poll/Break
Case Study(in-class
10 Xv6 functions: Design activity) ALM
problems
10 Implementation LTC
EVALUATION
Evaluation Evaluation Assessment
Weightage/Marks Duration (Hours) CO1 CO2 CO3 CO4 CO5
Type Component Dates
Blooms Taxonomy Level
Weightage 11.65 5.825 5.825
Sem-In Exam-I 120
Max Marks 50 25 25
In-Semester Weightage 11.65 5.825 5.825
Sem-In Exam -II 120
Summative Max Marks 50 25 25
Evaluation Lab In Semester Weightage 7.7 7.7
100
Total = 35 % Exam Max Marks 40 40
Skill Exercise Weightage 4 1 1 1 1
100
Max Marks 40 10 10 10 10
Weightage 6 1.5 1.5 1.5 1.5
ALM Continuous Evaluation
Max Marks 100 25 25 25 25
Home Weightage 4 1 1 1 1
Assignment & Continuous Evaluation
Max Marks 40 10 10 10 10
Textbook
In-Semester
Continuous Weightage 8 (6+2) 8
Formative
Evaluation Lab , Continuous evaluation
Evaluation Max Marks 100 100
Skill Exercise
Total = 25%
Question & Weightage 2 0.5 0.5 0.5 0.5
Answers (NDG – Continuous evaluation
Max Marks 100 25 25 25 25
Linux )
Weightage 5 1 1 1 1 1
Attendance
Max Marks 5 1 1 1 1 1
Weightage 9 9
Lab End
End- 120
Semester Exam. Max Marks 50
Semester 50
Summative Weightage 4.5 1.125 1.125 1.125 1.125
Exam Exercise 120
Evaluation Max Marks 50 12.5 12.5 12.5 12.5
Total = 40 % End Semester Weightage 26.5 6.625 6.625 6.625 6.625
180
Exam Max Marks 100 25 25 25 25
To DO
• Take a look at course web page in LMS
• Refer Course Handout document for more details

Вам также может понравиться