DOC PREVIEW
U of I CS 241 - Final Exam

This preview shows page 1-2-3-20-21-40-41-42 out of 42 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 42 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 42 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 42 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 42 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 42 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 42 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 42 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 42 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 42 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CS241 System Programming Review Session – Final ExamFinal Exam DateFinal Exam MaterialTextbook ChaptersSlide 5How to Study for the Final ExamA peek into UnixSteps in Making a System CallProgram LayoutThreads in User SpaceThreads in the KernelSynchronization RequirementsSolution HistoryConditions for DeadlockDeadlock TopicsFile System ImplementationContiguous AllocationLinked AllocationIndexed AllocationVariable Partitions and FragmentationCompactionHow Bad Is Fragmentation?Storage Placement StrategiesPaging BasicsReduce PagingThrashing and CPU UtilizationNetwork ServiceReview Questions (Memory)Review Questions (Memory)Review Questions (Virtual Memory)Slide 31Review Questions (File Systems)Slide 33Review Questions (Networks)Review Questions/Answers (Memory)Review Questions/Answers (Memory)Review Questions/Answers (Virtual Memory)Slide 38Review Questions/Answers (File Systems)Slide 40Review Questions/Answers (Networks)Slide 42CS241 System ProgrammingReview Session – Final ExamKlara NahrstedtReview for Final Exam 5/3/200601/14/19 CS 241 - System Programming, Klara Nahrstedt2Final Exam DateMay 11, Thursday, 8-11amRoom Allocation–Last Name A-L go to room 1404 SC–Last Name M-Z go to room 151 LoomisBring with you Student ID and penExam is closed book, closed notes, no calculatorsComprehensive Exam01/14/19 CS 241 - System Programming, Klara Nahrstedt3Final Exam Material Topics (before Midterm) – will cover 1/3 of exam–Process and Thread Management–Synchronization–Scheduling–Signals and Timers–DeadlocksTopics (after Midterm) – will cover 2/3 of exam –Principles of I/O –Memory Management–File Systems–Communication Protocols01/14/19 CS 241 - System Programming, Klara Nahrstedt4Textbook ChaptersTanenbaum Chapters: –Chapter 2 (2.1-2.4) –Chapter 3 (3.1-3.3.5) –Chapter 4 (4.1-4.5), except 4.4.7 and 4.5.4 –Chapter 5 (5.1-5.5) Lecture Notes01/14/19 CS 241 - System Programming, Klara Nahrstedt5Textbook ChaptersRobins&Robins –Chapter 2 (2.1-2.11)–Chapter 3 (3.1-3,7)–Chapter 4 (4.1-4.4 and 4.6.1-4.6.2)–Chapter 5 –Chapter 8 (8.1-8.5)–Chapter 9 (9.1-9.5)–Chapter 12 (12.1-12.6)–Chapter 13 (13.1-13.6)–Chapter 14 (14.1-14.5)–Chapter 15 (15.1, 15.3, 15.4)–Chapter 18 (18.1-18.7)–Chapter 20 (20.1-20.8)01/14/19 CS 241 - System Programming, Klara Nahrstedt6How to Study for the Final ExamReview Slides/Questions for Midterm Review Review Class Notes and Textbooks chapters Review QuizzesReview Discussion Section SlidesReview Additional (Handwritten) Material on the web siteReview Shadow Homework and Regular Homework ProblemsWork on Relevant Problems after each chapter in Tanenbaum and also on Exercises in R&R Book01/14/19 CS 241 - System Programming, Klara Nahrstedt7A peek into UnixApplicationPortable OS LayerLibrariesMachine-dependent layerUser space/levelKernel space/level• User/kernel modes are supported by hardware •Some systems do not have clear user-kernel boundary01/14/19 CS 241 - System Programming, Klara Nahrstedt8Steps in Making a System Call read (fd, buffer, nbytes)01/14/19 CS 241 - System Programming, Klara Nahrstedt9Program Layout01/14/19 CS 241 - System Programming, Klara Nahrstedt10Threads in User SpaceA user-level threads package01/14/19 CS 241 - System Programming, Klara Nahrstedt11Threads in the KernelA threads package managed by the kernel01/14/19 CS 241 - System Programming, Klara Nahrstedt12Synchronization RequirementsMutual ExclusionProgressBounded WaitNo Blocking Forever01/14/19 CS 241 - System Programming, Klara Nahrstedt13 Solution HistoryApproaches:1. Turn Mutual Exclusion2. Other Flag Mutual Exclusion3. Two Flag Mutual Exclusion4. Two Flag and Turn Mutual Exclusion01/14/19 CS 241 - System Programming, Klara Nahrstedt14Conditions for DeadlockThe following four conditions are both necessary and sufficient for deadlock:1. Mutual exclusion2. Hold and wait condition3. No preemption condition4. Circular wait condition01/14/19 CS 241 - System Programming, Klara Nahrstedt15Deadlock TopicsDeadlock PreventionDeadlock AvoidanceDeadlock DetectionDeadlock Recovery01/14/19 CS 241 - System Programming, Klara Nahrstedt16File System ImplementationA possible file system layout01/14/19 CS 241 - System Programming, Klara Nahrstedt17Contiguous Allocation01/14/19 CS 241 - System Programming, Klara Nahrstedt18Linked Allocation01/14/19 CS 241 - System Programming, Klara Nahrstedt19Indexed Allocation01/14/19 CS 241 - System Programming, Klara Nahrstedt20Variable Partitions and FragmentationMonitor Job 1 Job 2 Job 3 Job 4Free1Monitor Job 1 Job 3 Job 4Free2Monitor Job 1 Job 3 Job 4FreeJob 53Monitor Job 3 Job 4FreeJob 5 Job 64Monitor Job 3FreeJob 5 Job 6Job 7 Job 8501/14/19 CS 241 - System Programming, Klara Nahrstedt21CompactionMonitor Job 3FreeJob 5 Job 6Job 7 Job 85Monitor Job 3FreeJob 5 Job 6Job 7 Job 86Monitor Job 3FreeJob 5 Job 6Job 7 Job 87Monitor Job 3FreeJob 5 Job 6Job 7 Job 88Monitor Job 3FreeJob 5 Job 6Job 7 Job 8901/14/19 CS 241 - System Programming, Klara Nahrstedt22How Bad Is Fragmentation?Statistical arguments - Random sizesFirst-fitGiven N allocated blocks0.5N blocks will be lost because of fragmentationI.e. 33% of memory may be unusable!!!Known as 50% RULE01/14/19 CS 241 - System Programming, Klara Nahrstedt23Storage Placement StrategiesBest fit. Use the hole whose size is equal to the need, or if none is equal, the whole that is larger but closest in size. First fit. Use the first available hole whose size is sufficient to meet the need.Worst fit. Use the largest available hole.01/14/19 CS 241 - System Programming, Klara Nahrstedt24Paging BasicsProvide user with virtual memory that is as big as user needsStore virtual memory on diskCache parts of virtual memory being used in real memoryLoad and store cached virtual memory without user program intervention01/14/19 CS 241 - System Programming, Klara Nahrstedt25Reduce Paging page replacement:optimalFIFO LRUsecond chance, page classes ad hoc techniques01/14/19 CS 241 - System Programming, Klara Nahrstedt26Thrashing and CPU Utilization01/14/19 CS 241 - System Programming, Klara Nahrstedt27Network ServiceService ExampleConnection-orientedReliableMessage streamPages in bookReliable byte stream Remote loginUnreliable connection Digitized VoiceConnectionless Unreliable datagram Test packetsAcknowledged Datagram Registered mailRequest-Reply Database


View Full Document

U of I CS 241 - Final Exam

Documents in this Course
Process

Process

28 pages

Files

Files

37 pages

File I/O

File I/O

52 pages

C Basics

C Basics

69 pages

Memory

Memory

23 pages

Threads

Threads

14 pages

Lecture

Lecture

55 pages

C Basics

C Basics

24 pages

Signals

Signals

27 pages

Memory

Memory

45 pages

Threads

Threads

47 pages

Threads

Threads

28 pages

LECTURE

LECTURE

45 pages

Threads

Threads

30 pages

Threads

Threads

55 pages

Files

Files

37 pages

SIGNALS

SIGNALS

22 pages

Files

Files

37 pages

Threads

Threads

14 pages

Threads

Threads

13 pages

Load more
Download Final Exam
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Final Exam and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Final Exam 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?