{ "course": "Operating_Systems", "course_id": "CO2017", "schema_version": "material.v1", "slides": [ { "page_index": 0, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_001.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_001.png", "page_index": 0, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:00:36+07:00" }, "raw_text": "Operating Systems Introduction Tran, Van Hoai Faculty of Computer Science & Engineering HCMC University of Technology E-mail: hoai@hcmut.edu.vn based on slides of Le Thanh Van 2020-2021/Semester 2 590 1/44" }, { "page_index": 1, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_002.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_002.png", "page_index": 1, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:00:38+07:00" }, "raw_text": "Outline 1 Common knowledge on operating systems? 2 Course description 3 Important course information 4 Basic concepts & Questions 2/44" }, { "page_index": 2, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_003.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_003.png", "page_index": 2, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:00:39+07:00" }, "raw_text": "Outline 1 Common knowledge on operating systems? 2 Course description Important course information 4 Basic concepts & Questions 3/44" }, { "page_index": 3, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_004.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_004.png", "page_index": 3, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:00:41+07:00" }, "raw_text": "Which ones are OS? Microsoft Office Dropbox Microsoft Windows Android Google Mail ios Google Drive Amazon Web Services iCloud tinyOS Firmware on home wifi Mac OSX routers Cisco Internetwork UNIX Operating System 4/44" }, { "page_index": 4, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_005.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_005.png", "page_index": 4, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:00:44+07:00" }, "raw_text": "Which ones are OS? Microsoft Office Dropbox Microsoft Windows Android Which ones can be considered as an operating system (in non-IT context) ? A traffic policeman? A government? routers Cisco Internetwork UNIX Operating System 5/44" }, { "page_index": 5, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_006.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_006.png", "page_index": 5, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:00:46+07:00" }, "raw_text": "Which ones are OS? Microsoft Office Dropbox Microsoft Windows Android Which ones can be considered as an operating system (ir non-IT context ? A traffic policeman? (only a security function) A government? (full of functions) routers Cisco Internetwork UNIX Operating System 6/44" }, { "page_index": 6, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_007.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_007.png", "page_index": 6, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:00:53+07:00" }, "raw_text": "OS tree MWindows95 MS MWindows98 Windows10 An MS-DOS Operating systems windows 9.x Windows NT Windows 2000 kerne1 kerne1 System \"Classic\"Mac Mac System Software 1.0 Family Tree systems to Mac 0S 9 debian ubuntu Linux UNIX. Mint Exec kerne1 fedora redhat. - UNIX kerne1 AMiGAOS Mach kernel Linux kernel GNU software Scientific Linu 4CentOS Gentoo QNX kerne1 SUSE 0 \"ANX BSD kernel XNU kerne1 15 archlinux Chrome OS SunOS NetBSD DarwinOS FreeBSD OpenDarwin x PureDarwin solaris OS DragonFlyBSD Designed by Ethan Gates OpenBsD 10/2018 osX/macos 7/44" }, { "page_index": 7, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_008.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_008.png", "page_index": 7, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:00:54+07:00" }, "raw_text": "OS Market Share 8/44" }, { "page_index": 8, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_009.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_009.png", "page_index": 8, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:00:56+07:00" }, "raw_text": "Outline Common knowledge on operating systems? 2 Course description 3 Important course information 4 Basic concepts & Questions 9/44" }, { "page_index": 9, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_010.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_010.png", "page_index": 9, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:00:58+07:00" }, "raw_text": "Course objectives To convey the knowledges and skills of computer operating systems to those who attend the course, including Basic structure, main functions of operating systems of a modern computer Concurrent Processes, Mutual Exclusion and Synchronization of concurrent process, Process scheduling, Memories, Virtual Memory, Pages, Segmentation, Pages Replacement, Files systems, journaling, Virtual Machine Monitor, Security and Protection. Lab works will strengthen the theory given by lectures (C/C++, Python) 10/44" }, { "page_index": 10, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_011.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_011.png", "page_index": 10, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:00+07:00" }, "raw_text": "Course content (1) Ch.1: Introduction to operating systems Ch.2: Process management Concepts Process scheduling Interprocess communication Ch.3: Process synchronization Synchronization Deadlock handling Ch.4: Memory management Virtual memory Ch.5: 1/0 management Ch.6: File systems Ch.7: Security and Protection Ch.8: Advanced topics Some modern OS examples Computer networks and distributed systems 11/44" }, { "page_index": 11, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_012.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_012.png", "page_index": 11, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:04+07:00" }, "raw_text": "(2) Course content Operating System Concepts Process Memory Storage Distributed Case management management management systems studies Processes Main File system Protection & Linux memory interface security Threads Windows OSs Virtual File system Special CPU memory implementation purpose scheduling systems Mass storages Process structure synchronization l/0 systems Deadlocks 12/44" }, { "page_index": 12, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_013.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_013.png", "page_index": 12, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:05+07:00" }, "raw_text": "earning outcomes After completing this course, students will be able: 13/44" }, { "page_index": 13, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_014.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_014.png", "page_index": 13, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:07+07:00" }, "raw_text": "Learning outcomes After completing this course, students will be able: L.O.1 Define the functionality that a modern operating system must deliver to meet a particular need 14/44" }, { "page_index": 14, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_015.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_015.png", "page_index": 14, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:08+07:00" }, "raw_text": "Learning outcomes After completing this course, students will be able: L.O.1 Define the functionality that a modern operating system must deliver to meet a particular need. L.O.2 Apply mechanisms that are useful to realize concurrent systems and describe the benefits of each 15/44" }, { "page_index": 15, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_016.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_016.png", "page_index": 15, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:10+07:00" }, "raw_text": "Learning outcomes After completing this course, students will be able: L.O.1 Define the functionality that a modern operating system must deliver to meet a particular need L.O.2 Apply mechanisms that are useful to realize concurrent systems and describe the benefits of each. L.0.3 Compare and contrast the common algorithms used for both preemptive and non-preemptive scheduling of tasks in operating systems. 16/44" }, { "page_index": 16, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_017.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_017.png", "page_index": 16, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:13+07:00" }, "raw_text": "Learning outcomes After completing this course, students will be able: L.O.1 Define the functionality that a modern operating system must deliver to meet a particular need. L.O.2 Apply mechanisms that are useful to realize concurrent systems and describe the benefits of each L.0.3 Compare and contrast the common algorithms used for both preemptive and non-preemptive scheduling of tasks in operating systems. L.O.4 Explain virtual memory and its realization in hardware and software. 17/44" }, { "page_index": 17, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_018.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_018.png", "page_index": 17, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:15+07:00" }, "raw_text": "Learning outcomes After completing this course, students will be able: L.O.1 Define the functionality that a modern operating system must deliver to meet a particular need. L.O.2 Apply mechanisms that are useful to realize concurrent systems and describe the benefits of each L.0.3 Compare and contrast the common algorithms used for both preemptive and non-preemptive scheduling of tasks in operating systems. L.O.4 Explain virtual memory and its realization in hardware and software. L.0.5 Compare and contrast different approaches to file organization, recognizing the strengths and weaknesses of each. 18/44" }, { "page_index": 18, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_019.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_019.png", "page_index": 18, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:16+07:00" }, "raw_text": "What are you expected ? Your knowledge will be measured in a quantitative manner. 19/44" }, { "page_index": 19, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_020.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_020.png", "page_index": 19, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:20+07:00" }, "raw_text": "Your knowledge will be measured in a quantitative manner. Putting infornation tagether CREATING EVALUATING Making judgements based on 41 2 lli THIHE ANALYZING Breaking the concept into pa related to one another APPLYING Use the knowledge ga new ways I Makingsense ofthemate UNDERSTANDING you have learned REMEMBERING From long term memory source:blog.newsela.com source: wikipedia.org 20/44" }, { "page_index": 20, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_021.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_021.png", "page_index": 20, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:22+07:00" }, "raw_text": "Required/Applied by this course Which ones to be required by this course ? Hardware aspects: Computer architecture?!?!?! Software aspects: C/C++ programming is recommended! = 21/44" }, { "page_index": 21, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_022.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_022.png", "page_index": 21, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:25+07:00" }, "raw_text": "Required/Applied by this course Which ones to be required by this course ? Hardware aspects: Computer architecture?!?!?! Software aspects: C/C++ programming is recommended! Which ones to be applied by this course ? Computer network Big Data Advanced OS, mobile Security systems Real-time systems High performance Web programming computing Distributed systems Software engineering 22/44" }, { "page_index": 22, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_023.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_023.png", "page_index": 22, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:26+07:00" }, "raw_text": "Outline 1 Common knowledge on operating systems? 2 Course description 3 Important course information 4 Basic concepts & Questions 23/44" }, { "page_index": 23, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_024.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_024.png", "page_index": 23, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:27+07:00" }, "raw_text": "Course materials Silberschatz et al, \"Operating System Concepts\", 9th Ed.. 2012 (Electronic Version). 24/44" }, { "page_index": 24, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_025.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_025.png", "page_index": 24, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:29+07:00" }, "raw_text": "Course materials Silberschatz et al, \"Operating System Concepts\", 9th Ed., 2012 (Electronic Version). Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau, 'Operating Systems: Three Easy Pieces\", 0.91v, 2014. Website: http://pages.cs.wisc.edu/remzi/0STEP/ 25/44" }, { "page_index": 25, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_026.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_026.png", "page_index": 25, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:31+07:00" }, "raw_text": "Course evaluation Final Exam 50% 80-90 Minutes, multiple-choices (tentative) Assig. & Project 30% Lab 10% Quiz 10% 15 Minutes (could be many times) 26/44" }, { "page_index": 26, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_027.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_027.png", "page_index": 26, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:34+07:00" }, "raw_text": "Important course notice Presence checks 5 times or more randomly course presence checks: absence for more than 3 times will be prohibited (Grade F) University regulation \"24.1 Cac hinh thüc ky luat : c. Cám thi va nhan diém cám ...., áp dung vói möt trong cäc Ii sau: Vi pham cäc quy dinh trong quä trinh hoc: ...Väng mat (c6 ly do hoac khng có ly do) quá 20% s gi l@n lóp cúa mön hoc. 27/44" }, { "page_index": 27, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_028.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_028.png", "page_index": 27, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:35+07:00" }, "raw_text": "Outline Common knowledge on operating systems? 2 Course description 3Important course information 4 Basic concepts & Questions 28/44" }, { "page_index": 28, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_029.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_029.png", "page_index": 28, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:38+07:00" }, "raw_text": "Basic concepts - What is a system? An assemblage of objects so combined by nature or human as to form an integral unit A regularly interacting or interdependent group of objects forming a unified whole Webster's Dictionary A combination of components/objects that act together to perform a function not possible with any of the individual parts IEEE Standard Dictionary of Electrical and Electronic Terms 590 29/44" }, { "page_index": 29, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_030.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_030.png", "page_index": 29, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:41+07:00" }, "raw_text": "Basic concepts - What is a system? An assemblage of objects so combined by nature or human as to form an integral unit A regularly interacting or interdependent group of objects forming a unified whole Webster's Dictionary A combination of components/objects that act together to perform a function not possible with any of the individual parts IEEE Standard Dictionary of Electrical and Electronic Terms Two major features 1 A system consists of interacting objects/components A system is associated with a function/work that it performs 290 30/44" }, { "page_index": 30, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_031.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_031.png", "page_index": 30, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:43+07:00" }, "raw_text": "Why do we study this course short-term Common guestions 31/44" }, { "page_index": 31, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_032.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_032.png", "page_index": 31, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:44+07:00" }, "raw_text": "Why do we study this course short-term Common questions Is it useful for other courses ? 32/44" }, { "page_index": 32, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_033.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_033.png", "page_index": 32, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:46+07:00" }, "raw_text": "Why do we study this course short-term Common questions Is it useful for other courses ? How to use this for other courses ? 33/44" }, { "page_index": 33, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_034.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_034.png", "page_index": 33, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:47+07:00" }, "raw_text": "Why do we study this course short-term Common questions Is it useful for other courses ? How to use this for other courses ? Is it easy to achieve high grade ? 34/44" }, { "page_index": 34, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_035.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_035.png", "page_index": 34, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:48+07:00" }, "raw_text": "Why do we study this course short-term) Common questions Is it useful for other courses ? How to use this for other courses ? Is it easy to achieve high grade ? Is it easy to remember the knowledge of this course ? 35/44" }, { "page_index": 35, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_036.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_036.png", "page_index": 35, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:50+07:00" }, "raw_text": "Why do we study this course short-term Common questions Is it useful for other courses ? How to use this for other courses ? Is it easy to achieve high grade ? Is it easy to remember the knowledge of this course ? 36/44" }, { "page_index": 36, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_037.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_037.png", "page_index": 36, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:51+07:00" }, "raw_text": "Why do we study this course (long-term Common guestions on career 37/44" }, { "page_index": 37, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_038.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_038.png", "page_index": 37, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:53+07:00" }, "raw_text": "Why do we study this course (long-term) Common questions on career to be used in engineering tasks ? = 38/44" }, { "page_index": 38, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_039.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_039.png", "page_index": 38, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:54+07:00" }, "raw_text": "Why do we study this course (long-term) Common questions on career to be used in engineering tasks ? to earn much money ? 39/44" }, { "page_index": 39, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_040.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_040.png", "page_index": 39, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:56+07:00" }, "raw_text": "Why do we study this course (long-term Common questions on career to be used in engineering tasks ? to earn much money ? to be used in research ? 40/44" }, { "page_index": 40, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_041.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_041.png", "page_index": 40, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:57+07:00" }, "raw_text": "Why do we study this course (long-term) Common questions on career to be used in engineering tasks ? to earn much money ? to be used in research ? How to be used in engineering ? 41/44" }, { "page_index": 41, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_042.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_042.png", "page_index": 41, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:01:59+07:00" }, "raw_text": "Why do we study this course (long-term) Common questions on career to be used in engineering tasks ? to earn much money ? to be used in research ? How to be used in engineering ? How to achieve economical benefits ? 42/44" }, { "page_index": 42, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_043.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_043.png", "page_index": 42, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:02:01+07:00" }, "raw_text": "Experiences of professionals around the world Prof. John Regehr, University of Utah, USA Some students are incapable of or uninterested in implementing new OS But they can learn from OS course: concurrency, resource management, contention resolution, computer system design 43/44" }, { "page_index": 43, "chapter_num": 0, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_044.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_0/slide_044.png", "page_index": 43, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:02:03+07:00" }, "raw_text": "Happy new lunar year and let's work hard :-) Cisic statcounter 44/44" }, { "page_index": 44, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_001.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_001.png", "page_index": 44, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:02:04+07:00" }, "raw_text": "Computer system organization Tran, Van Hoai Faculty of Computer Science & Engineering HCMC University of Technology E-mail: hoai@hcmut.edu.vn (partly based on slides of Le Thanh Van) 1/47" }, { "page_index": 45, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_002.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_002.png", "page_index": 45, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:02:06+07:00" }, "raw_text": "Outline 1 What is operating system ? 2 Computer system organization Computer system operation l/0 structure Storage structure Resource protection Kernel data structures 2/47" }, { "page_index": 46, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_003.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_003.png", "page_index": 46, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:02:08+07:00" }, "raw_text": "Outline 1 What is operating system ? 2 Computer system organization Computer system operation l/0 structure 1 Storage structure Resource protection Kernel data structures 3/47" }, { "page_index": 47, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_004.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_004.png", "page_index": 47, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:02:09+07:00" }, "raw_text": "Basic concepts Operating system = Operating + system 590 4/47" }, { "page_index": 48, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_005.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_005.png", "page_index": 48, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:02:10+07:00" }, "raw_text": "Basic concepts Operating system Operating + system Systems can be human resources a computer hardware organization 5/47" }, { "page_index": 49, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_006.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_006.png", "page_index": 49, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:02:12+07:00" }, "raw_text": "Basic concepts Operating system Operating + system ex macHina WHaT HaPPP mE IF 1 FaIL yOUr TeST? Systems can be human resources a computer hardware organization An operating system? 6/47" }, { "page_index": 50, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_007.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_007.png", "page_index": 50, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:02:14+07:00" }, "raw_text": "OS - A manager Operating system is like a perfect manager which manages resources. 7/47" }, { "page_index": 51, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_008.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_008.png", "page_index": 51, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:02:15+07:00" }, "raw_text": "OS - A manager Operating system is like a perfect manager which manages resources. Users Operating system Resources 8/47" }, { "page_index": 52, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_009.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_009.png", "page_index": 52, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:02:17+07:00" }, "raw_text": "OS - A manager Operating system is like a perfect manager which manages resources. user user user user 2 3 Users compiler assembler text editor database system in Computer Operating system system and application programs System Resources operating system computer hardware 9/47" }, { "page_index": 53, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_010.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_010.png", "page_index": 53, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:02:20+07:00" }, "raw_text": "OS - A manager Operating system is like a perfect manager which manages resources. user user user user 2 Users compiler assembler text editor I database Design issues An OS is designed not only to \"serve\" users, but also to \"serve\" users well in terms of Convenience Efficiency 10/47" }, { "page_index": 54, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_011.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_011.png", "page_index": 54, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:02:23+07:00" }, "raw_text": "OS - A manager Operating system is like a perfect manager which manages resources. user user user user 2 Users compiler assembler text editor I database Design issues An OS is designed not only to \"serve\" users, but also to \"serve\" users well in terms of Convenience Efficiency Example: Mobile operating system What do users expect for a mobile operating system? (Let's think!!!) 11/ 47" }, { "page_index": 55, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_012.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_012.png", "page_index": 55, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:02:25+07:00" }, "raw_text": "Definition Operating system being a basis for application programs acting as an intermediary between the computer user and the computer hardware 590 12/47" }, { "page_index": 56, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_013.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_013.png", "page_index": 56, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:02:26+07:00" }, "raw_text": "Definition Operating system being a basis for application programs acting as an intermediary between the computer user and the computer hardware User view System view 590 13/ 47" }, { "page_index": 57, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_014.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_014.png", "page_index": 57, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:02:28+07:00" }, "raw_text": "Definition Operating system being a basis for application programs acting as an intermediary between the computer user and the computer hardware User view System view User view varies according to the interface Type of computers influences the design aspects Personal computer: easy of use > resource utilization Computing Server: easy of use < resource utilization Shared Server: easy of use resource utilization 14/ 47" }, { "page_index": 58, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_015.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_015.png", "page_index": 58, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:02:31+07:00" }, "raw_text": "Definition Operating system being a basis for application programs acting as an intermediary between the computer user and the computer hardware User view System view User view varies according OS as a resource allocator to the interface or a control program to Type of computers manage various l/O influences the design devices and user programs aspects OS = kernel + system Personal computer: easy of use > resource utilization programs Computing Server: easy of use < resource utilization Shared Server: easy of use resource utilization 15/ 47" }, { "page_index": 59, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_016.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_016.png", "page_index": 59, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:02:33+07:00" }, "raw_text": "Outline 1 What is operating system ? 2 Computer system organization Computer system operation I/0 structure Storage structure Resource protection Kernel data structures 590 16/ 47" }, { "page_index": 60, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_017.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_017.png", "page_index": 60, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:02:35+07:00" }, "raw_text": "Modern computer system nouse keyboard printer monitor disks on-lno CPU disk USBcontroller graphics controller adapter memory 590 17/ 47" }, { "page_index": 61, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_018.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_018.png", "page_index": 61, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:02:37+07:00" }, "raw_text": "Modern computer system nouse keyboard printer monitor disks on-lin CPU disk usB controller graphics controller adapter memory When computer is powered up (or rebooted): bootstrap 1 program is an initial program (stored in ROM or EEPROM 1.1 to initialize all system aspects (registers, devices, ... 1.2 to load operating system (kernel) into memory and to start executing the system 18/47" }, { "page_index": 62, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_019.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_019.png", "page_index": 62, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:02:40+07:00" }, "raw_text": "Modern computer system nouse keyboard printer monitor disks CPU disk USB controller graphics controller adapter memory When computer is powered up (or rebooted): bootstrap 1 program is an initial program (stored in ROM or EEPROM 1.1 to initialize all system aspects (registers, devices, ... 1.2 to load operating system (kernel) into memory and to start executing the system 2 When being executed, kernel 2.1 to load system programs and execute them as system daemons 2.2 to wait for events 19/ 47" }, { "page_index": 63, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_020.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_020.png", "page_index": 63, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:02:41+07:00" }, "raw_text": "Event detection More and more devices connecting to CPU: keyboard, mouse, screen, disk drives, printer, scanner, sound card etc. Device occasionally need CPU service: but can't predict when Time between events should be busy time of CPU 20/47" }, { "page_index": 64, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_021.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_021.png", "page_index": 64, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:02:44+07:00" }, "raw_text": "Event detection More and more devices connecting to CPU: keyboard, mouse, screen, disk drives, printer, scanner, sound card, etc. Device occasionally need CPU service: but can't predict when Time between events should be busy time of CPU Need a way for CPU to find out devices requiring attention Attentions are detected by (i) interrupt (ii) polling 21/47" }, { "page_index": 65, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_022.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_022.png", "page_index": 65, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:02:46+07:00" }, "raw_text": "Event detection More and more devices connecting to CPU: keyboard, mouse, screen, disk drives, printer, scanner, sound card, etc. Device occasionally need CPU service: but can't predict when Time between events should be busy time of CPU Need a way for CPU to find out devices requiring attention Attentions are detected by (i) interrupt (ii) polling Polling \"Polling is like picking up your phone every few seconds to see if you have a call. E 22/47" }, { "page_index": 66, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_023.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_023.png", "page_index": 66, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:02:48+07:00" }, "raw_text": "Interrupt mechanism (1) Interrupt An event is signaled by an interrupt from Hardware: sending a signal to CPU, thru system bus Software: executing a special operation, called system call 590 23/47" }, { "page_index": 67, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_024.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_024.png", "page_index": 67, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:02:51+07:00" }, "raw_text": "Interrupt mechanism (1) Interrupt An event is signaled by an interrupt from Hardware: sending a signal to CPU, thru system bus Software: executing a special operation, called system call When an interrupt occurs, a generic routine is called to check handle_IRQ_evont() interrupt information. Return Hardware address of interrupted instructions ocessor interrupts the kernel Is there an interrup run all interrup handler on this line? hanc ers on this line must be stored in system stack nterrupt contro no do_IRQ() eturn to the Then the control is transfered to ret_irom_intr() kernel code that was interrupted interrupt-specific handler (or Processo interrupt handler). An interrupt vector keeps addresses to interrupt handlers 24/47" }, { "page_index": 68, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_025.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_025.png", "page_index": 68, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:02:55+07:00" }, "raw_text": "Interrupt mechanism (2) Storage Fast ALU Cache RAM CPU CPU user process executing l/Ointerrupt processing 1/0 idle Hard Drive device transferring IDE Bus Video Card Network Card Keyboard I/0 transfer I/0 transfer USB Mouse request done request done Slow Serial Port Storage Interrupt timeline for a single process doing output Programmable interrupt controller (PIC) E 8259A chip 25/47" }, { "page_index": 69, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_026.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_026.png", "page_index": 69, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:02:59+07:00" }, "raw_text": "Interrupt mechanism (2) Storage Fast ALU Cache RAM CPU CPU user process ory Bu executing I/O interrupt processing 1/0 idle Hard Drive device transferring DE Bu Video Card Network Card Keyboard I/0 transfer I/0 transfer USB Mouse request done request done Slow Serial Port Storage 1/0 Interrupt timeline for a single process doing output Programmable interrupt controller (PIC) E 8259A chip Types of interrupts Program: arithmetic overflow, division by zero, invalid memory access Timer: CPU performs a task periodically 1/0: finish of an 1/0 operation, failures in I/0 operation Hardward failure: power failure, memory parity Trap (software interrupt): a system call 26/ 47" }, { "page_index": 70, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_027.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_027.png", "page_index": 70, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:03:03+07:00" }, "raw_text": "I/O r methods by interrupt requesting process user waiting- requesting process user device driver device driver kernel interrupt handler interrupt handler kernel hardware hardware data transfer data transfer time time (a) (b) Control returns to user Control returns to user program without waiting program only upon l/0 for I/0 completion completion System call - request to the operating system to No simultaneous I/O allow user to wait for l/O completion processing Device-status table contains entry for each l/0 device indicating its type, address, and state Operating system indexes into I/O device table to determine device status and to modify table entry to include interrupt : = 27/ 47" }, { "page_index": 71, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_028.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_028.png", "page_index": 71, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:03:06+07:00" }, "raw_text": "Device status table device:card reader 1 status: idle device: line printer 3 request for status: busy line printer address: 38546 device:disk unit 1 length: 1372 status: idle device: disk unit 2 status: idle device: disk unit 3 status: busy request for request for disk unit 3 disk unit 3 file:xxx file: yyy operation:read operation:write address: 43046 address: 03458 length: 20000 length: 500 590 28/47" }, { "page_index": 72, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_029.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_029.png", "page_index": 72, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:03:07+07:00" }, "raw_text": "Direct memory access FPO Device controller transfers blocks of PCle bus data from buffer storage directly to System memory main memory without CPU CPU intervention (Source: wikipedia) 29/47" }, { "page_index": 73, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_030.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_030.png", "page_index": 73, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:03:09+07:00" }, "raw_text": "Direct memory access structure Direct memory access Device controller transfers blocks of PCle bus MD DIrectGMA data from buffer storage directly to System memory main memory without CPU CPU intervention (Source: wikipedia) Used for communication at close to memory speeds Only interrupted per block, not per byte 30/ 47" }, { "page_index": 74, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_031.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_031.png", "page_index": 74, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:03:12+07:00" }, "raw_text": "Direct memory access FPG Device controller transfers blocks of PCle bus AMD DIrectGMA data from buffer storage directly to System memory main memory without CPU CPU intervention (Source: wikipedia) Used for communication at close to memory speeds Only interrupted per block, not per byte Indirect Memory Access Direct Memory Access CPU CPU Bus Bus RAM Disk RAM Disk Controller Controller (Source: UCLA) 31/ 47" }, { "page_index": 75, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_032.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_032.png", "page_index": 75, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:03:15+07:00" }, "raw_text": "Storage hierarchy morality, creativity, spontaneity. \"Hierarchies are celestial. In problem solving lack of prejudice Self-actualization acceptance offacts hell all are equal.' self-esteem, confidence,achievement, Esteem /respect of others,respect by others Nicoläs Gómez Dävila Love/Belonging friendship,family,sexual intimacy security of body,of employment,of resources, Safety of morality.of the family.of health,of property Physiologica breathing,food,water. sex.sleep,homeostasis,excretion 590 32/ 47" }, { "page_index": 76, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_033.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_033.png", "page_index": 76, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:03:16+07:00" }, "raw_text": "Storage hierarchy Storage systems organized in hierarchy, w.r.t Speed Capacity Volatility Cost 590 33/ 47" }, { "page_index": 77, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_034.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_034.png", "page_index": 77, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:03:19+07:00" }, "raw_text": "Storage hierarchy Storage systems organized in hierarchy, w.r.t. Speed Capacity Volatility Cost storage capacity access time registers cache primary storage Main memory - only large volatile storage main memory storage media that the CPU can access directly nonvolatile storage nonvolatile memory secondary storage Secondary storage - extension hard-disk drives of main memory that provides large non-volatile storage optical disk tertiary capacity storage magnetic tapes 34/ 47" }, { "page_index": 78, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_035.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_035.png", "page_index": 78, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:03:21+07:00" }, "raw_text": "Caching Cache A high-speed memory to hold recently-accessed data Caching - a mechanism of copying information into faster storage system and it is controlled by a cache management policy Main memory can be viewed as a last cache for secondary storage Data is stored in more than one level, therefore, cache should be kept consistent 35/ 47" }, { "page_index": 79, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_036.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_036.png", "page_index": 79, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:03:26+07:00" }, "raw_text": "Caching - Performance of various storage levels Level 1 2 3 4 5 Name registers cache main memory solid state disk magnetic disk Typical size <1 KB <16MB <64GB <1TB <10TB Implementation custom memory on-chip or CMOSSRAM flash memory magnetic disk technology withmultiple off-chip ports CMOS CMOS SRAM Access time(ns) 0.25-0.5 0.5 - 25 80-250 25,000-50,000 5,000,000 Bandwidth(MB/sec) 20,000-100,000 5,000-10,000 1,000-5,000 500 20-150 Managed by compiler hardware operating system operating system operating system Backed by cache main memory disk disk disk or tape 36/ 47" }, { "page_index": 80, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_037.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_037.png", "page_index": 80, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:03:28+07:00" }, "raw_text": "How a modern computer system works -instructionexecution- cache cycle instructions thread of execution and data movement data CPU (*N) l/O request interrupt data DMA memory device (*M) 590 37 / 47" }, { "page_index": 81, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_038.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_038.png", "page_index": 81, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:03:30+07:00" }, "raw_text": "Hardware protection In a multiprogrammed time-shareing system, operating system and users share hardware and software resources > We need a way to protect an error (of a user program) not cause problems to OS and other programs. 38/47" }, { "page_index": 82, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_039.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_039.png", "page_index": 82, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:03:33+07:00" }, "raw_text": "Hardware protection In a multiprogrammed time-shareing system, operating system and users share hardware and software resources We need a way to protect an error (of a user program) not cause problems to OS and other programs. Dual-mode protection 1/0 protection Memory protection CPU protection 39/47" }, { "page_index": 83, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_040.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_040.png", "page_index": 83, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:03:35+07:00" }, "raw_text": "Dual-mode protection Execution of OS code and user-defined code must be distinguished 40/47" }, { "page_index": 84, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_041.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_041.png", "page_index": 84, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:03:36+07:00" }, "raw_text": "Dual-mode protection Execution of OS code and user-defined code must be distinguished There are at least 2 separate modes of operation User mode - execution done on behalf of a user Kernel mode (also monitor, system, supervisor, privileged mode) - execution done on behalf of operating system 41/47" }, { "page_index": 85, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_042.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_042.png", "page_index": 85, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:03:39+07:00" }, "raw_text": "Dual-mode protection Execution of OS code and user-defined code must be distinguished There are at least 2 separate modes of operation User mode - execution done on behalf of a user Kernel mode (also monitor, system, supervisor, privileged mode) - execution done on behalf of operating system Mode bit added to computer hardware to indicate the current mode. user process user mode calls system call return from system call (mode bit =1) user process executing kernel trap return mode bit=0 mode bit = 1 kernel mode execute system call (mode bit = 0) Privileged instructions can be issued only in_kernel mode-, 590 42/47" }, { "page_index": 86, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_043.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_043.png", "page_index": 86, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:03:41+07:00" }, "raw_text": "l/0 protection All l/O instructions are privileged instructions All I/O requests are done by calling system calls Guarantee that a user program could never gain control of the computer in kernel mode Example: a user program that, as part of its execution, stores a new address in the interrupt vector 43/47" }, { "page_index": 87, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_044.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_044.png", "page_index": 87, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:03:45+07:00" }, "raw_text": "Memory protection (1) Must provide memory protection at least for the interrupt vector and the 0 interrupt service routines monitor 256000 Two registers that determine the range job 1 of legal addresses a program may 300040 300040 access: job 2 base register Base register - holds the smallest 420940 120900 legal physical memory address limit register job 3 Limit register - contains the size of 880000 the range job 4 1024000 Memory outside the defined range is protected 44/ 47" }, { "page_index": 88, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_045.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_045.png", "page_index": 88, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:03:47+07:00" }, "raw_text": "Memory protection (2) base base + limit address yes yes CPU no no trap to operating system monitor-addressing error memory When executing in monitor mode, the operating system has unrestricted access to both monitor and user's memory The load instructions for the base and limit registers are privileged instructions 45/47" }, { "page_index": 89, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_046.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_046.png", "page_index": 89, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:03:49+07:00" }, "raw_text": "CPU protection Timer - interrupts computer after specified period to ensure operating system maintains control Timer is decremented every clock tick When timer reaches the value 0, an interrupt occurs Timer commonly used to implement time-sharing Load-timer is a privileged instruction 46/47" }, { "page_index": 90, "chapter_num": 1, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_047.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_1/slide_047.png", "page_index": 90, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:03:51+07:00" }, "raw_text": "Kernel data structures Singly linked list, Trees doubly-linked list Hash functions and Maps circularly linked list Bitmaps Stack, queues 590 47/ 47" }, { "page_index": 91, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_001.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_001.png", "page_index": 91, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:03:54+07:00" }, "raw_text": "Operating system structures Tran, Van Hoai Faculty of Computer Science & Engineering HCMC University of Technology E-mail: hoai@hcmut.edu.vn (partly based on slides of Le Thanh Van) 1/47" }, { "page_index": 92, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_002.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_002.png", "page_index": 92, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:03:55+07:00" }, "raw_text": "Outline 1 Operating system services 2 System calls and programs 3 Operating system structure 4 Advanced issues 2/47" }, { "page_index": 93, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_003.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_003.png", "page_index": 93, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:03:56+07:00" }, "raw_text": "Outline 1 Operating system services 2 System calls and programs 3Operating system structure 4 Advanced issues 3/47" }, { "page_index": 94, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_004.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_004.png", "page_index": 94, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:03:59+07:00" }, "raw_text": "Operating system services user and other system programs GUI batch command line user interfaces systerm calls program I/0 file communication resource accounting execution operations systems allocation protection error detection and security services operating system hardware 4/47" }, { "page_index": 95, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_005.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_005.png", "page_index": 95, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:04:01+07:00" }, "raw_text": "Operating system services user and other system programs GUI batch command line user interfaces systerm calls program I/0 file communication resource accounting execution operations systems allocation protection error and detection security services operating system hardware Functional services Non-functional services 5/47" }, { "page_index": 96, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_006.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_006.png", "page_index": 96, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:04:05+07:00" }, "raw_text": "Operating system services user and other system programs GUI batch command line user interfaces system calls program I/0 file communication resource operations allocation accounting execution systems protection error and detection services security operating system hardware Functional services Non-functional services User interface (Graphical User Interface, Resource allocation, Batch Interface, Command Line Interface). Accounting, Protection Program execution, I/0 operations, and Security File-system manipulation, Communications, Error detection 6/47" }, { "page_index": 97, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_007.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_007.png", "page_index": 97, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:04:06+07:00" }, "raw_text": "Functional services Program execution What is a program ? A computer program is a collection of instructions that performs a specific task when executed by a computer 7/ 47" }, { "page_index": 98, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_008.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_008.png", "page_index": 98, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:04:08+07:00" }, "raw_text": "Functional services Program execution What is a program ? A computer program is a collection of instructions that performs a specific task when executed by a computer OS is able to load a program into memory and to run that program The program is able to end its execution (either normally or abnormally) 8/47" }, { "page_index": 99, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_009.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_009.png", "page_index": 99, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:04:09+07:00" }, "raw_text": "Functional services /O operations & File-system manipulatior I/0 operations A running program may access I/O devices, e.g., recording DVD) For efficiency and protection, OS must provide a means (for programs) to do l/O 590 9/47" }, { "page_index": 100, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_010.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_010.png", "page_index": 100, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:04:11+07:00" }, "raw_text": "Functional services l/O operations & File-system manipulation I/0 operations A running program may access I/O devices, e.g., recording DVD) For efficiency and protection, OS must provide a means (for programs) to do l/0 File-system manipulation Programs need operations on files/directories: list, create delete, read, write, permission management 590 10/ 47" }, { "page_index": 101, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_011.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_011.png", "page_index": 101, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:04:14+07:00" }, "raw_text": "Functional services Communications There are many communications between running programs on a machine between running program on different machines There are two main types of communications shared memory: read/write on a shared of memory message passing: packets with predefined formats are exchanged between running programs Running program A Running program B Shared memory 11/ 47" }, { "page_index": 102, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_012.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_012.png", "page_index": 102, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:04:16+07:00" }, "raw_text": "Functional services Communications There are many communications between running programs on a machine between running program on different machines There are two main types of communications shared memory: read/write on a shared of memory message passing: packets with predefined formats are exchanged between running programs Running program A Running program B A copies value into mem Shared memory 12/ 47" }, { "page_index": 103, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_013.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_013.png", "page_index": 103, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:04:18+07:00" }, "raw_text": "Functional services Communications There are many communications between running programs on a machine between running program on different machines There are two main types of communications shared memory: read/write on a shared of memory message passing: packets with predefined formats are exchanged between running programs Running program A Running program B B copies value from mem Shared memory 13/47" }, { "page_index": 104, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_014.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_014.png", "page_index": 104, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:04:20+07:00" }, "raw_text": "Functional services Communications There are many communications between running programs on a machine between running program on different machines There are two main types of communications shared memory: read/write on a shared of memory message passing: packets with predefined formats are exchanged between running programs Running program A Running program B B copies value from mem Shared memory Running program A Running program B A sends paaket containing value to B Interconnect 14/47" }, { "page_index": 105, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_015.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_015.png", "page_index": 105, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:04:22+07:00" }, "raw_text": "Functional services Error detection Errors can occur everywhere Hardware: CPU, memory, I/O devices,: User program: arithmetic overflow, illegal access of memory, division by zero,... OS should take appropriate actions to detect and correct errors constantly 15/47" }, { "page_index": 106, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_016.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_016.png", "page_index": 106, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:04:24+07:00" }, "raw_text": "Non-functional services Resource allocation OS manages multiple resources (hardware, software) and allocates them to multiple users and multiple running programs Special codes are needed to make allocation efficiently e.g., CPU scheduling, printers allocation Accounting Recording which users to use how much and what kind of resources Usage statistics is useful to reconfigure for improvement of computing services Protection and security Information of multiple users on a networked computer should be controlled by its owner. 16/47" }, { "page_index": 107, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_017.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_017.png", "page_index": 107, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:04:28+07:00" }, "raw_text": "User interface Command interpreter - a special program to allows users to directly enter commands (or programs) (by text) to be performed by the operating system Multiple command 8024 hoaiair: hoeis pwd interpreters (also tal hoa: tof 19: 27 2615 shell) in a modern Desktop 65e el 12: @4 37 Download 7 Google Driy operating system Ap 2014 Movies 748 Example: Bourne shell 18: ec tof 349 D ec 29 17 :58 OvSTCCE Bash shell, C shell, 272 No 2513:51 Bourne-Again shell, Korn shell 17/ 47" }, { "page_index": 108, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_018.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_018.png", "page_index": 108, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:04:32+07:00" }, "raw_text": "User interface Command interpreter - a special program to allows users to directly enter commands (or programs) (by text) to be performed by the operating system Multiple command 8024 hoais pwc interpreters (also 79 Aonlicatior shell) in a modern 64 eb @: 27 65 eb 12: @4 Download operating system 20 Example: Bourne shell 44 D ec 17: 58 u 3 OVSIGC Bash shell, C shell, 272 2s 13:51 Bourne-Again shell, Korn shell GUI - a user friendly graphical interface, input/output is performed in a more interactive way 18/47" }, { "page_index": 109, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_019.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_019.png", "page_index": 109, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:04:35+07:00" }, "raw_text": "Choice of interface Interface choice Kind of interface (CLI or GUI) is mostly one of personal preference System administratiors or power users often prefer CLl With deep system knowledge, using CLI is more efficient and secure Multiple shell commands can be combined into a program, called shell script to perform more complex tasks. Normal users often choose GUl 19/ 47" }, { "page_index": 110, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_020.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_020.png", "page_index": 110, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:04:37+07:00" }, "raw_text": "Choice of interface Interface choice Kind of interface (CLI or GUI) is mostly one of personal preference System administratiors or power users often prefer CLl With deep system knowledge, using CLI is more efficient and secure Multiple shell commands can be combined into a program, called shell script to perform more complex tasks. Normal users often choose GUI Ul can vary from system to system. Therefore, it is not a direct function of operating system 20/47" }, { "page_index": 111, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_021.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_021.png", "page_index": 111, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:04:38+07:00" }, "raw_text": "Outline 1Operating system services 2 System calls and programs 3 Operating system structure 4 Advanced issues 21/47" }, { "page_index": 112, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_022.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_022.png", "page_index": 112, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:04:41+07:00" }, "raw_text": "Example on system call demand File-to-file copy source file destination file Example System Call Sequence Acquire input file name Write prompt to screen Accept input Acquire output file name Write prompt to screen Accept input Open the input file if file doesn't exist,abort Create output file if file exists, abort Loop Read from input file Write to output file Until read fails Close output file Write completion message to screen Terminate normally 22/47" }, { "page_index": 113, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_023.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_023.png", "page_index": 113, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:04:44+07:00" }, "raw_text": "Example on system call demand File-to-file copy source file destination file Example System Call Sequence Acquire input file name Write prompt to screen Accept input Acquire output file name Write prompt to screen Accept input Open the input file if file doesn't exist,abort Create output file if file exists, abort Loop Read from input file Write to output file Until read fails Close output file Write completion message to screen Terminate normally Even a simple program executes many system calls 23/47" }, { "page_index": 114, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_024.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_024.png", "page_index": 114, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:04:46+07:00" }, "raw_text": "API vs. system call interface Application Programming Interface (API) Set of functions available to application programmers Using APl to increase program portability: ability to compile and run on systems with the same API without code modification Working with API is easier than with actual system calls 3 most common APIs: Windows API,POSIX API, Java API System-call interface A run-time support system (e.g., 1ibc) serves as a link between APl and system calls in operating system Each system call is identified by an index number 590 24/47" }, { "page_index": 115, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_025.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_025.png", "page_index": 115, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:04:48+07:00" }, "raw_text": "A call to system call open() user application aoel user mode system call interface kernel mode open() Implementation of open () system call return 25/47" }, { "page_index": 116, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_026.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_026.png", "page_index": 116, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:04:50+07:00" }, "raw_text": "A call to system call open() Standard API System call user application open user mode system call interface kernel mode open() Implementation of open () system call return 26/47" }, { "page_index": 117, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_027.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_027.png", "page_index": 117, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:04:52+07:00" }, "raw_text": "Parameters passing to system call There are 3 ways By registers: not enough for large parameters Stored in block (or table), passing address of the block in parameter X register X:parameters for call use parameters code for load address x from table X system system call13 call 13 user program operating system Pushed onto program's stack, and popped off by OS th 27/ 47" }, { "page_index": 118, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_028.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_028.png", "page_index": 118, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:04:54+07:00" }, "raw_text": "Types of system calls Process control File management Device management Information maintenance Communications Protection 28/47" }, { "page_index": 119, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_029.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_029.png", "page_index": 119, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:04:58+07:00" }, "raw_text": "Process control What is a program ? A computer program is a collection of instructions that performs a specific task when executed by a computer. What is a process ? A program loaded into memory and executing is called a process end(), abort( wait_for_time() loadQ, execute) wait_event,signal_event( create_process() allocate and free memory terminate_process( get_process_attributes( set_process_attributes() 29/47" }, { "page_index": 120, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_030.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_030.png", "page_index": 120, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:05:00+07:00" }, "raw_text": "Execution on single-task OS MS-DOS free memory free memory process command interpreter command interpreter kernel kernel At system startup Running a program 30/ 47" }, { "page_index": 121, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_031.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_031.png", "page_index": 121, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:05:03+07:00" }, "raw_text": "Execution on single-task OS MS-DOS free memory free memory process load progr&m into memory some memory of inter command oreter is overwritten interpreter command interpreter kernel kernel At system startup Running a program 31/ 47" }, { "page_index": 122, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_032.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_032.png", "page_index": 122, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:05:05+07:00" }, "raw_text": "Execution on multiple-task OS FreeBSD process D free memory process C Multiple (user) processes in memory at the same time interpreter process B kernel 32/ 47" }, { "page_index": 123, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_033.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_033.png", "page_index": 123, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:05:07+07:00" }, "raw_text": "Interprocess communication Interprocess communication may take place using eithe message passing or shared memory process A M process A shared memory process B M process B kernel M kernel 590 33/ 47" }, { "page_index": 124, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_034.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_034.png", "page_index": 124, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:05:09+07:00" }, "raw_text": "Interprocess communication Interprocess communication may take place using either message passing or shared memory process A M process A sharedmemory process B M process B kernel M kernel Message passing Shared memory 34/ 47" }, { "page_index": 125, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_035.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_035.png", "page_index": 125, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:05:11+07:00" }, "raw_text": "System programs System programs = system utilities Providing a convenient environment for program development and execution There are categories as follows File manipulation Status information File modification Programming-language support Program loading and execution Communications Background services 35/47" }, { "page_index": 126, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_036.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_036.png", "page_index": 126, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:05:14+07:00" }, "raw_text": "System programs System programs = system utilities Providing a convenient environment for program development and execution There are categories as follows File manipulation Status information File modification Programming-language support Program loading and execution Communications Background services The view of most users on the operating system is defined by system programs, not actual system calls 36/47" }, { "page_index": 127, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_037.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_037.png", "page_index": 127, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:05:16+07:00" }, "raw_text": "Outline 1Operating system services 2 System calls and programs 3 Operating system structure 4 Advanced issues 37/ 47" }, { "page_index": 128, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_038.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_038.png", "page_index": 128, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:05:17+07:00" }, "raw_text": "Simple structure MS-DOS MS-DOS: written to provide the application program most functionality in the least space resident system progran not divided into modules interfaces and levels of MS-DOS device drivers functionality are not well separated ROM BIOs device drivers 38/ 47" }, { "page_index": 129, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_039.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_039.png", "page_index": 129, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:05:21+07:00" }, "raw_text": "Simple structure Traditional UNIX Limited structure with limited functionality Consists of 2 parts: kernel and system programs (the users) shells and commands compilers and interpreters system libraries system-call intertace to the kernel signals terminal file system CPU scheduling handling swapping block l/O page replacement character l/O system system demand paging terminal drivers disk and tape drivers virtual memory kernel interface to the hardware terminal controllers device controllers memory controllers terminals disks and tapes physical memory Considered to be layered to some extent: system-call inteface, kernel and hardware interface Enormous amount of functionality combined in one level -? monolithic structure 39/47" }, { "page_index": 130, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_040.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_040.png", "page_index": 130, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:05:24+07:00" }, "raw_text": "Layered approach layer N user interface layer 1 OS is broken into several layers layer 0 Layer M provides data structures hardware & routines for upper layer, and can invoke operations of lower layer 40/47" }, { "page_index": 131, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_041.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_041.png", "page_index": 131, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:05:26+07:00" }, "raw_text": "Layered approach layer N user interface .. layer 1 OS is broken into several layers layer 0 Layer M provides data structures hardware & routines for upper layer, and can invoke operations of lower layer Advantages (due to modularity): easy to Disadvantages: Not easy to define layers debug; simple in design and (which layer is above/below which layer); implementation; secure inefficiency 41/ 47" }, { "page_index": 132, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_042.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_042.png", "page_index": 132, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:05:29+07:00" }, "raw_text": "Microkernel structure Moves as much from the kernel into \"user\" space Communication takes place between user modules using message passing Application File Device user Program System Driver mode Interprocess memory CPU scheduling kernel Communication managment mode microkernel hardware 42/47" }, { "page_index": 133, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_043.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_043.png", "page_index": 133, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:05:32+07:00" }, "raw_text": "Microkernel structure Moves as much from the kernel into \"user\" space Communication takes place between user modules using message passing Application File Device user Program System Driver mode memory CPU Interprocess kernel Communication managment scheduling mode microkernel hardware Advantages (due to modularity): easy to Disadvantages: system-function overhead extend kernel; easier to port OS to new architectures; more reliable (less code running in kernel); more secure 43/47" }, { "page_index": 134, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_044.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_044.png", "page_index": 134, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:05:35+07:00" }, "raw_text": "Modules-based structure Best current methodology is loadable kernel modules Only need core services Additional services can be loaded as modules in boot time and run time Additional services have to be recompiled to add new features Idea of modules-based kernel more flexible than layered approach and also similar to microkernel structure scheduling device and classes file systems bus drivers core Solaris kernel loadable miscellaneous modules system calls STREAMS executable modules formats 44/ 47" }, { "page_index": 135, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_045.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_045.png", "page_index": 135, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:05:38+07:00" }, "raw_text": "Hybrid structure In practice, very few OS adopt a single, stricted defined structure graphical user interface Aqua application environments and services Cocoa Touch Java Cocoa Quicktime BSD Media Services kernel environment BSD Core Services Mach Core Os I/O kit kernel extension Figure 2.16 The Mac OS X structure. Figure 2.17_Architecture of Apple's iOS Applications Application Framework Libraries Android runtime SQLite openGL Core Libraries surface media manager framework Dalvik virtual machine webkit libc Linux kernel Figure 2.18Architecture of Google's Android. 45/47" }, { "page_index": 136, "chapter_num": 2, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_046.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_2/slide_046.png", "page_index": 136, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:05:40+07:00" }, "raw_text": "Outline 1Operating system services 2 System calls and programs 3Operating system structure 4 Advanced issues 46/47" }, { "page_index": 137, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_001.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_001.png", "page_index": 137, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:05:41+07:00" }, "raw_text": "Processes Tran, Van Hoai Faculty of Computer Science & Engineering HCMC University of Technology E-mail: hoai@hcmut.edu.vn (partly based on slides of Le Thanh Van) 1/71" }, { "page_index": 138, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_002.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_002.png", "page_index": 138, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:05:44+07:00" }, "raw_text": "Outline 1l Process concept 2 Process scheduling 3 Operations on processes 4 Interprocess communication 5 Communication in client-server model 2/71" }, { "page_index": 139, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_003.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_003.png", "page_index": 139, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:05:46+07:00" }, "raw_text": "Outline 1 Process concept 2 Process scheduling 3 Operations on processes 4 Interprocess communication 5 Communication in client-server model 3/71" }, { "page_index": 140, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_004.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_004.png", "page_index": 140, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:05:47+07:00" }, "raw_text": "What is a process The textbook A process is a program in execution Oxford dictionary A process is a series of actions or steps taken in order to achieve a particular end 590 4/71" }, { "page_index": 141, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_005.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_005.png", "page_index": 141, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:05:48+07:00" }, "raw_text": "What is a process The textbook A process is a program in execution Oxford dictionary A process is a series of actions or steps taken in order to achieve a particular end process execution must progress in sequential fashion job and process are used interchangeably 590 5/71" }, { "page_index": 142, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_006.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_006.png", "page_index": 142, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:05:49+07:00" }, "raw_text": "Process vs. Program Process is not the same as \"program 6/71" }, { "page_index": 143, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_007.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_007.png", "page_index": 143, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:05:51+07:00" }, "raw_text": "Process vs. Program Process is not the same as \"program Program is a passive executable code on disk; process is an active entity = 7/71" }, { "page_index": 144, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_008.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_008.png", "page_index": 144, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:05:53+07:00" }, "raw_text": "Process vs. Program Process is not the same as \"program Program is a passive executable code on disk; process is an active entity A same program can be executed into multiple processes (normally by mutiple users 8/71" }, { "page_index": 145, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_009.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_009.png", "page_index": 145, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:05:55+07:00" }, "raw_text": "Process vs. Program Process is not the same as \"program' Program is a passive executable code on disk; process is an active entity A same program can be executed into multiple processes (normally by mutiple users) Components of a process program counter stack data section 9/71" }, { "page_index": 146, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_010.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_010.png", "page_index": 146, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:05:57+07:00" }, "raw_text": "Process vs. Program Process is not the same as \"program' Program is a passive executable code on disk; process is an active entity A same program can be executed into multiple processes (normally by mutiple users) Components of a process program counter stack data section User and OS processes jobs (batch system) tasks (time-shared system process (generic) 10/ 71" }, { "page_index": 147, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_011.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_011.png", "page_index": 147, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:06:00+07:00" }, "raw_text": "Process vs. Program Process is not the same as \"program' Program is a passive executable code on disk; process is an active entity A same program can be executed into multiple processes (normally by mutiple users) Components of a process program counter stack data section User and OS processes jobs (batch system) tasks (time-shared system process (generic) J. Brisendine (writer) Life is a process, not a thing 11/71" }, { "page_index": 148, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_012.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_012.png", "page_index": 148, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:06:02+07:00" }, "raw_text": "Process in memory max stack heap data text 0 12/71" }, { "page_index": 149, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_013.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_013.png", "page_index": 149, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:06:04+07:00" }, "raw_text": "Process in memory max Temporary data stack heap Dynamically allocated memory - data Global variables text Program code 0 13/ 71" }, { "page_index": 150, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_014.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_014.png", "page_index": 150, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:06:06+07:00" }, "raw_text": "Process in execution Conceptual model of process execution Process A Process B Process D Process C time 14/71" }, { "page_index": 151, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_015.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_015.png", "page_index": 151, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:06:08+07:00" }, "raw_text": "Process in execution Conceptual model of Actual interleaved exe- process execution cution of the processes Process B Process A Process A Process D Process B Process D Process A Process C Process B Process D Process A Process C Process D Process C Process C Process C Process C time 15/ 71" }, { "page_index": 152, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_016.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_016.png", "page_index": 152, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:06:10+07:00" }, "raw_text": "Process state 2-state process model A process is either \"running\" or \"not running dispatch entry exit not running Running pause 16/71" }, { "page_index": 153, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_017.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_017.png", "page_index": 153, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:06:12+07:00" }, "raw_text": "Process state 2-state process model A process is either \"running\" or \"not running dispatch entry exit not running Running pause Queueing diagram queue dispatch enter exit CPU 17/71" }, { "page_index": 154, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_018.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_018.png", "page_index": 154, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:06:14+07:00" }, "raw_text": "Process state 2-state process model A process is either \"running\" or \"not running dispatch entry exit not running Running pause Queueing diagram aueue Weakness 2-state model cannot deal with l/0 operations 18/71" }, { "page_index": 155, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_019.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_019.png", "page_index": 155, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:06:16+07:00" }, "raw_text": "Process state As a process executes, it changes state new: the process is being created running: its instructions are being executed waiting: the process is waiting for some event to occur ready: the process is waiting to be assigned to CPU terminated: the process has finished execution 19/71" }, { "page_index": 156, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_020.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_020.png", "page_index": 156, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:06:18+07:00" }, "raw_text": "Process state As a process executes, it changes state new: the process is being created running: its instructions are being executed waiting: the process is waiting for some event to occur ready: the process is waiting to be assigned to CPU terminated: the process has finished execution new admitted interrupt exit terminated ready running scheduler dispatch l/O or event completion I/O or event wait waiting 20/71" }, { "page_index": 157, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_021.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_021.png", "page_index": 157, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:06:21+07:00" }, "raw_text": "Process control block (PCB) Following information is for a process in operating system, stored in process control block Process state Program counter CPU registers process state process number CPU scheduling information (e.g. program counter process priority, pointers to scheduling queues) registers Memory management information memory limits (e.g., base/limit registers, segment list of open files tables) Accounting information I/O status information (e.g., open files) 590 21/71" }, { "page_index": 158, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_022.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_022.png", "page_index": 158, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:06:24+07:00" }, "raw_text": "Process switching PCBs are used for process switching in a mutiple tasking operating system process P. operating system process P, interrupt or system call executing save state into PCB - idle 4 reload state from PCB, idle interrupt or system call executing save state into PCB, -idle reload state from PCB, executing 22/71" }, { "page_index": 159, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_023.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_023.png", "page_index": 159, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:06:26+07:00" }, "raw_text": "Context switching When CPU switches to another process, the system must save the state of the old process and load the saved state for the new process Context-switch time is overhead. The system does no useful work while switching Time dependent on hardware support Ex.: UltraSPARC uses multiple register sets 23/71" }, { "page_index": 160, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_024.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_024.png", "page_index": 160, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:06:27+07:00" }, "raw_text": "Outline 1 Process concept 2 Process scheduling 3 Operations on processes 4 Interprocess communication 5 Communication in client-server model 24/71" }, { "page_index": 161, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_025.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_025.png", "page_index": 161, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:06:29+07:00" }, "raw_text": "Process scheduling queues In 5-state process model, we need more than 1 queue to store jobs 25/71" }, { "page_index": 162, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_026.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_026.png", "page_index": 162, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:06:30+07:00" }, "raw_text": "Process scheduling queues In 5-state process model, we need more than 1 queue to store jobs Queue types: Job queue: set of all processes in the system Ready queue: set of all processes residing in main memory, ready, and waiting to execute Device queues: set of processes waiting for an l/O device Process migration between the various queues 26/71" }, { "page_index": 163, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_027.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_027.png", "page_index": 163, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:06:35+07:00" }, "raw_text": "Process queues as linked lists queue header PCB PCB2 ready head queue tail registers registers . . . . mag head tape 2 unit 0 tail 2 mag head tape PCB3 PCB14 PCB6 unit 1 tail 2 disk head unit 0 tail PCB5 terminal head : unit 0 tail . 27/ 71" }, { "page_index": 164, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_028.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_028.png", "page_index": 164, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:06:37+07:00" }, "raw_text": "Queueing diagram ready queue CPU 1/0 I/O queue I/O request time slice expired child fork a executes child interrupt wait for an occurs interrupt 28/71" }, { "page_index": 165, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_029.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_029.png", "page_index": 165, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:06:38+07:00" }, "raw_text": "Schedulers Processes are selected from the queues for migration, under some selection strategies managed by schedulers = 29/71" }, { "page_index": 166, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_030.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_030.png", "page_index": 166, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:06:40+07:00" }, "raw_text": "Schedulers Processes are selected from the queues for migration, under some selection strategies managed by schedulers. Long-term scheduler (or job scheduler): selects which processes should be brought into the ready queue Frequency: only necessary when a process leaves Efficiency depends strongly on I/O bound or CPU bound 30/71" }, { "page_index": 167, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_031.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_031.png", "page_index": 167, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:06:43+07:00" }, "raw_text": "Schedulers Processes are selected from the queues for migration, under some selection strategies managed by schedulers. Long-term scheduler (or job scheduler): selects which processes should be brought into the ready queue Frequency: only necessary when a process leaves Efficiency depends strongly on I/O bound or CPU bound Short-term scheduler (or CPU scheduler): selects which process should be executed next and allocates CPU Frequency: at least once every 100 milliseconds (quantum time) Effciency depends strongly on process switching time 31/71" }, { "page_index": 168, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_032.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_032.png", "page_index": 168, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:06:46+07:00" }, "raw_text": "Schedulers Processes are selected from the gueues for migration, under some selection strategies managed by schedulers. Long-term scheduler (or job scheduler): selects which processes should be brought into the ready queue Frequency: only necessary when a process leaves Efficiency depends strongly on I/O bound or CPU bound Short-term scheduler (or CPU scheduler): selects which process should be executed next and allocates CPU Frequency: at least once every 100 milliseconds (quantum time) Effciency depends strongly on process switching time Job scheduler is for batch systems CPU scheduler is for time-sharing systems 32/71" }, { "page_index": 169, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_033.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_033.png", "page_index": 169, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:06:48+07:00" }, "raw_text": "Medium-term scheduler swap in partially executed swap out swapped-out processes ready queue CPU >end I/O waiting 1/0 queues Swaping is useful to release some resources (for other ready processes) Mobile OSs utilize swaping to save memory and power 33/ 71" }, { "page_index": 170, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_034.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_034.png", "page_index": 170, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:06:49+07:00" }, "raw_text": "Outline Process concept 2 Process scheduling 4 Interprocess communication 5 Communication in client-server model 34/71" }, { "page_index": 171, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_035.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_035.png", "page_index": 171, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:06:52+07:00" }, "raw_text": "Process tree Process tree Processes are organized in a form of tree init pid= 1 Login kthreadd sshd p=a= 8415 pid=2 pid=3028 bash khelper pdf_ush sshd pid=841f pia = 6 200 pid=360 ps emacs tcsch p=d = 9204 Process identifier pid=40C5 35/ 71" }, { "page_index": 172, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_036.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_036.png", "page_index": 172, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:06:54+07:00" }, "raw_text": "Process creation Parent creates children processes 36/71" }, { "page_index": 173, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_037.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_037.png", "page_index": 173, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:06:56+07:00" }, "raw_text": "Process creation Parent creates children processes Resource sharing: 3 possibilities Parent and children share all resources Children share subset of parent's resources Parent and children share no resources Execution: 2 possibilities Parent and children execute concurrently Parent waits until children terminate Address-space: 2 possibilities Children duplicate program & data of the parent Children load new program 37/71" }, { "page_index": 174, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_038.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_038.png", "page_index": 174, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:06:59+07:00" }, "raw_text": "fork() system call #include #include #include Memory Memory int main(O) t pid_t pid; /* fork a child */ Process Parent copy pid = fork(); pid=xxx pid=xxx fork() if ( pid< 0 )f /* error occurs */ fprintf( stderr, \"Fork failedn\" ); return 1: Child } else if ( pid == 0 ){ /* child process */ pid=0 execlp( \"/bin/ls\", \"ls\", NULL ); } else { /* parent process */ wait(NULL); printf( \"Child complete!n\" ); } return 0; } parent (pid > 0) wait() parent resumes parent pid = fork() exec() exit() child(pid= 0) 38/71" }, { "page_index": 175, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_039.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_039.png", "page_index": 175, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:07:01+07:00" }, "raw_text": "Process termination Process executes the last statement and asks OS to decide it (exit()) Output data from child to parent (via wait() Process's resources are deallocated by OS 39/71" }, { "page_index": 176, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_040.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_040.png", "page_index": 176, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:07:04+07:00" }, "raw_text": "Process termination Process executes the last statement and asks OS to decide it (exit()) Output data from child to parent (via wait() Process's resources are deallocated by OS Parent may terminate execution of children processes (abort() Child has exceeded allocated resources Task assigned to child is no longer required Parent is exiting OS does not allow child to continue if its parent terminates = Cascading termination Parent did not invoke wait() and instead terminated, thereby leaving its child processes as orphans If process stopped execution (exit( called) but still in OS's process table, (due to parent process does not receive any from the child or does not invoke wait()), it is zombie. 40/71" }, { "page_index": 177, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_041.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_041.png", "page_index": 177, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:07:07+07:00" }, "raw_text": "Outline 1 Process concept 2 Process scheduling 3Operations on processes 4 Interprocess communication 5 Communication in client-server model 41/71" }, { "page_index": 178, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_042.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_042.png", "page_index": 178, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:07:10+07:00" }, "raw_text": "Process relationship Independent process: cannot affect or be affected by others Independent process does not share data Cooperating process: can affect or be affected by others Cooperating process does share data Reasons for process cooperation Information sharing Computation speedup Modularity Convenience 590 42/71" }, { "page_index": 179, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_043.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_043.png", "page_index": 179, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:07:13+07:00" }, "raw_text": "Interprocess communication (IPC) IPC process A process A lPC is used to exchange process B shared memory process B data and information 2 IPC models: message queue shared-memory and mamm2m3 kernel kernel message-passing Shared-memory: fast Message-passing: no conflict ; suitable for distributed system; better performance on multiple core architecture 43/71" }, { "page_index": 180, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_044.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_044.png", "page_index": 180, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:07:16+07:00" }, "raw_text": "Shared-memory All things for IPC are decided by processes in communication themselves, not under OS's control Producer Consumer item next_produced; item next_consumed; while (true{ while (true){ while ((( in + 1 % BUFFER_SIZE == out while ( in == out ) ; /* do nothing */ ; /* do nothing */ buffer[ in ] = next_produced; next_consumed = buffer[ out ] in = ( in + 1 ) % BUFFER_SIZE; out = ( out + 1 ) % BUFFER_SIZE; } At most BUFFER SIZE-1 items in the buffer at the same time 44/71" }, { "page_index": 181, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_045.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_045.png", "page_index": 181, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:07:18+07:00" }, "raw_text": "Message-passing IPC facility provides at least 2 operations send(message) receive(message) If P and Q wish to communicate, they need to establish a communication link between them exchange a message via send()/receive() Methods to implement communication link physical link: shared memory, hardware bus, network, logical link: by following methods Direct or indirect communication Synchronous or asynchronous communication Automatic or explicit buffering 45/71" }, { "page_index": 182, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_046.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_046.png", "page_index": 182, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:07:20+07:00" }, "raw_text": "Message-passing Implementation questions How are links establised ? Can a link be associated with more than two processes ? How many links can there be between every pair of communicating processes ? What is the capacity of a link ? Is the size of a message that the link can accommodate fixed or variable ? Is a link unidirectional or bi-directional ? 46/71" }, { "page_index": 183, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_047.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_047.png", "page_index": 183, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:07:23+07:00" }, "raw_text": "Message-passing Direct communication Explicit name of sender and receiver must be given send(P,message) receive(Q,message) Links are established automatically A link is associated with exactly one pair of communicating processes The link may be unidirectional, but is usually bi-directional 590 47/ 71" }, { "page_index": 184, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_048.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_048.png", "page_index": 184, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:07:25+07:00" }, "raw_text": "Message-passing Direct communication Explicit name of sender and receiver must be given send(P,message) receive(Q,message) Links are established automatically A link is associated with exactly one pair of communicating processes The link may be unidirectional, but is usually bi-directional Disadvantage Direct communication has poor modularity 48/71" }, { "page_index": 185, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_049.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_049.png", "page_index": 185, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:07:27+07:00" }, "raw_text": "Message-passing Indirect communication (1 Messages are sent to or received from a mailbox or port send(A,message) receive(A,message) A is a mailbox with unique identification A link between 2 processes is established only if both have a shared mailbox A link may be associated with more than 2 processes Between each pair, several different links may exist 49/71" }, { "page_index": 186, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_050.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_050.png", "page_index": 186, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:07:28+07:00" }, "raw_text": "Message-passing Indirect communication (1) P1, P2 and P3 share a mailbox P1 sends a message P2 and P3 receive Who gets the message ? 50/71" }, { "page_index": 187, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_051.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_051.png", "page_index": 187, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:07:31+07:00" }, "raw_text": "Message-passing Indirect communication (1 P,, P, and P3 share a mailbox q P1 sends a message P2 and P3 receive Who gets the message ? It depends on which of the following methods is chosen A link associated with 2 processes at most Allowing one process to perform receive() at a time An algorithm to choose which process to perform receive() (e.g., round-robin) 51/71" }, { "page_index": 188, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_052.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_052.png", "page_index": 188, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:07:34+07:00" }, "raw_text": "Message-passing Indirect communication (1 P,, P, and P3 share a mailbox P1 sends a message P, and P3 receive Who gets the message ? It depends on which of the following methods is chosen A link associated with 2 processes at most Allowing one process to perform receive() at a time An algorithm to choose which process to perform receive() (e.g., round-robin) A mailbox may be owned by a process or OS. If it owned by OS, system calls must be provided to 1 Create a new mailbox 2 Send and receive messages through the mailbox 3 Delete a mailbox 52/ 71" }, { "page_index": 189, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_053.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_053.png", "page_index": 189, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:07:36+07:00" }, "raw_text": "Message-passing Synchronization send() and receive() can be blocking (synchronous) or non-blocking (asynchronous) 53/71" }, { "page_index": 190, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_054.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_054.png", "page_index": 190, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:07:37+07:00" }, "raw_text": "Message-passing Synchronization send() and receive() can be blocking (synchronous) or non-blocking (asynchronous) Sending Message Waits for message to be received source:cfd-online.com 590 54/71" }, { "page_index": 191, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_055.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_055.png", "page_index": 191, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:07:39+07:00" }, "raw_text": "Message-passing Synchronization send() and receive() can be blocking (synchronous) or non-blocking (asynchronous) Sending Message ending Message Performs some work while Waits for message to be received message is being sent source: cfd-online.com source: cfd-online.com) 55/71" }, { "page_index": 192, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_056.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_056.png", "page_index": 192, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:07:41+07:00" }, "raw_text": "Message-passing Buffering Message queues attached to the link; implemented in one of 3 ways Zero capacity: 0 message; sender must wait for receiver Bounded capacity: finite length of n; sender must wait if link is full Unbounded capacity: infinite length; sender never waits 56/71" }, { "page_index": 193, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_057.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_057.png", "page_index": 193, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:07:43+07:00" }, "raw_text": "Outline Process concept 2 Process scheduling Operations on processes 4 Interprocess communication 5 Communication in client-server model 57/ 71" }, { "page_index": 194, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_058.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_058.png", "page_index": 194, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:07:45+07:00" }, "raw_text": "Client-server communication Internet Clients Server (source: wikipedia) 58/71" }, { "page_index": 195, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_059.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_059.png", "page_index": 195, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:07:46+07:00" }, "raw_text": "Client-server communication Internet Clients Server source: wikipedia) Sockets Remote Procedure Calls Remote Method Invocation (Java) oes 59/71" }, { "page_index": 196, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_060.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_060.png", "page_index": 196, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:07:47+07:00" }, "raw_text": "Socket Socket is an endpoint, consisting of lP address port Socket 161.25.19.8:1625 refers to port 1625 on host 161.25.19.8 60/71" }, { "page_index": 197, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_061.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_061.png", "page_index": 197, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:07:49+07:00" }, "raw_text": "Socket Socket is an endpoint, consisting of IP address port 161.25.19.8 Socket Server 1 161.25.19.8:1625 Client 2 refers to port 1625 Client 1 Server 2 on host 161.25.19.8 Server 3 Client 3 1625 2 80 590 61/ 71" }, { "page_index": 198, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_062.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_062.png", "page_index": 198, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:07:51+07:00" }, "raw_text": "Socket communication host X (146.86.5.20) socket 146.86.5.20:1625 web server (161.25.19.8) socket 161.25.19.8:80 62/ 71" }, { "page_index": 199, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_063.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_063.png", "page_index": 199, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:07:54+07:00" }, "raw_text": "Socket communication host X (146.86.5.20) socket 146.86.5.20:1625) web server (161.25.19.8) socket (161.25.19.8:80 Socket is low-level form of communication in which data is transferred in unstructured stream. 63/ 71" }, { "page_index": 200, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_064.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_064.png", "page_index": 200, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:07:56+07:00" }, "raw_text": "Remote procedure call (RPC) Remote procedure call (RPC) abstracts procedure calls between processes on networked systems Messages exchanged in RPC are well-structured (function name, parameters Stubs: client-side proxy for the actual procedure on the server separate stub for each separate remote procedure stub locates port on server and marshalls parameters into a package (by a mechanism of External Data Representation (XDR)) The server-side stub receives this message, unpacks the marshalled parameters, and peforms the procedure on the server 64/71" }, { "page_index": 201, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_065.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_065.png", "page_index": 201, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:08:01+07:00" }, "raw_text": "Execution of RPC client messages server user calls kernel to send RPC message to procedurex kernel sends From.clieni To:server matchmaker message to Portmatchmaker receives matchmaker to Readdress message,looks findport number for RPC X up answer From:server kernel places To: client matchmaker port Pin user Port: kernel replies to client RPC message ReRPC X with port P Port:P From:client daemon kernelsends To:server listening to RPC Port: port P port Preceives message From:RPC daemon kernel receives Port:P processes reply,passes To:client request and it to user Port:kernel processes send output 65/ 71" }, { "page_index": 202, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_066.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_066.png", "page_index": 202, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:08:05+07:00" }, "raw_text": "Execution of RPC client messages server user calls kernel to send RPC message to procedurex kernel sends Fromclient To:server matchmaker message to Port:matchmake receives matchmakerto Readdress message,looks findport number for RPC X up answer From:server kernel places To: client matchmaker port Pin user Port: kernel replies to client RPCmessage Re: RPC X with port P Port:P From:client daemon kernel sends To:server listening to RPC Port:port P port Preceives message RPC is useful to implement services for distributed systems reply,passes To: client request and it to user Port:kernel processes send output 66/ 71" }, { "page_index": 203, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_067.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_067.png", "page_index": 203, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:08:07+07:00" }, "raw_text": "Remote method invocation A Java mechanism and quite similar to RPC RMI allows a Java program on one machine to invoke a method on a remote object client remote object val = server.someMethod(A,B) boolean someMethod (Object x, Object y) implementation of someMethod t 1 stub skeleton A, B, someMethod boolean return value 67/ 71" }, { "page_index": 204, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_068.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_068.png", "page_index": 204, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:08:09+07:00" }, "raw_text": "Pipe Pipe is one of very first IPC mechanisms in early UNIX Ordinary pipe is unidirectional Pipes can be treated as a special type of file parent child fd(0) fd(1) fd(0) fd(1) pipe read end write end 68/71" }, { "page_index": 205, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_069.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_069.png", "page_index": 205, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:08:15+07:00" }, "raw_text": "Anonymous pipe #include #include #include if ( pid > 0 )f #include /* close unused end of pipe */ close( fd[READ_END] ); #define BUFFER_SIZE 25 #define READ_END 0 /* write to the pipe */ #define WRITE_END 1 write( fd[WRITE_END], write_msg, strlen(write_msg + 1 ); int main(void) /* close the write end */ char write_msg[BUFFER_SIZE] = \"Greetings\"; close( fd[WRITE_END] ); char read_msg[BUFFER_SIZE]; } intfd[2]; else { pid_t pid; /* close unused end of pipe */ close( fd[WRITE_END] ); /* create the pipe */ if ( pipe( fd ) == 1 ){ /* write to the pipe */ fprintf( stderr, \"Pipe failed!n\" ); read( fd[READ_END], read_msg, BUFFER_SIZE ); return 1; } /* close the read end */ close( fd[READ_END]); /* fork a child process */ } pid= fork(); if ( pid< 0 ){ return 0; fprintf( stderr, \"Fork failed!n\" ); } return 1; } 69/71" }, { "page_index": 206, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_070.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_070.png", "page_index": 206, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:08:16+07:00" }, "raw_text": "Homeworks Read materials on Thread: textbook, slides (Le Thanh Van) There is quiz in April 1,2021) on Process & Thread 2l 70/71" }, { "page_index": 207, "chapter_num": 3, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_071.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_3/slide_071.png", "page_index": 207, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:08:19+07:00" }, "raw_text": "Homeworks 1 Read materials on Thread: textbook, slides (Le Thanh Van) 2 There is quiz in April 1, 2021) on Process & Thread 3 Quiz grade (of students in 2017) Histogram of grade$X7 8 6 2 4 5 6 7 8 9 10 grade$X7 71/71" }, { "page_index": 208, "chapter_num": 4, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_001.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_001.png", "page_index": 208, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:08:20+07:00" }, "raw_text": "Threads Tran, Van Hoai Faculty of Computer Science & Engineering HCMC University of Technology E-mail: hoai@hcmut.edu.vn (partly based on slides of Le Thanh Van) 1/20" }, { "page_index": 209, "chapter_num": 4, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_002.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_002.png", "page_index": 209, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:08:21+07:00" }, "raw_text": "Outline Thread and its benefits 2 Multithreading models 2/20" }, { "page_index": 210, "chapter_num": 4, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_003.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_003.png", "page_index": 210, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:08:23+07:00" }, "raw_text": "Outline Thread and its benefits 2Multithreading models 3/20" }, { "page_index": 211, "chapter_num": 4, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_004.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_004.png", "page_index": 211, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:08:25+07:00" }, "raw_text": "Motivation An application normally has several controls A word-processor has a control on mouse input, a control for keyboard, a control for function completion, The model \"an application = a process\" does not catch up with multiprocessor environment A modern processor has multiple cores 4/20" }, { "page_index": 212, "chapter_num": 4, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_005.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_005.png", "page_index": 212, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:08:28+07:00" }, "raw_text": "Single vs. Multithreaded processes code data files code data files registers stack registers registers registers stack stack stack thread thread single-threaded process multithreaded process 5/20" }, { "page_index": 213, "chapter_num": 4, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_006.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_006.png", "page_index": 213, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:08:30+07:00" }, "raw_text": "Single vs. Multithreaded processes code data files code data files registers stack registers registers registers stack stack stack thread thread light weight process single-threadedprocess multithreaded process With the above model, one server (by one process) can service several concurrent requests (2) create new 1) request thread to service the request client server thread 3 resume listening for additional client reguests 6/20" }, { "page_index": 214, "chapter_num": 4, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_007.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_007.png", "page_index": 214, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:08:33+07:00" }, "raw_text": "Benefits of multithreading model Responsiveness: a program (process) continues running even if a part of it is blocked or is performing a lengthy operation. Resource sharing: By defaults, threads share memory and resources of its process => same address-space. Economy: Resource allocation, context-switching are time-consuming. Threads do it more economically Scalability: threads may be running in parallel on different processing cores. 2 + 4 6 + 8 1 +2 9 + 5 7/20" }, { "page_index": 215, "chapter_num": 4, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_008.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_008.png", "page_index": 215, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:08:36+07:00" }, "raw_text": "Benefits of multithreading model Responsiveness: a program (process) continues running even if a part of it is blocked or is performing a lengthy operation. Resource sharing: By defaults, threads share memory and resources of its process => same address-space. Economy: Resource allocation, context-switching are time-consuming. Threads do it more economically Scalability: threads may be running in parallel on different processing cores. concurrency vs. parallelism Concurrency = many tasks are allowed to make progress Parallelism = many tasks can be performed simultaneously 8/20" }, { "page_index": 216, "chapter_num": 4, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_009.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_009.png", "page_index": 216, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:08:37+07:00" }, "raw_text": "Programming challenges Identifying tasks: how to divide an application into tasks ? Balance: how tasks do the same amount of workload ? Data splitting: how data of tasks to be splitted ? Data dependency: data surely does not live alone, how they are synchronized ? Testing and debugging: how to follow many different execution paths ? 9/20" }, { "page_index": 217, "chapter_num": 4, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_010.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_010.png", "page_index": 217, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:08:39+07:00" }, "raw_text": "Programming challenges Identifying tasks: how to divide an application into tasks ? Balance: how tasks do the same amount of workload ? Data splitting: how data of tasks to be splitted ? Data dependency: data surely does not live alone, how they are synchronized ? Testing and debugging: how to follow many different execution paths ? Textbook 'Many computer science educators believe that software development must be taught with increased emphasis on parallel programming. 590 10/20" }, { "page_index": 218, "chapter_num": 4, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_011.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_011.png", "page_index": 218, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:08:43+07:00" }, "raw_text": "Do not expect much on multiple threading 16 Ideal Speedup S=0.05 S = 0.10 14 =0.50 12 10 dnpeeds 6 2 0 0 2 4 6 8 10 12 14 16 Number of Processing Cores Amdahl's Law 1 speedup N in which, S: serial portion (in percentage): N: number of cores (threads) 11/20" }, { "page_index": 219, "chapter_num": 4, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_012.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_012.png", "page_index": 219, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:08:44+07:00" }, "raw_text": "Outline Thread and its benefits 2 Multithreading models 12/20" }, { "page_index": 220, "chapter_num": 4, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_013.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_013.png", "page_index": 220, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:08:46+07:00" }, "raw_text": "User vs. Kernel threads User threads Thread management done by user-level thread library Examples: POSIX Pthreads, Mach C-threads, Solaris threads Kernel threads Thread management done at kernel-level by OS Examples: Windows, Linux, Max OS X, Solaris 13/20" }, { "page_index": 221, "chapter_num": 4, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_014.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_014.png", "page_index": 221, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:08:48+07:00" }, "raw_text": "User vs. Kernel threads User threads Thread management done by user-level thread library Examples: POSlX Pthreads, Mach C-threads, Solaris threads Kernel threads Thread management done at kernel-level by OS Examples: Windows, Linux, Max OS X, Solaris A relationship must exist between user threads and kernel threads 14/20" }, { "page_index": 222, "chapter_num": 4, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_015.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_015.png", "page_index": 222, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:08:50+07:00" }, "raw_text": "Many-to-one Mapping many user-level threads to user thread one kernel thread Issues: kernelthread 15/20" }, { "page_index": 223, "chapter_num": 4, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_016.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_016.png", "page_index": 223, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:08:51+07:00" }, "raw_text": "Many-to-one Mapping many user-level threads to user thread one kernel thread Issues: if a thread is blocked, the entire process is blocked too. Unable to run in parallel on multicore systems kernelthread 16/20" }, { "page_index": 224, "chapter_num": 4, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_017.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_017.png", "page_index": 224, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:08:53+07:00" }, "raw_text": "One-to-one user thread kernelthread Mapping each user thread to a kernel thread Issues: 17/ 20" }, { "page_index": 225, "chapter_num": 4, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_018.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_018.png", "page_index": 225, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:08:55+07:00" }, "raw_text": "One-to-one user thread -kernelthread Mapping each user thread to a kernel thread Issues: Creating a user thread means creating a kernel thread = overhead Number of threads is restricted Linux,Windows 18/20" }, { "page_index": 226, "chapter_num": 4, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_019.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_019.png", "page_index": 226, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:08:56+07:00" }, "raw_text": "Many-to-many Multiplexing many user-level threads to a smaller or equal number of kernel user thread threads Issues: kemel thread 19/20" }, { "page_index": 227, "chapter_num": 4, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_020.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_4/slide_020.png", "page_index": 227, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:08:58+07:00" }, "raw_text": "Many-to-many Multiplexing many user-level threads to a smaller or equal number of kernel user thread threads Issues: Not so many OS implementations apply this model, (Solaris supports) kemel thread 20/20" }, { "page_index": 228, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_001.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_001.png", "page_index": 228, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:08:59+07:00" }, "raw_text": "CPU scheduling Tran, Van Hoai Faculty of Computer Science & Engineering HCMC University of Technology E-mail: hoai@hcmut.edu.vn (partly based on slides of Le Thanh Van) 1/72" }, { "page_index": 229, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_002.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_002.png", "page_index": 229, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:09:01+07:00" }, "raw_text": "Outline 1 Basic concepts 2 Scheduling algorithms Scheduling criteria Scheduling algorithms 3 Multiple-processor scheduling 4 Real-time scheduling 5 Algorithm evaluation 590 2/72" }, { "page_index": 230, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_003.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_003.png", "page_index": 230, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:09:03+07:00" }, "raw_text": "Outline 1 Basic concepts 2 Scheduling algorithms Scheduling criteria Scheduling algorithms 3 Multiple-processor scheduling 4 Real-time scheduling 5 Algorithm evaluation 3/72" }, { "page_index": 231, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_004.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_004.png", "page_index": 231, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:09:05+07:00" }, "raw_text": "Why do we need CPU scheduling ? (1) Maximum CPU utilization\" obtained with multiprogramming 4/72" }, { "page_index": 232, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_005.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_005.png", "page_index": 232, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:09:07+07:00" }, "raw_text": "Why do we need CPU scheduling ? (1) load store add store CPU burst Maximum CPU read from file 'utilization\" obtained with wait for l/O I/O burst multiprogramming store increment index CPU burst Process execution consists write to file of a cycle of CPU wait for l/O I/O burst execution (CPU bound) and l/O wait (l/O bound) load store add store CPU burst CPU burst read from file l/O burst wait for l/O I/O burst 5/72" }, { "page_index": 233, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_006.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_006.png", "page_index": 233, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:09:10+07:00" }, "raw_text": "Why do we need CPU scheduling ? (2) process 2 proe 1 2 2 3 1 pooe 1 1 2 2 3 time resource 0/ time 6/72" }, { "page_index": 234, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_007.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_007.png", "page_index": 234, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:09:12+07:00" }, "raw_text": "Why do we need CPU scheduling ? (2) process 2 proe 1 2 2 3 1 pooe 1 1 2 2 3 time resource 0/ 1 time 7/72" }, { "page_index": 235, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_008.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_008.png", "page_index": 235, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:09:15+07:00" }, "raw_text": "Why do we need CPU scheduling ? (2) process 2 proe 1 2 2 3 1 pooe 1 1 2 2 3 time resource 0/ time 8/72" }, { "page_index": 236, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_009.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_009.png", "page_index": 236, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:09:18+07:00" }, "raw_text": "Why do we need CPU scheduling ? (2) process 2 proe 1 2 2 3 1 pooe 1 1 2 2 3 time resource 0/ 1 time 9/72" }, { "page_index": 237, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_010.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_010.png", "page_index": 237, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:09:21+07:00" }, "raw_text": "Why do we need CPU scheduling ? (2) process 2 proe 1 2 2 3 1 pooe 1 1 2 2 3 time resource 0/i time 10/ 72" }, { "page_index": 238, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_011.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_011.png", "page_index": 238, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:09:24+07:00" }, "raw_text": "Why do we need CPU scheduling ? (2) process 2 proe 1 2 2 3 1 pooe 1 1 2 2 3 time resource 0/i 2 time 11/ 72" }, { "page_index": 239, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_012.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_012.png", "page_index": 239, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:09:26+07:00" }, "raw_text": "Why do we need CPU scheduling ? (2) process 2 proe 1 2 2 3 1 pooe 1 1 2 2 3 time resource 0/i 2 2 time 12/ 72" }, { "page_index": 240, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_013.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_013.png", "page_index": 240, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:09:29+07:00" }, "raw_text": "Why do we need CPU scheduling ? (2) process 2 pooe 7 1 2 2 3 1 pooe 1 1 2 2 3 time resource 0/i 1 2 2 nd 2 2 3 3 C time 13/ 72" }, { "page_index": 241, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_014.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_014.png", "page_index": 241, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:09:32+07:00" }, "raw_text": "Why do we need CPU scheduling ? (3) resource 0/i 1 1 2 2 CdD 1 1 2 2 3 3 time resource 0/i 1 1 2 2 CPU 1 1 2 2 3 3 time 14/ 72" }, { "page_index": 242, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_015.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_015.png", "page_index": 242, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:09:35+07:00" }, "raw_text": "Why do we need CPU scheduling ? (3) resource 0/i 1 1 2 2 CdD 1 1 2 2 3 3 time resource T Different schedules give different total execution times 1 2 2 3 3 time 15/ 72" }, { "page_index": 243, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_016.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_016.png", "page_index": 243, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:09:37+07:00" }, "raw_text": "CPU burst distribution 160 140 120 100 80 60 40 20 0 8 16 24 32 40 burst duration(milliseconds 4= 16/72" }, { "page_index": 244, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_017.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_017.png", "page_index": 244, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:09:39+07:00" }, "raw_text": "CPU burst distribution 160 140 120 100 80 60 40 20 0 8 16 24 32 40 burst duration(milliseconds Distribution can be important in the selection of an appropriate CPU-scheduling algorithm 17/ 72" }, { "page_index": 245, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_018.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_018.png", "page_index": 245, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:09:41+07:00" }, "raw_text": "CPU scheduler Short-term scheduler (CPU scheduler) When CPU is idle, the scheduler selects a process in the ready queue to be executed next Ready queue is not necessarily first-in, first-out (FIFO) PCBs are used to store processes in queues 18/72" }, { "page_index": 246, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_019.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_019.png", "page_index": 246, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:09:43+07:00" }, "raw_text": "Preemptive vs. nonpreemptive scheduling CPU scheduling decisions take place in one of 4 following cases 1 a process switches from running state to waiting state process switches from running state to ready state 2 a process switches from waiting state to ready state 3 4 a process terminates 19/72" }, { "page_index": 247, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_020.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_020.png", "page_index": 247, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:09:46+07:00" }, "raw_text": "Preemptive vs. nonpreemptive scheduling CPU scheduling decisions take place in one of 4 following cases 1 a process switches from running state to waiting state process switches from running state to ready state 2 3 a process switches from waiting state to ready state 4 a process terminates Cases 1 & 4: scheduler has to (no choice) choose another ready process for execution. -? nonpreemptive or cooperative Cases 2 & 3: preemptive scheduling. Better, but can lead to race conditions 20/72" }, { "page_index": 248, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_021.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_021.png", "page_index": 248, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:09:48+07:00" }, "raw_text": "What is race condition ? A AA A A At, A At AA 1+1 21/72" }, { "page_index": 249, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_022.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_022.png", "page_index": 249, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:09:50+07:00" }, "raw_text": "Dispatcher Dispatcher A module that gives control of CPU to the process selected by CPU scheduler Functions of dispatcher Switching context Switching to user mode Jumping to proper location in the user program to restart the program Dispatch latency should be kept small 590 22/72" }, { "page_index": 250, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_023.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_023.png", "page_index": 250, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:09:51+07:00" }, "raw_text": "Outline 1 Basic concepts 2 Scheduling algorithms Scheduling criteria Scheduling algorithms 3 Multiple-processor scheduling 4 Real-time scheduling 5Algorithm evaluation 23/72" }, { "page_index": 251, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_024.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_024.png", "page_index": 251, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:09:53+07:00" }, "raw_text": "Scheduling criteria Different criteria suggested for comparing different CPU scheduling algorithms CPU utilization (max): CPU is kept as busy as possible Throughput (max): number of processes completed per time unit = 24/72" }, { "page_index": 252, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_025.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_025.png", "page_index": 252, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:09:56+07:00" }, "raw_text": "Scheduling criteria Different criteria suggested for comparing different CPU scheduling algorithms CPU utilization (max): CPU is kept as busy as possible Throughput (max): number of processes completed per time unit Turnaround time (min): interval from submission to completion of a process Waiting time (min): sum of periods spent waiting in the ready queue of a process Response time (min): time from the submission of a request until the first response is produced, not including output time 25/72" }, { "page_index": 253, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_026.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_026.png", "page_index": 253, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:09:58+07:00" }, "raw_text": "Scheduling criteria Different criteria suggested for comparing different CPU scheduling algorithms CPU utilization (max): CPU is kept as busy as possible Throughput (max): number of processes completed per time unit Turnaround time (min): interval from submission to completion of a process Waiting time (min): sum of periods spent waiting in the ready queue of a process Response time (min): time from the submission of a request until the first response is produced, not including output time Optimize the average measure Optimize the minimum or maximum values Example: minimize the maximum response time 26/72" }, { "page_index": 254, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_027.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_027.png", "page_index": 254, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:10:00+07:00" }, "raw_text": "First come, first served (FCFS) scheduling (1) Process Burst time Arrival time Suppose the processes P1 24 0 arrive in the order: P1 P2 3 0 P2, P3. P3 3 0 27/72" }, { "page_index": 255, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_028.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_028.png", "page_index": 255, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:10:03+07:00" }, "raw_text": "First come, first served (FCFS) scheduling (1) Process Burst time Arrival time Suppose the processes P1 24 0 arrive in the order: P1 P2 3 0 P2, P3. P3 3 0 Then for FCFS scheduling, Gantt chart is as follows P1 P2 P3 0 24 27 30 Waiting time: P1 = 0,P2 = 24,P3 = 27 Average waiting time: (0 + 24 + 27)/3 = 17 28/72" }, { "page_index": 256, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_029.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_029.png", "page_index": 256, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:10:06+07:00" }, "raw_text": "First come, first served (FCFS) scheduling (2) Suppose the processes arrive in the order: P2, P3, P1 Then, Gantt chart is as follows P2 P3 P1 0 3 6 30 Waiting time: P1 = 6,P2 = 0,P3 = 3 Average waiting time: (6 + 0 + 3)/3 = 3 (much better) convoy effect: all other processes wait for one big process gets off the CPU 29/72" }, { "page_index": 257, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_030.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_030.png", "page_index": 257, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:10:07+07:00" }, "raw_text": "Shortest-Job-First (SJF) scheduling Each job associated with a time length of its next CPU burst Idea: Firstly choosing the job which has shortest time length SJF is optimal - giving a minimum average waiting time for a given set of jobs 590 30/72" }, { "page_index": 258, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_031.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_031.png", "page_index": 258, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:10:09+07:00" }, "raw_text": "Shortest-Job-First (SJF) scheduling Each iob associated with a time length of its next CPU burst Idea: Firstly choosing the job which has shortest time length SJF is optimal - giving a minimum average waiting time for a given set of jobs 2 schemes: Nonpreemptive: once given to the CPU, the process cannot be preempted until completing its CPU burst Preemptive: if a new process arrives with smaller CPU burst length than remaining time of current executing process, preempt. > Its new name is Shortest-Remaining-Time-First (SRTF) 590 31/ 72" }, { "page_index": 259, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_032.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_032.png", "page_index": 259, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:10:13+07:00" }, "raw_text": "Nonpreemptive Shortest-Job-First (SJF) scheduling Example Process Arrival time Burst time Then for P1 0 6 nonpreemptive P2 1 3 SJF scheduling P3 2 7 Gantt chart is as P4 3 4 follows cpu time 32/72" }, { "page_index": 260, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_033.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_033.png", "page_index": 260, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:10:15+07:00" }, "raw_text": "Nonpreemptive Shortest-Job-First (SJF) scheduling Example Process Arrival time Burst time Then for P1 0 6 nonpreemptive P2 1 3 SJF scheduling P3 2 7 Gantt chart is as P4 3 4 follows cpu P1 time 33/72" }, { "page_index": 261, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_034.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_034.png", "page_index": 261, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:10:18+07:00" }, "raw_text": "Nonpreemptive Shortest-Job-First (SJF) scheduling Example Process Arrival time Burst time Then for P1 0 6 nonpreemptive P2 1 3 SJF scheduling P3 2 7 Gantt chart is as P4 3 4 follows cpu P1 P2 time 34/72" }, { "page_index": 262, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_035.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_035.png", "page_index": 262, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:10:21+07:00" }, "raw_text": "Nonpreemptive Shortest-Job-First (SJF) scheduling Example Process Arrival time Burst time Then for P1 0 6 nonpreemptive P2 1 3 SJF scheduling P3 2 7 Gantt chart is as P4 3 4 follows cpu P1 P2 P4 time 35/ 72" }, { "page_index": 263, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_036.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_036.png", "page_index": 263, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:10:25+07:00" }, "raw_text": "Nonpreemptive Shortest-Job-First (SJF) scheduling Example Process Arrival time Burst time Then for P1 0 6 nonpreemptive P2 1 3 SJF scheduling P3 2 7 Gantt chart is as P4 3 4 follows cpu P1 P2 P4 P3 time Average waiting time: ((0-0)+(6-1)+(13-2)+(9-3))/4=5.5 36/72" }, { "page_index": 264, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_037.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_037.png", "page_index": 264, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:10:28+07:00" }, "raw_text": "Preemptive Shortest-Job-First scheduling (SRTF) Example Process Arrival time Burst time Then for P1 0 6 nonpreemptive P2 1 3 SJF scheduling P3 2 7 Gantt chart is as P4 3 4 follows cpu time Average waiting time: ((8 -1) + (1-1) + (13- 2) + (4- 3)/4 = 4.75 37/ 72" }, { "page_index": 265, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_038.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_038.png", "page_index": 265, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:10:30+07:00" }, "raw_text": "Preemptive Shortest-Job-First scheduling (SRTF) Example Process Arrival time Burst time Then for P1 0 6 nonpreemptive P2 1 3 SJF scheduling P3 2 7 Gantt chart is as P4 3 4 follows cpu P1 time Average waiting time: ((8 -1) + (1-1) + (13- 2) + (4- 3)/4 = 4.75 38/72" }, { "page_index": 266, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_039.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_039.png", "page_index": 266, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:10:34+07:00" }, "raw_text": "Preemptive Shortest-Job-First scheduling (SRTF) Example Process Arrival time Burst time Then for P1 0 6 nonpreemptive P2 1 3 SJF scheduling P3 2 7 Gantt chart is as P4 3 4 follows cpu P1 P2 time Average waiting time: ((8-1) +(1-1) +(13- 2) +(4-3)/4 = 4.75 39/72" }, { "page_index": 267, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_040.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_040.png", "page_index": 267, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:10:37+07:00" }, "raw_text": "Preemptive Shortest-Job-First scheduling (SRTF) Example Process Arrival time Burst time Then for P1 0 6 nonpreemptive P2 1 3 SJF scheduling P3 2 7 Gantt chart is as P4 3 4 follows cpu P1 P2 P4 time Average waiting time: ((8 -1) + (1-1) + (13- 2) + (4- 3)/4 = 4.75 40/72" }, { "page_index": 268, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_041.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_041.png", "page_index": 268, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:10:40+07:00" }, "raw_text": "Preemptive Shortest-Job-First scheduling (SRTF) Example Process Arrival time Burst time Then for P1 0 6 nonpreemptive P2 1 3 SJF scheduling P3 2 7 Gantt chart is as P4 3 4 follows cpu P1 P2 P4 P1 time Average waiting time: ((8 -1) + (1-1) + (13- 2) + (4- 3)/4 = 4.75 41/72" }, { "page_index": 269, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_042.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_042.png", "page_index": 269, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:10:43+07:00" }, "raw_text": "Preemptive Shortest-Job-First scheduling (SRTF) Example Process Arrival time Burst time Then for P1 0 6 nonpreemptive P2 1 3 SJF scheduling P3 2 7 Gantt chart is as P4 3 4 follows cpu P1 P2 P4 P1 P3 time Average waiting time: ((8 -1) + (1-1) + (13- 2) + (4- 3)/4 = 4.75 42/72" }, { "page_index": 270, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_043.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_043.png", "page_index": 270, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:10:45+07:00" }, "raw_text": "Length of burst time SJF is only optimal if burst time (or remaining time) of all jobs must be known in advance for scheduling 43/72" }, { "page_index": 271, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_044.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_044.png", "page_index": 271, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:10:46+07:00" }, "raw_text": "Length of burst time SJF is only optimal if burst time (or remaining time) of all jobs must be known in advance for scheduling Length of next CPU burst can be predicted (approximate SJF scheduling) 44/72" }, { "page_index": 272, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_045.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_045.png", "page_index": 272, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:10:49+07:00" }, "raw_text": "Length of burst time SJF is only optimal if burst time (or remaining time) of all jobs must be known in advance for scheduling Length of next CPU burst can be predicted (approximate SJF scheduling) Next CPU burst = exponential average of measured lengths of previous CPU bursts Tn+1 = atn + (1 - a)Tn 12 T; 10 8 in which 6 0 no process waits more than (n - 1)q time units Performance q large > FCFS q small -> overhead is too high due to context switching 56/72" }, { "page_index": 284, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_057.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_057.png", "page_index": 284, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:11:18+07:00" }, "raw_text": "Round-robin (RR) scheduling Example Process Burst time P1 24 P2 3 P3 3 Time quantum = 4 PS P1 P1 Pi Pi 0 4 7 10 14 18 22 26 30 Average waiting time: ((10 - 4) + (4 - 0) + (7 - 0))/3 = 5.66 57/ 72" }, { "page_index": 285, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_058.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_058.png", "page_index": 285, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:11:21+07:00" }, "raw_text": "Round-robin (RR) scheduling mpacts of quantum On turnaround time process time 12.5 P1 6 12.0 P2 3 P3 1 11.5 P4 7 11.0 10.5 10.0 9.5 9.0 1 2 3 4 5 6 7 time quantum 58/72" }, { "page_index": 286, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_059.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_059.png", "page_index": 286, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:11:27+07:00" }, "raw_text": "Round-robin (RR) scheduling Impacts of quantum On turnaround time process time 12.5 P1 6 12.0 P2 3 Pa 1 11.5 PA 7 11.0 10.5 10.0 On context switches 9.5 process time= 10 quantum context 9.0 switches 12 0 O 10 1 2 3 4 5 6 7 6 1 time quantum 0 10 6 1 9 0 1 2 3 4 5 6 7 8 9 10 59/72" }, { "page_index": 287, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_060.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_060.png", "page_index": 287, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:11:29+07:00" }, "raw_text": "Multilevel queue scheduling Multilevel queue scheduling Ready queue is partitioned separate queues according to different response-time requirement: foreground interactive) processes and background (batch) processes highest priority systemprocesses interactive processes interactive editing processes batch processes student processes lowest priority 590 60/72" }, { "page_index": 288, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_061.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_061.png", "page_index": 288, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:11:33+07:00" }, "raw_text": "Multilevel queue scheduling Multilevel queue scheduling Ready queue is partitioned separate queues according to different response-time requirement: foreground interactive) processes and background (batch) processes Each queue has its own scheduling algorithm. For example RR for foreground queue highest priority FCFS for background queue system processes Scheduling is needed between the interactive processes queues interactive editing processes Fixed preemptive scheduling - batch processes starvation student processes Time slice: each queue is assigned an lowest priority amount of time For example: 80% for foreground queue; 20% for background queue 590 61/72" }, { "page_index": 289, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_062.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_062.png", "page_index": 289, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:11:36+07:00" }, "raw_text": "Multilevel feedback queue scheduling Multilevel feedback A multilevel queue scheduling but allowing a process to move between queues. Separating processes according to their CPU burst times Process with much CPU time moved to low-priority queue Process waiting too long in low-priority queue moved to higher priority queue quantum = 8 quantum=16 FCFS 62/72" }, { "page_index": 290, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_063.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_063.png", "page_index": 290, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:11:38+07:00" }, "raw_text": "Multilevel feedback queue scheduling Multilevel feedback A multilevel queue scheduling but allowing a process to move between queues. Separating processes according to their CPU burst times Process with much CPU time moved to low-priority queue Process waiting too long in low-priority queue moved to higher priority queue Parameters of multilevel feedback queue scheduling: quantum = 8 number of queues scheduling algorithm for each queue quantum = 16 method to upgrade a process to higher queue; method to demote (giäng cäp) a process to lower queue FCFS method to choose which queue to put a process for service 63/72" }, { "page_index": 291, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_064.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_064.png", "page_index": 291, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:11:40+07:00" }, "raw_text": "Multilevel feedback queue scheduling Example Three queues Qo - quantum = 8 Q1 - quantum = 16 Q2 - FCFS Scheduling A new job enters queue Qo which is served FCFS. When it gains CPU, job receives 8 milliseconds. If it does not finish in 8 milliseconds, job is moved to queue Q1 At Q1 job is again served FCFS and receives 16 additional milliseconds. If it still does not complete, it is preempted and moved to queue Q2 590 64/72" }, { "page_index": 292, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_065.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_065.png", "page_index": 292, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:11:42+07:00" }, "raw_text": "Outline 1 Basic concepts 2 Scheduling algorithms 1 Scheduling criteria Scheduling algorithms 3 Multiple-processor scheduling 4 Real-time scheduling Algorithm evaluation 65/72" }, { "page_index": 293, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_066.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_066.png", "page_index": 293, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:11:44+07:00" }, "raw_text": "Multiple-processor scheduling Challenges Scheduling on multiple-processor systems are more complex Homogeneous processors within a multiprocessor Load sharing among multiple CPUs Asymmetric multiprocessing: only one processor accesses the system data structures, alleviating the need for data sharing Most OSs are using symmetric multiprocessing Processor affinity (than thuöc): a process is not migrated to another one than currently running Migration could lead to cache invalidation or repopulation. 590 66/72" }, { "page_index": 294, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_067.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_067.png", "page_index": 294, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:11:46+07:00" }, "raw_text": "Load balancing Load balancing Keeping the workload evenly distributed across all processors Only necessary on systems where each processor has its own private ready queue Load balancing vs. processor affinity Load balancing can be performed in 2 forms push migration pull migration 590 67/ 72" }, { "page_index": 295, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_068.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_068.png", "page_index": 295, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:11:48+07:00" }, "raw_text": "Outline 1 Basic concepts 2 Scheduling algorithms 1 Scheduling criteria Scheduling algorithms 3 Multiple-processor scheduling 4 Real-time scheduling Algorithm evaluation 68/72" }, { "page_index": 296, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_069.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_069.png", "page_index": 296, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:11:50+07:00" }, "raw_text": "Real-time scheduling Real-time scheduling Hard read-time systems: required to complete a critical task within a guaranteed amount of time Soft real-time computing: requires that critical processes receive priority over less fortunate ones Event latency kept small in order to increase responsiveness to events (minimizing latency) event E first occurs event latency to real-time system responds to E Time Real-time system must have priority-based scheduling with preemption 590 69/72" }, { "page_index": 297, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_070.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_070.png", "page_index": 297, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:11:52+07:00" }, "raw_text": "Outline 1 Basic concepts 2 Scheduling algorithms 1 Scheduling criteria Scheduling algorithms 3 Multiple-processor scheduling 4 Real-time scheduling 5 Algorithm evaluation 70/72" }, { "page_index": 298, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_071.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_071.png", "page_index": 298, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:11:56+07:00" }, "raw_text": "Algorithm evaluation Deterministic modeling takes a particular predetermined workload periormance simulation statistics and defines the forFCFS FCES performance of each /0213 actual algorithm for that performance process 112 simulation CPU statistics execution 2 for SJF 147 workload SJF CPU 173 trace tape Queueing models performance simulation statistlics for RR (q = 14) Computer simulation RRq=14 (e.g., by discrete-event simulation) 71/72" }, { "page_index": 299, "chapter_num": 5, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_072.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_5/slide_072.png", "page_index": 299, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:11:57+07:00" }, "raw_text": "Homeworks 1 Read materials on Multiple processor scheduling & Realtime-scheduling: textbook, slides (Nguyen Thanh Son) 72/72" }, { "page_index": 300, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_001.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_001.png", "page_index": 300, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:11:59+07:00" }, "raw_text": "Process synchronization Tran, Van Hoai Faculty of Computer Science & Engineering HCMC University of Technology E-mail: hoai@hcmut.edu.vn (partly based on slides of Le Thanh Van) 1/75" }, { "page_index": 301, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_002.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_002.png", "page_index": 301, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:12:00+07:00" }, "raw_text": "Outline 1 Basic concepts 2 Critical-section (CS) problem 3 Synchronization hardware 4 Software tools for synchronization Mutex lock Semaphores 5 Synchronization problems 590 2/75" }, { "page_index": 302, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_003.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_003.png", "page_index": 302, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:12:02+07:00" }, "raw_text": "Outline 1 Basic concepts 2 Critical-section CS problem Synchronization hardware 4 Software tools for synchronization Mutex lock Semaphores 5 Synchronization problems 3/75" }, { "page_index": 303, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_004.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_004.png", "page_index": 303, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:12:06+07:00" }, "raw_text": "Why do we study synchronization ? (1) Different CPU schedulers produce different timings for scheduled processes The correctness of a concurrent program should not depend on accidents of timing Cash A B C D machines deposit$100 withdraw $100 deposit$100 get balance to account l from account 2 to account l of account Bank $50 $200 $50 Shared memory account I account2 account3 (Source: mit.edu) Cooperating (concurrent) processes which possibly share a logical address can create the inconsistency in shared data 4/75" }, { "page_index": 304, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_005.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_005.png", "page_index": 304, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:12:07+07:00" }, "raw_text": "Why do we study synchronization ? (2) Account = 0 Machine 3 Machine 2 Machine 1 time 5/75" }, { "page_index": 305, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_006.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_006.png", "page_index": 305, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:12:08+07:00" }, "raw_text": "Why do we study synchronization ? (2) Account = $100 Machine 3 Machine 2 deposit Machine 1 $106 time 590 6/75" }, { "page_index": 306, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_007.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_007.png", "page_index": 306, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:12:10+07:00" }, "raw_text": "Why do we study synchronization ? (2) Account = $300 Machine 3 deposit Machine 2 $200 deposit Machine 1 $106 time 590 7/75" }, { "page_index": 307, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_008.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_008.png", "page_index": 307, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:12:11+07:00" }, "raw_text": "Why do we study synchronization ? (2) Account = $300 get = Machine 3 $300 deposit Machine 2 $200 deposit Machine 1 $100 time 8/75" }, { "page_index": 308, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_009.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_009.png", "page_index": 308, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:12:13+07:00" }, "raw_text": "Why do we study synchronization ? (3) Account = ??? Machine 3 get = ??? Machine 2 deposit $200 Machine 1 deposit $100 time 9/75" }, { "page_index": 309, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_010.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_010.png", "page_index": 309, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:12:16+07:00" }, "raw_text": "Use a counter to remedy (chüa benh) for buffer size of BUFFER SIZE - 1 Producer Consumer item next_produced; item next_consumed; while (true){ while (true){ while ( counter == BUFFER_SIZE while ( counter == 0 ) ; /* do nothing */ ; /* do nothing */ buffer[ in ] = next_produced; next_consumed = buffer[ out ]; in = ( in + 1 ) % BUFFER_SIZE; out = ( out + 1 ) % BUFFER_SIZE; counter ++; counter --; } } The codes seem correct, but not Suppose currently counter = 5, then 2 statements counter++ and counter-- executed concurrently After those executed, value of counter could be 4, 5, or 6 (inconsistently). (the expected is 5) 10/75" }, { "page_index": 310, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_011.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_011.png", "page_index": 310, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:12:19+07:00" }, "raw_text": "Inconsistency in shared-memory communication (2) counter++ counter- register1 = counter register2 = counter register1 = register1 + 1 register2 = register2 - 1 counter = register1 counter = register2 Concurrent execution of 2 processes is interleaved in a low-level sequential execution in any arbitrary order, perhaps as follows To: producer execute register1 = counter (register1 = 5) T1: producer execute register1 = register1 + 1 (register1 = 6) T2: consumer execute register2 = counter (register2 = 5) T3: consumer execute register2 = register2 - 1 (register2 = 4) T4: producer execute counter = register1 (counter = 6) T5: consumer execute counter = register2 (counter = 4) 11/ 75" }, { "page_index": 311, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_012.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_012.png", "page_index": 311, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:12:22+07:00" }, "raw_text": "Inconsistency in shared-memory communication (2) counter++ counter- register1 = counter register2 = counter register1 = register1 + 1 register2 = register2 - 1 counter = registeri counter = register2 Concurrent execution of 2 processes is interleaved in a low-level sequential execution in any arbitrary order, perhaps as follows To: producer execute register = counter (register1 = 5) Race condition Outcome of executing of multiple cooperating concurrent processes depends on particular order of their access events 12/ 75" }, { "page_index": 312, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_013.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_013.png", "page_index": 312, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:12:24+07:00" }, "raw_text": "Race condition example: forkQ) P1 pid_t child = fork 0; pid_t child = fork 0; request request pid pid fmle next available pid = 2615 return return 2615 2615 child= 2615 child= 2615 13/75" }, { "page_index": 313, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_014.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_014.png", "page_index": 313, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:12:26+07:00" }, "raw_text": "Outline 1 Basic concepts 2 Critical-section (CS) problem Synchronization hardware 4 Software tools for synchronization Mutex lock Semaphores Synchronization problems 14/75" }, { "page_index": 314, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_015.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_015.png", "page_index": 314, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:12:28+07:00" }, "raw_text": "Critical section Multiple processes should have the following structure to avoid race condition do { entry section critical section exit section remainder section } while (true); 15/75" }, { "page_index": 315, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_016.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_016.png", "page_index": 315, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:12:31+07:00" }, "raw_text": "Critical section Multiple processes should have the following structure to avoid race condition do { Critical section in kernel-mode process entry section Kernel-mode processes share some critical section kernel data structures list of opened files exit section 2 approaches to handle critical remainder section sections in OS } while (true); Nonpreemptive kernel: kernel-mode process cannot be preempted ? No race conditions C Preemptive kernel: kernel-mode process can be preempted more responsive, but prone to critical section 16/75" }, { "page_index": 316, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_017.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_017.png", "page_index": 316, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:12:34+07:00" }, "raw_text": "Conditions to critical section Mutual exclusion: at most one process allowed in critical section Progress: if no process in critical section and some (one or more) wish to enter critical section, the selection of which (of these processes) will enter cannot be postponed indefinitely Bounded waiting: a limit on number of times which other processes allowed to enter critical section after a process makes a request and before that request granted. 17/75" }, { "page_index": 317, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_018.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_018.png", "page_index": 317, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:12:37+07:00" }, "raw_text": "Algorithm 1 for CS assumed for case of 2 processes Processes do not know which is in CS Process Pj -? use a shared variable \"turn do { while ( turn != i ; to know which is in CS. (Initially /* critical section code is here */ turn = j; /* remainder section code is here */ turn=0) } while(true); turn = i =y P; is in its CS 18/75" }, { "page_index": 318, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_019.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_019.png", "page_index": 318, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:12:39+07:00" }, "raw_text": "Algorithm 1 for CS assumed for case of 2 processes Processes do not know which is in CS Process Pj -? use a shared variable \"turn do { while ( turn != i ; to know which is in CS. (Initially /* critical section code is here */ turn = j; /* remainder section code is here */ turn=0) } while(true); turn = i =y P is in its CS Satisfies mutual exclusion, bounded waiting 19/75" }, { "page_index": 319, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_020.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_020.png", "page_index": 319, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:12:42+07:00" }, "raw_text": "Algorithm 1 for CS assumed for case of 2 processes Processes do not know which is in CS Process Pj -? use a shared variable \"turn do { while ( turn != i ;) to know which is in CS. (Initially /* critical section code is here */ turn = j; /* remainder section code is here */ turn=0) } while(true); turn = i = P is in its CS Satisfies mutual exclusion, bounded waiting turn=0 time 20/75" }, { "page_index": 320, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_021.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_021.png", "page_index": 320, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:12:45+07:00" }, "raw_text": "Algorithm 1 for CS assumed for case of 2 processes Processes do not know which is in CS Process Pj -? use a shared variable \"turn do { while ( turn != i ;) to know which is in CS. (Initially /* critical section code is here */ turn = j; /* remainder section code is here */ turn=0) } while(true); turn = i = P is in its CS Satisfies mutual exclusion, bounded waiting (1==uan4) turn=0 - time 21/75" }, { "page_index": 321, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_022.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_022.png", "page_index": 321, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:12:48+07:00" }, "raw_text": "Algorithm 1 for CS assumed for case of 2 processes Processes do not know which is in CS Process Pj -? use a shared variable \"turn do { while ( turn != i ; to know which is in CS. (Initially /* critical section code is here */ turn = j; /* remainder section code is here */ turn=0) } while(true); turn = i =y P is in its CS Satisfies mutual exclusion, bounded waiting t i(1==uan4) (0==un4) turn=0 time 22/75" }, { "page_index": 322, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_023.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_023.png", "page_index": 322, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:12:51+07:00" }, "raw_text": "Algorithm 1 for CS assumed for case of 2 processes Processes do not know which is in CS Process Pj -? use a shared variable \"turn do { while ( turn != i ;) to know which is in CS. (Initially /* critical section code is here */ turn = j; /* remainder section code is here */ turn=0) } while(true); turn = i = P is in its CS Satisfies mutual exclusion, bounded waiting ter t t T (I==un4) turn=0 D time 23/75" }, { "page_index": 323, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_024.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_024.png", "page_index": 323, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:12:55+07:00" }, "raw_text": "Algorithm 1 for CS assumed for case of 2 processes Processes do not know which is in CS Process Pj -? use a shared variable \"turn do { while ( turn != i ; to know which is in CS. (Initially /* critical section code is here */ turn = j; /* remainder section code is here */ turn=0) } while(true); turn = i =y P; is in its CS Satisfies mutual exclusion, bounded waiting t T ys!uy 8 i(1==un4) turn=1 ==un+ =uxn time 24/75" }, { "page_index": 324, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_025.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_025.png", "page_index": 324, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:12:58+07:00" }, "raw_text": "Algorithm 1 for CS assumed for case of 2 processes Processes do not know which is in CS Process Pj -? use a shared variable \"turn do { while ( turn != i ;) to know which is in CS. (Initially /* critical section code is here */ turn = j; /* remainder section code is here */ turn=0) } while(true); turn = i = P is in its CS Satisfies mutual exclusion, bounded waiting ter t T 1 i(1==uans) i(1==uns) turn=1 0= 1=uxn o time 25/75" }, { "page_index": 325, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_026.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_026.png", "page_index": 325, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:13:02+07:00" }, "raw_text": "Algorithm 1 for CS assumed for case of 2 processes Processes do not know which is in CS Process Pj -? use a shared variable \"turn do { while ( turn != i ;) to know which is in CS. (Initially /* critical section code is here */ turn = j; /* remainder section code is here */ turn=0) } while(true); turn = i = P is in its CS Satisfies mutual exclusion, bounded waiting , but not progress Cs t T 1 i(I==uan4) i(1==uns) turn=1 turn=0 0= T 1=uxn o time time 26/75" }, { "page_index": 326, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_027.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_027.png", "page_index": 326, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:13:07+07:00" }, "raw_text": "Algorithm 1 for CS assumed for case of 2 processes Processes do not know which is in CS Process Pj -? use a shared variable \"turn do { while ( turn != i ; to know which is in CS. (Initially /* critical section code is here */ turn = j; /* remainder section code is here */ turn=0) } while(true); turn = i =y P is in its CS Satisfies mutual exclusion, bounded waiting , but not progress Cs So ys!uiy t T 1 i(1==un4) i(1==uns) turn=1 turn=1 0= T 1=uxn =uxn o time time 27/75" }, { "page_index": 327, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_028.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_028.png", "page_index": 327, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:13:11+07:00" }, "raw_text": "Algorithm 1 for CS assumed for case of 2 processes Processes do not know which is in CS Process Pj -? use a shared variable \"turn do { while ( turn != i ;) to know which is in CS. (Initially /* critical section code is here */ turn = j; /* remainder section code is here */ turn=0) } while(true); turn = i = P is in its CS Satisfies mutual exclusion, bounded waiting , but not progress ysiuiy t T 1 i(I==uan4) i(1==un4) turn=1 i(I==uxn) turn=1 0= T 1=uxn =uxn+ un o & time time 28/75" }, { "page_index": 328, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_029.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_029.png", "page_index": 328, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:13:16+07:00" }, "raw_text": "Algorithm 1 for CS assumed for case of 2 processes Processes do not know which is in CS Process Pj -? use a shared variable \"turn do { while ( turn != i ;) to know which is in CS. (Initially /* critical section code is here */ turn = j; /* remainder section code is here */ turn=0) } while(true); turn = i = P is in its CS Satisfies mutual exclusion, bounded waiting , but not progress ysiuiy t T 1 i(I==uan4) i(1==uns) turn=1 ==uxn+ turn=0 T I 1=uxn =un un o time time 29/75" }, { "page_index": 329, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_030.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_030.png", "page_index": 329, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:13:22+07:00" }, "raw_text": "Algorithm 1 for CS assumed for case of 2 processes Processes do not know which is in CS Process Pj -? use a shared variable \"turn do { while ( turn != i ; to know which is in CS. (Initially /* critical section code is here */ turn = j; /* remainder section code is here */ turn=0) } while(true); turn = i =y P; is in its CS Satisfies mutual exclusion, bounded waiting , but not progress t T K t T i(1==un4) i(1==un4) turn=1 &(I==uan4) 2 turn=0 T & I =uxn 0=uan ==uan =un un 1 1 time time 30/75" }, { "page_index": 330, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_031.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_031.png", "page_index": 330, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:13:25+07:00" }, "raw_text": "Algorithm 2 for CS turn cannot keep the state of Process P: readiness into CS do { flag[i] = true; > use a shared variable \"flag while ( flag[j] ) /* critical section code is here */ to keep the state of all processes flag[i] = false; /* remainder section code is here */ flag[i] = true => P; is in CS } while(true); 31/ 75" }, { "page_index": 331, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_032.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_032.png", "page_index": 331, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:13:26+07:00" }, "raw_text": "Algorithm 2 for CS turn cannot keep the state of Process Pj readiness into CS do { flag[i] = true; > use a shared variable \"flag while ( flag[j] ) /* critical section code is here */ to keep the state of all processes flag[i] = false; /* remainder section code is here */ flag[i] = true =y P; is in CS } while(true); mutual exclusion, but not bounded waiting, and not progress 32/75" }, { "page_index": 332, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_033.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_033.png", "page_index": 332, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:13:29+07:00" }, "raw_text": "Algorithm 2 for CS turn cannot keep the state of Process Pj readiness into CS do { flag[i] = true; > use a shared variable \"flag while ( flag[j] /* critical section code is here */ to keep the state of all processes flag[i] = false; /* remainder section code is here */ flag[i] = true = P; is in CS } while(true); mutual exclusion, but not bounded waiting, and not progress flag[0]=1 flag[1]=0 time 33/75" }, { "page_index": 333, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_034.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_034.png", "page_index": 333, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:13:31+07:00" }, "raw_text": "Algorithm 2 for CS turn cannot keep the state of Process Pj readiness into CS do { flag[i] = true; > use a shared variable \"flag while ( flag[j] /* critical section code is here */ to keep the state of all processes flag[i] = false; /* remainder section code is here */ flag[i] = true = P; is in CS } while(true); mutual exclusion, but not bounded waiting, and not progress SD ys!u!y 0=[O]8eTJ[ flag[0]=0 Tuon una flag[1]=0 time 34/75" }, { "page_index": 334, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_035.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_035.png", "page_index": 334, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:13:36+07:00" }, "raw_text": "Algorithm 2 for CS turn cannot keep the state of Process Pj readiness into CS do { flag[i] = true; > use a shared variable \"flag while ( flag[j] /* critical section code is here */ to keep the state of all processes flag[i] = false; /* remainder section code is here */ flag[i] = true = P; is in CS } while(true); mutual exclusion, but not bounded waiting, and not progress t i(I==[0]8TJ 0=[0]81J flag[0]=0 flag[1]=1 una time 35/75" }, { "page_index": 335, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_036.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_036.png", "page_index": 335, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:13:39+07:00" }, "raw_text": "Algorithm 2 for CS turn cannot keep the state of Process Pj readiness into CS do { flag[i] = true; > use a shared variable \"flag while ( flag[j] /* critical section code is here to keep the state of all processes flag[i] = false; /* remainder section code is here */ flag[i] = true = P; is in CS } while(true); mutual exclusion, but not bounded waiting, and not progress 1== flag[0]=0 0= 0= [0]8 T flag[1]=0 time 36/75" }, { "page_index": 336, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_037.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_037.png", "page_index": 336, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:13:44+07:00" }, "raw_text": "Algorithm 2 for CS turn cannot keep the state of Process Pj readiness into CS do { flag[i] = true; > use a shared variable \"flag while ( flag[j] ) /* critical section code is here to keep the state of all processes flag[i] = false; /* remainder section code is here */ flag[i] = true = P; is in CS } while(true); mutual exclusion, but not bounded waiting, and not progress eteer 1== 1== [ T flag[0]=0 0= 0= [0]81] LO flag[1]=1 b0 una J 11 time 37/ 75" }, { "page_index": 337, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_038.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_038.png", "page_index": 337, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:13:48+07:00" }, "raw_text": "Algorithm 2 for CS turn cannot keep the state of Process Pj readiness into CS do { flag[i] = true; > use a shared variable \"flag while ( flag[j] ) /* critical section code is here to keep the state of all processes flag[i] = false; /* remainder section code is here */ flag[i] = true =y P; is in CS } while(true); mutual exclusion, but not bounded waiting, and not progress etmer 1== 1== flag[0]=0 flag[0]=0 0= 0= [0]8 0 flag[1]=1 flag[1]=0 b0 60 una TJ time time 38/75" }, { "page_index": 338, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_039.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_039.png", "page_index": 338, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:13:53+07:00" }, "raw_text": "Algorithm 2 for CS turn cannot keep the state of Process Pj readiness into CS do { flag[i] = true; > use a shared variable \"flag while ( flag[j] ) /* critical section code is here to keep the state of all processes flag[i] = false; /* remainder section code is here */ flag[i] = true = P; is in CS } while(true); mutual exclusion, but not bounded waiting, and not progress etmer 1== 1== 0== flag[0]=0 flag[0]=1 0= 0= = [0] 0 [0] flag[1]=1 flag[1]=0 b0 una TJ time time 39/75" }, { "page_index": 339, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_040.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_040.png", "page_index": 339, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:13:58+07:00" }, "raw_text": "Algorithm 2 for CS turn cannot keep the state of Process Pj readiness into CS do { flag[i] = true; > use a shared variable \"flag while ( flag[j] ) /* critical section code is here to keep the state of all processes flag[i] = false; /* remainder section code is here */ flag[i] = true =y P; is in CS } while(true); mutual exclusion, but not bounded waiting, and not progress etmer 1== 1== 0== 0== flag[0]=0 flag[0]=1 0= 0= [0] 0 flag[1]=1 flag[1]=1 b0 bl una TJ DO 11 time time 40/75" }, { "page_index": 340, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_041.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_041.png", "page_index": 340, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:14:01+07:00" }, "raw_text": "Algorithm 2 for CS turn cannot keep the state of Process Pj readiness into CS do { flag[i] = true; > use a shared variable \"flag while ( flag[j] ) /* critical section code is here to keep the state of all processes flag[i] = false; /* remainder section code is here */ flag[i] = true = P; is in CS } while(true); mutual exclusion, but not bounded waiting, and not progress etmer 1== 1== 0== flag[0]=0 flag[0]=0 0= 0= [0] 0 flag[1]=1 flag[1]=1 time time 41/75" }, { "page_index": 341, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_042.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_042.png", "page_index": 341, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:14:07+07:00" }, "raw_text": "Algorithm 2 for CS turn cannot keep the state of Process Pj readiness into CS do { flag[i] = true; > use a shared variable \"flag while ( flag[j] /* critical section code is here to keep the state of all processes flag[i] = false; /* remainder section code is here */ flag[i] = true =y P; is in CS } while(true); mutual exclusion, but not bounded waiting, and not progress etmer 1== 1== 0== &0== flag[0]=0 flag[0]=1 0= 0= = [0] 0 flag[1]=1 flag[1]=1 b0 ol b una TJ C time time 42/75" }, { "page_index": 342, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_043.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_043.png", "page_index": 342, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:14:12+07:00" }, "raw_text": "Algorithm 2 for CS turn cannot keep the state of Process Pj readiness into CS do { flag[i] = true; > use a shared variable \"flag while ( flag[j] /* critical section code is here to keep the state of all processes flag[i] = false; /* remainder section code is here */ flag[i] = true = P; is in CS } while(true); mutual exclusion, but not bounded waiting, and not progress 8 etmer 1== 1== &0== &0== &(0==[0]9TJ flag[0]=0 flag[0]=1 0= 0= 1= 1=[0] [0] LO flag[1]=1 flag[1]=1 b0 bf una TJ 1 time time 43/75" }, { "page_index": 343, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_044.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_044.png", "page_index": 343, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:14:15+07:00" }, "raw_text": "Peterson's algorithm for CS Satisfy mutual exclusion Use both kinds of variables of Algorithm 1 & 2 Process P: do { flag[i] = true; turn = j; while ( flag[j] && turn == j ; /* critical section code is here */ flag[i] = false; /* remainder section code is here */ } while(true); 44/75" }, { "page_index": 344, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_045.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_045.png", "page_index": 344, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:14:17+07:00" }, "raw_text": "Bakery algorithm (1) Peterson's algorithm is only for 2 processes. Bakery algorithm is for n processes Before entering its critical section, process receives a ticket number. Holder of the smallest number enters its CS If processes P; and P; receive the same number, if i < j. then P; is served first; else P; is served first The numbering scheme always generates numbers in increasing order of enumeration; i.e., 1,2,3,3,3,3,4,5,.. 45/75" }, { "page_index": 345, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_046.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_046.png", "page_index": 345, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:14:19+07:00" }, "raw_text": "Bakery algorithm (2) A process is assigned a pair (pid,ticket #) which is ordered lexicographically Shared data boolean choosing[n] number[n]: ticket # Process Pj do { choosing[i] = true; number[i] = max(number[o],number[1],...,number[n-1]) + 1; choosing[i] = false; for( j=0; j OS kernel cannot depends on any assumptions regarding the visibility of modifications to memory on a shared-memory multiprocessor. > Computer architectures provide memory barriers to force any changes in memory to be propagated to all other processors. 590 51/75" }, { "page_index": 351, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_052.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_052.png", "page_index": 351, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:14:32+07:00" }, "raw_text": "Memory barriers - example Thread 1 Thread 2 while (!flag) x = 100; memory_barrierO; memory_barrierQ print x; flag = true; flag > x x > flag The memory barrier will ensure thread 1 will output 100 We could place a memory barrier into Peterson's algorithm between flag[i] and turn = j. 52/75" }, { "page_index": 352, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_053.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_053.png", "page_index": 352, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:14:35+07:00" }, "raw_text": "Hardware instructions test_and_set() Use an uninterruptable (atomic) sequence of instructions which modifies a shared variable lock (initially lock=false) Mutual-exclusion by test_and_setO test_and_setQ boolean test_and_set( boolean *target ) do f boolean rv = *target; while( test_and_set( &lock ;) *target = true; /* critical section code is here return rv; lock = false; } /* remainder section code is here */ } while (true}; 53/75" }, { "page_index": 353, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_054.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_054.png", "page_index": 353, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:14:38+07:00" }, "raw_text": "Hardware instructions compare_and_swap() Swaping the contents of two words (compare_and_swap()) on a shared variable (1ock) (initially lock=0) compare_and_swapQ Mutual-exclusion by boolean compare_and_swap( int *value, compare_and_swapQ int expected int new_value do { while( compare_and_swap( &lock, 0, 1 != 0 int temp = *value; if ( *value == expected ) /* critical section code is here */ lock=0 *value = new_value; /* remainder section code is here */ return temp; } while (true}; } 54/75" }, { "page_index": 354, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_055.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_055.png", "page_index": 354, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:14:41+07:00" }, "raw_text": "Hardware instructions compare_and_swap() Swaping the contents of two words (compare_and_swap()) on a shared variable (1ock) (initially lock=0) compare_and_swap() Mutual-exclusion by boolean compare_and_swap( int *value, compare_and_swapQ int expected int new_value do f while( compare_and_swap( &lock, 0, 1 != 0 int temp = *value; if ( *value == expected ) /* critical section code is here */ lock=0; *value = new_value; /* remainder section code is here */ return temp; } while (true}; } The solution compare_and_swap() above is not bounded waiting 55/75" }, { "page_index": 355, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_056.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_056.png", "page_index": 355, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:14:45+07:00" }, "raw_text": "Hardware instructions bounded waiting compare_and_swap() Process P while (true) { waiting initialized to false, waiting[i] = true; key = 1; lock initialized to 0. while (waiting[i] && key == 1) key = compare and swap(&lock,0,1) ; On leaving CS, P; scans in the waiting[il = false; cyclic ordering /* critical section */ (+1,i+2,...,n-1,0,...,i-1) j = (i +1) % n; while ((j != i) && !waiting[j]) (that waiting[j] == true), j = (j + 1) % n; and then set waiting[j] if (j == i) lock = 0; false to allow P; enter CS. else waiting[j] = false; Bounded waiting /* remainder section */ 56/75" }, { "page_index": 356, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_057.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_057.png", "page_index": 356, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:14:47+07:00" }, "raw_text": "Atomic variables Increment and decrement an integer value may produce race condition. compare_and_swap() is used as basic building blocks for constructing synchronization tools. Atomic variable: providing atomic operations (increment() , decrement()) on basic data types such as integers and booleans. void increment(atomic int *v) int temp; do f temp = *v; } while (temp != compare and swap(v, temp, temp+1)): } 57/ 75" }, { "page_index": 357, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_058.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_058.png", "page_index": 357, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:14:49+07:00" }, "raw_text": "Outline 1 Basic concepts 2 Critical-section CS problem 3 Synchronization hardware 4 Software tools for synchronization Mutex lock Semaphores 5 Synchronization problems 58/75" }, { "page_index": 358, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_059.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_059.png", "page_index": 358, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:14:52+07:00" }, "raw_text": "Mutex locks Application programmers do not like using hardware-synchronization mechanisms OS designers must provide tools to deal with critical-section with 2 functions acquire() acquire{} { while (!available ; /* busy wait */ available = false; } releaseQ release( { available = true; } Before entering CS, programmers call acquire(), and call release() when leaving CS. Both are atomic which can be implemented by hardware synchronization instructions. 59/75" }, { "page_index": 359, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_060.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_060.png", "page_index": 359, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:14:55+07:00" }, "raw_text": "Mutex locks Application programmers do not like using hardware-synchronization mechanisms OS designers must provide tools to deal with critical-section with 2 functions acquire() acquire{} { while (!available ; /* busy wait */ available = false; } release() Busy waiting = when a process is in CS, other processes loop continuously in order to enter CS (spinlock) Before entering CS, programmers call acquire(), and call release() when leaving CS. Both are atomic which can be implemented by hardware synchronization instructions. 60/75" }, { "page_index": 360, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_061.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_061.png", "page_index": 360, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:14:57+07:00" }, "raw_text": "Semaphores The bouncer represents a semaphore These people representwaiting threads He won't allow threads to proceed They aren't running on any CPU core until instructed to do so. (source:preshing.com) Semaphore S: an integer variable can only be accessed by indivisible (atomic) operations wait(S) { signal(S) { while ( S <= 0 ) ; /* busy wait */) S ++; s --; } } 61/75" }, { "page_index": 361, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_062.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_062.png", "page_index": 361, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:14:59+07:00" }, "raw_text": "Semaphores Calling order wait signal .et next 1 through. Havea nice day.ma'am. signal wait source:preshing.com Same outcome for different orders of calling wait() and signal(). 62/75" }, { "page_index": 362, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_063.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_063.png", "page_index": 362, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:15:01+07:00" }, "raw_text": "Semaphore usage Binary semaphore ({0,1}): similar to mutex locks Counting semaphore: to control access to resource with a finite number of instances S initialized to number of resource instances Wish to use an instance, call wait(s) Release the resource, call signal(s) All instances are in use, processes blocked until s > 0 Example of using semaphore synch to synchronize 2 processes similar to memory_barrier() synch = 0; P1 S1; wait( synch ); signal( synch ); S2; 63/75" }, { "page_index": 363, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_064.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_064.png", "page_index": 363, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:15:04+07:00" }, "raw_text": "Semaphores without busy waiting Semaphore Semaphore mentioned before could have busy waiting ldea to avoid busy waiting After the checking of the semaphore fails, the process will be put into waiting queue The process is restarted by wakeup() when other processes send signal() (i.e., put the process into ready queue) 590 64/75" }, { "page_index": 364, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_065.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_065.png", "page_index": 364, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:15:07+07:00" }, "raw_text": "Semaphores without busy waiting mplementation Semaphore data structure typedef struct { int value; struct process *list; } semaphore; wait() signal() wait( semaphore *S }{ signal( semaphore *S ){ S->value --; S->value ++; if ( S->value < 0 ){ if ( S->value >= 0 ) { add this process to S->list; remove a process P from S->list; sleep(); wakeup( P ); } } } } block(), wakeup(): system calls 65/75" }, { "page_index": 365, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_066.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_066.png", "page_index": 365, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:15:09+07:00" }, "raw_text": "Semaphores without busy waiting Implementation Semaphore data structure typedef struct { int value; struct process *list; } semaphore; wait() signal() wait( semaphore *S }{ signal( semaphore *S ){ S->value S->value ++ Remarks Busy waiting just moved into critical section, not completely eliminated } wait(), signal() must be executed atomically (on SMP, other techniques could be used additionally) 66/75" }, { "page_index": 366, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_067.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_067.png", "page_index": 366, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:15:11+07:00" }, "raw_text": "What is deadlock ? Po P1 Two semaphores S and Q initialized to 1 wait(S); wait(Q); wait(Q); wait(S); After wait(S) of Po and wait(Q) of Pj executed, both processes wait for signal(S); signal(Q); signal(Q) ; signal(S); corresponding signal()s 67/ 75" }, { "page_index": 367, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_068.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_068.png", "page_index": 367, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:15:14+07:00" }, "raw_text": "What is deadlock ? Po P1 Two semaphores S and Q initialized to 1 wait(S); wait(Q); wait(Q); wait(S); After wait(S) of Po and wait(Q) of Pi executed, both processes wait for signal(s); signal(Q); signal(Q); signal(s); corresponding signal()s Deadlock Two or more processes are waiting indefinitely for an event that can be caused by only one of the waiting processes. livelock 68/75" }, { "page_index": 368, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_069.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_069.png", "page_index": 368, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:15:17+07:00" }, "raw_text": "What is deadlock ? Po P1 Two semaphores S and Q initialized to 1 wait(S); wait(Q); wait(Q); wait(S); After wait(S) of Po and wait(Q) of P executed, both processes wait for signal(s); signal(Q); signal(Q); signal(S); corresponding signal()s Deadlock Two or more processes are waiting indefinitely for an event that can be caused by only one of the waiting processes. Starvation (indefinite blocking) A process may never be removed from the semaphore queue in which it is suspended 69/75" }, { "page_index": 369, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_070.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_070.png", "page_index": 369, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:15:19+07:00" }, "raw_text": "Outline 1 Basic concepts 2 Critical-section CS problem Synchronization hardware 4 Software tools for synchronization Mutex lock Semaphores 5 Synchronization problems 70/75" }, { "page_index": 370, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_071.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_071.png", "page_index": 370, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:15:20+07:00" }, "raw_text": "Classic synchronization problems Only classic problems considered Bounded-buffer problem Readers-writers problem Dining-philosophers problem Use semaphore for synchronization 71/75" }, { "page_index": 371, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_072.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_072.png", "page_index": 371, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:15:24+07:00" }, "raw_text": "Bounded-buffer problem Semaphore data structure int n; semaphore mutex = 1; semaphore empty = n; semaphore full = 0; producer consumer do { do { /* produce an item in */ wait( full ); /* next produced */ wait( mutex ); wait( empty ); /* remove an item from the */ wait( mutex ); /* buffer to next consumed */ /* add next_produced to */ signal( mutex ); /* the buffer */ signal( empty ); /* consume the item in */ signal( mutex ) /* next_consumed */ signal( full ); } while (true); } while (true); 72/75" }, { "page_index": 372, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_073.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_073.png", "page_index": 372, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:15:28+07:00" }, "raw_text": "Readers-writers problem A database shared among several processes: some are readers, some are writers If a writer and some other process access database simultaneously chaos may occur First readers-writers problem Reader no reader kept waiting unless a writer has do f already obtained permission to use shared wait( mutex ); objects read_count ++; if ( read_count == 1 ) semaphore rw_mutex = 1; wait( rw_mutex ); semaphore mutex = 1; signal( mutex ) ; int read_count = 0; ./* reading performed */. wait( mutex ); Writer read_count --; do t if ( read_count == 0 ) wait( rw_mutex ) : signal( rw_mutex ); ../* writing performed */.. signal( mutex ) : } while (true); signal( rw_mutex ); } while (true); 73/75" }, { "page_index": 373, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_074.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_074.png", "page_index": 373, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:15:30+07:00" }, "raw_text": "Dining-philosopher Dining-philosopher Resource: 5 single 0 chopsticks 5 Philosophers sitting RICE around the table, with actions Think: do nothing, not critical Eat: need 2 chopsticks (left and right) Semaphores can be used to solve dininig-philosophers synchronization problem, using 5 semaphores 74/75" }, { "page_index": 374, "chapter_num": 6, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_075.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_6/slide_075.png", "page_index": 374, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:15:31+07:00" }, "raw_text": "Dining-philosopher Implementation semaphore chopstick[5] ; Philosopher i do { wait( chopstock[i] ); wait( chopstick[(i+1) % 5] ); /* eat eat eat */ signal( chopstick[i] ); signal( chopstick[(i+1) % 5] ); /* think think think */ } while (true); 75/75" }, { "page_index": 375, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_001.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_001.png", "page_index": 375, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:15:34+07:00" }, "raw_text": "Memory management Tran, Van Hoai Faculty of Computer Science & Engineering HCMC University of Technology E-mail: hoai@hcmut.edu.vn (partly based on slides of Le Thanh Van) 1/59" }, { "page_index": 376, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_002.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_002.png", "page_index": 376, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:15:35+07:00" }, "raw_text": "Outline 1 Background 2 Swapping 3 Contiguous memory allocation 4 Segmentation 5 Paging 2/59" }, { "page_index": 377, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_003.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_003.png", "page_index": 377, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:15:37+07:00" }, "raw_text": "Outline 1 Background 2 Swapping 3 Contiguous memory allocation Segmentation E Paging 3/59" }, { "page_index": 378, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_004.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_004.png", "page_index": 378, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:15:39+07:00" }, "raw_text": "Role of memory PC Program(RAM) I-1I-2I-3I-4 fetch opl Data op2 registers 1-1 (RAM) Instruction Queue decode ALU execute store the output 59C 4/59" }, { "page_index": 379, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_005.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_005.png", "page_index": 379, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:15:41+07:00" }, "raw_text": "Role of memory Memory storing instructions PC ProgramRAM) 1-11-21-31-4 fetch opl Data op2 registers 1-1 (RAM) Instruction Queue decode ALU execute store the output Memory storing data 590 5/59" }, { "page_index": 380, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_006.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_006.png", "page_index": 380, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:15:45+07:00" }, "raw_text": "Role of memory Memory storing instructions PC ProgramRAM 1-11-21-3I-4 fetch opl Data op2 registers 1-1 (RAM) Instruction Queue decode ALU execute store the output Memory storing data Instructions of programs are only executed when they are in memory Memory management requires some hardware support 6/59" }, { "page_index": 381, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_007.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_007.png", "page_index": 381, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:15:48+07:00" }, "raw_text": "Hardware support Each user process has a separate memory space Base and limit registers give a range of the memory space operating base base + limit system 256000 process 300040 300040 base address yes CPU yes process 420940 120900 no no limit process 880000 trap to operating system 1024000 monitor-addressing error memory 7/59" }, { "page_index": 382, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_008.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_008.png", "page_index": 382, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:15:51+07:00" }, "raw_text": "Hardware support Each user process has a separate memory space Base and limit registers give a range of the memory space operating base base + limit system 256000 process 300040 300040 address base yes CPU yes process 420940 120900 no no limit process 880000 trap to operating system 1024000 monitor-addressing error memory Memory protection mechanism is not applied for operating system executing in kernel mode 8/59" }, { "page_index": 383, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_009.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_009.png", "page_index": 383, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:15:57+07:00" }, "raw_text": "Address binding User program to execution source program Address binding A process to convert one kind of high compiler or compile assembler time abstract memory address to low abstract memory address object other moduie object a symbolic address to a relocatable moduies address linkage editor a relocatable address to a absolute load load address module time system library Example: loader a variable \"count\" -? a relocatable address \"14 loaded system bytes from the beginning of this module\" library in-memory dynamic binary execution time (run \"14 bytes from the beginning of this module\" -? linking memory time) image an absolute address \"74014\" 9/59" }, { "page_index": 384, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_010.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_010.png", "page_index": 384, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:15:59+07:00" }, "raw_text": "Address binding When it happens? Binding is performed in any of following 3 steps Compile time: if starting location changes, absolute address must be regenerated (by compile) Load time: with relocatable code, only reloading is needed when starting address changes Execution time: if a process moved in memory, binding is delayed until its run time. Most general-purpose OSs use this method 10/ 59" }, { "page_index": 385, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_011.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_011.png", "page_index": 385, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:16:00+07:00" }, "raw_text": "Logical address vs. physical address Logical address Physical address Address generated by CPU Address seen by memory management unit (MMU) 11/59" }, { "page_index": 386, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_012.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_012.png", "page_index": 386, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:16:03+07:00" }, "raw_text": "Logical address vs. physical address Logical address Physical address Address generated by CPU Address seen by memory management unit (MMU) relocation register 14000 logical physical address address CPU memory 346 14346 MMU Compile/load-time binding: logical address = physical address Execution-time binding: logical address physical address User program thinks logical (virtual) address range is [0, max], but physical address range is [R + 0, R + max]. 12/ 59" }, { "page_index": 387, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_013.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_013.png", "page_index": 387, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:16:05+07:00" }, "raw_text": "Dynamic loading Dynamic loading A routine is not loaded until it is called Routine must be in relocatable load format Relocatable linking loader is responsible to load dynamic loading routing when a caller has not loaded yet Better memory=space utilization, useful to handle infrequently occuring cases Dynamic loading does not require support from OS 13/59" }, { "page_index": 388, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_014.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_014.png", "page_index": 388, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:16:06+07:00" }, "raw_text": "Dynamic linking and shared library If multiple programs use a same routine, dynamic loading requires duplication of the routine in memory 14/59" }, { "page_index": 389, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_015.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_015.png", "page_index": 389, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:16:09+07:00" }, "raw_text": "Dynamic linking and shared library If multiple programs use a same routine, dynamic loading requires duplication of the routine in memory Dynamic linking A routine is linked to user programs when the programs are run Program X Program Y Static libraries Static libraries (°.a) (°.a) Static linking at compile-time Program X Program Y Shared libraries (* so) Dynamic linking of shared libraries at run-time (source:ibm) 15/59" }, { "page_index": 390, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_016.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_016.png", "page_index": 390, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:16:12+07:00" }, "raw_text": "Dynamic linking and shared library If multiple programs use a same routine, dynamic loading requires duplication of the routine in memory Dynamic linking A routine is linked to user programs when the programs are run Program X Program Y A stub is put in the image Static libraries Static libraries of each reference (°.a) (°.a) Static linking at compile-time The stub is replaced with the address of the needed Program X Program Y routine, and then can be Shared libraries (° so) Dynamic linking referred to by other of shared libraries at run-time references without loading (source:ibm) 16/59" }, { "page_index": 391, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_017.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_017.png", "page_index": 391, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:16:16+07:00" }, "raw_text": "Dynamic linking and shared library If multiple programs use a same routine, dynamic loading requires duplication of the routine in memory Dynamic linking A routine is linked to user programs when the programs are run Program X Program Y A stub is put in the image Static libraries Static libraries of each reference (°.a) (°.a) Static linking at compile-time The stub is replaced with the address of the needed Program X Program Y routine, and then can be Shared libraries (° so) Dynamic linking referred to bv other of shared libraries Dynamic linking requires support from OS 17/ 59" }, { "page_index": 392, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_018.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_018.png", "page_index": 392, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:16:17+07:00" }, "raw_text": "Outline 1 Background 2 Swapping 3 Contiguous memory allocation Segmentation E Paging 18/59" }, { "page_index": 393, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_019.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_019.png", "page_index": 393, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:16:19+07:00" }, "raw_text": "Standard swapping Backing store must be large enough to operating systern accommodate copies of all process P swap out memory images of all process P2 users swap in Images of processes in user space backing store ready queue are in backing main memory store 19/ 59" }, { "page_index": 394, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_020.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_020.png", "page_index": 394, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:16:22+07:00" }, "raw_text": "Standard swapping Backing store must be large enough to operating system accommodate copies of all process P swap out memory images of all process P users swap in Images of processes in user space backing store ready queue are in backing main memory store Swapping is influenced by factors Transfer time between fast disk and memory Informing mechanism to activate swapping 1/O waiting processes should be swapped out carefully 20/59" }, { "page_index": 395, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_021.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_021.png", "page_index": 395, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:16:25+07:00" }, "raw_text": "Standard swapping Backing store must be large enough to operating system accommodate copies of all process P 1 swap out memory images of all process P users swap in Images of processes in user space backing store ready queue are in backing main memory store Swapping is influenced by factors Transfer time between fast disk and memory Informing mechanism to activate swapping l/O waiting processes should be swapped out carefully Standard swapping is not used in modern OSs 21/59" }, { "page_index": 396, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_022.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_022.png", "page_index": 396, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:16:26+07:00" }, "raw_text": "Swapping on mobile systems Flash drives have finite number of write/erase cycles Mobile OSs do not prefer swapping OSs may terminate processes if memory is not sufficient Developers for mobile systems must carefully allocate and release memory 22/59" }, { "page_index": 397, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_023.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_023.png", "page_index": 397, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:16:28+07:00" }, "raw_text": "Outline 1 Background 2 Swapping 3 Contiguous memory allocation 4 Segmentation 5 Paging 590 23/59" }, { "page_index": 398, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_024.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_024.png", "page_index": 398, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:16:29+07:00" }, "raw_text": "Contiguous memory allocation Memory divided into 2 partitions: resident OS & user processes Interrupt vector is often in low memory = resident OS is low memory partition 24/59" }, { "page_index": 399, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_025.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_025.png", "page_index": 399, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:16:31+07:00" }, "raw_text": "Contiguous memory allocation Memory divided into 2 partitions: resident OS & user processes Interrupt vector is often in low memory = resident OS is low memory partition Contiguous memory allocation Each process is contained in a single section of memory that is contiguous to the section of the next process 25/59" }, { "page_index": 400, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_026.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_026.png", "page_index": 400, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:16:35+07:00" }, "raw_text": "Contiguous memory allocation Memory divided into 2 partitions: resident OS & user processes Interrupt vector is often in low memory = resident OS is low memory partition Contiguous memory allocation Each process is contained in a single section of memory that is contiguous to the section of the next process OSs use relocation register for memory protection limit relocation register register logical physical address yes address CPU memory no trap: addressing error 26/59" }, { "page_index": 401, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_027.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_027.png", "page_index": 401, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:16:36+07:00" }, "raw_text": "Memory allocation There are 2 ways Fixed-partition: memory is divided into several fixed-size partitions. A process is in a single partition Variable-partition: only assign enough memory for processes and OS keeps a table storing status of memory 27/59" }, { "page_index": 402, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_028.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_028.png", "page_index": 402, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:16:39+07:00" }, "raw_text": "Memory allocation There are 2 ways Fixed-partition: memory is divided into several fixed-size partitions. A process is in a single partition Variable-partition: only assign enough memory for processes and OS keeps a table storing status of memory Job list: J1 (30K) J2 (50K) Original state J3 (30K) J4 (25K) partition 1 100K partition 2 25K partition 3 25K partition 4 50K 28/59" }, { "page_index": 403, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_029.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_029.png", "page_index": 403, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:16:41+07:00" }, "raw_text": "Memory allocation There are 2 ways Fixed-partition: memory is divided into several fixed-size partitions. A process is in a single partition Variable-partition: only assign enough memory for processes and OS keeps a table storing status of memory Job list: J1 (30K) J2 (50K) Original state first fit J3 (30K) J4 (25K) partition 1 100K partition 2 25K partition 3 25K partition 4 50K 29/59" }, { "page_index": 404, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_030.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_030.png", "page_index": 404, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:16:44+07:00" }, "raw_text": "Memory allocation There are 2 ways Fixed-partition: memory is divided into several fixed-size partitions. A process is in a single partition Variable-partition: only assign enough memory for processes and OS keeps a table storing status of memory Job list: J1 (30K) J2 (50K) Original state J3 (30K) J4 (25K) partition 1 100K partition 2 25K partition 3 25K partition 4 50K 30/59" }, { "page_index": 405, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_031.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_031.png", "page_index": 405, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:16:47+07:00" }, "raw_text": "Memory allocation There are 2 ways Fixed-partition: memory is divided into several fixed-size partitions. A process is in a single partition Variable-partition: only assign enough memory for processes and OS keeps a table storing status of memory Job list: J1 (30K) J2 (50K) Original state J3 (30K) J4 (25K) partition 1 100K partition 2 25K partition 3 25K partition 4 50K 31/ 59" }, { "page_index": 406, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_032.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_032.png", "page_index": 406, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:16:49+07:00" }, "raw_text": "Memory allocation There are 2 ways Fixed-partition: memory is divided into several fixed-size partitions. A process is in a single partition Variable-partition: only assign enough memory for processes and OS keeps a table storing status of memory Job list: J1 (30K) J2 (50K) Original state J3 (30K) After job allocatior J4 (25K) J1 (30K) partition 1 100K partition 2 25K J4 (25K) partition 3 25K partition 4 50K J2 (50K) 32/59" }, { "page_index": 407, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_033.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_033.png", "page_index": 407, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:16:52+07:00" }, "raw_text": "Variable partition Fixed-partition scheme limits the level of multiprogramming Variable-partition scheme needs a mechanism to deal efficiently with set of holes os os os os process 5 process 5 process 5 process 5 process 9 process 8 process 10 process 2 process 2 process2 process 2 33/59" }, { "page_index": 408, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_034.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_034.png", "page_index": 408, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:16:56+07:00" }, "raw_text": "Variable partition Fixed-partition scheme limits the level of multiprogramming Variable-partition scheme needs a mechanism to deal efficiently with set of holes os os os os process 5 process 5 process 5 process 5 process 9 process 9 process8 process 10 process 2 process 2 process 2 process 2 State: list of available (free) block sizes, input queue Dynamic storage-allocation problem: how to satisfy a request of size n from a list of free holes Strategies: first-fit, best-fit, worst-fit 34/59" }, { "page_index": 409, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_035.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_035.png", "page_index": 409, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:16:58+07:00" }, "raw_text": "Fragmentation Internal vs. external oS Internal fragmentation job A job B External fragmentation job C External fragmentation: small holes which cannot satisfy large request Internal fragmentation: unused memory which has been allocated for process 35/59" }, { "page_index": 410, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_036.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_036.png", "page_index": 410, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:16:59+07:00" }, "raw_text": "Outline 1 Background 2 Swapping 3 Contiguous memory allocation 4 Segmentation E Paging 36/59" }, { "page_index": 411, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_037.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_037.png", "page_index": 411, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:17:01+07:00" }, "raw_text": "What is segmentation ? Memory management should be convenient to both OS and programmers Programmers think of programs as set of data structures and methods subroutine stack With memory, they need Collection of yariable-sized symbol table memory blocks (segments) Sqrt No neccessary ordering among main program segments logical address 37/ 59" }, { "page_index": 412, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_038.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_038.png", "page_index": 412, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:17:05+07:00" }, "raw_text": "What is segmentation ? Memory management should be convenient to both OS and programmers Programmers think of programs as set of data structures and methods subroutine stack With memory, they need Collection of yariable-sized symbol table memory blocks (segments) Sqrt No neccessary ordering among main program segments logical address Segment address = 38/59" }, { "page_index": 413, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_039.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_039.png", "page_index": 413, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:17:09+07:00" }, "raw_text": "Segmentation hardware Segment address is 2-dimensional, but physical memory address is 1-dimensional limit_base subroutine stack 1400 segment segment 3 segment o CPU table sd 240 symbol segment table mi base yes Sqrt segment 4 000 1400 6300 3200 main no program segment3 segment 1 segment 2 segment table 4300 4700 segment2 trap: addressing error physical memory logical address space segment4 5700 6300 segment 1 6700 physical memory Segment table is an array of base-limit register pairs 39/59" }, { "page_index": 414, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_040.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_040.png", "page_index": 414, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:17:10+07:00" }, "raw_text": "Outline 1 Background 2 Swapping 3 Contiguous memory allocation 4 Segmentation 5 Paging 40/59" }, { "page_index": 415, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_041.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_041.png", "page_index": 415, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:17:15+07:00" }, "raw_text": "What is paging ? Segmentation still has external fragmentation, requiring compaction Physical memory is divided into fixed-sized blocks (frame) Logical memory is divided into same-sized blocks (page) frame number page 0 0 page 1 page 0 lagical page2 physical 2 address address f0000...0000 CPU d page 3 page table 3 page 2 f1111. .1111 logical 4 page 1 memory 5 6 physical page table memory page 3 physical memory Page address = 41/59" }, { "page_index": 416, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_042.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_042.png", "page_index": 416, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:17:16+07:00" }, "raw_text": "Paging in practice Logical address space = 2m page number page offset Page size = 2\" p d m - n n 42/59" }, { "page_index": 417, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_043.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_043.png", "page_index": 417, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:17:20+07:00" }, "raw_text": "Paging in practice Logical address space = 2m page number page offset Page size = 2\" p d m -n n 0 56 4 C 5 Y 7 6 8 ly 8 m 9 2 n 10 11 page table p 12 m 12 13 co 14 15 p logical memory 16 20 24 + 28 n = 2,m = 4 physical memory 43/59" }, { "page_index": 418, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_044.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_044.png", "page_index": 418, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:17:25+07:00" }, "raw_text": "Paging in practice Logical address space = 2m page number page offset Page size = 2n p d m -n n OTNm 0 5 A 6 5 Y 6 8 ly 8 m 2 n 10 k 11 page table p 12 m 12 13 c0 14 15 p logical memory 16 20 6 = 01102 page=012 24 + offset=102 28 2,m = 4 physical memory n= 44/59" }, { "page_index": 419, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_045.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_045.png", "page_index": 419, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:17:29+07:00" }, "raw_text": "Paging in practice Logical address space = 2m page number page offset Page size = 2n p d m -n n OTNm 0 5 6 8 8 m 2 n 10 k 11 22 page table p m c0 12 13 14 15 p logical memory 16 20 6 = 01102 page=012 24 + offset=102 28 2,m = 4 physical memory n = 45/59" }, { "page_index": 420, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_046.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_046.png", "page_index": 420, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:17:32+07:00" }, "raw_text": "Paging in practice Logical address space = 2m page number page offset Page size = 2n p d m -n n OTNm 0 56 8 m 2 cOa 10 k 11 page table 12 m 13 c01 12 14 15 p 16 phy.mem=26[=(6x4)+2] logical memory 20 6 = 01102 page=012 24 + offset=102 28 2,m = 4 physical memory n = 46/59" }, { "page_index": 421, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_047.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_047.png", "page_index": 421, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:17:37+07:00" }, "raw_text": "Paging in practice Logical address space = 2m page number page offset Page size = 2\" p d m -n n OTNm 0 56 4 8 m cOa 10 k 2 11 page table 13 m c0 12 14 15 p 16 phy.mem=26[=(6x4)+2] logical memory 20 6 = 01102 page=012 24 offset=102 g Paging has no external fragmentation, but has internal fragmentation. 47/59" }, { "page_index": 422, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_048.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_048.png", "page_index": 422, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:17:40+07:00" }, "raw_text": "Frame allocation free-frame list free-frame list 14 15 13 13page 1 13 18 20 14 14 page 0 15 15 15 page 0 16 page 0 16 page 1 page 1 page 2 17 page 2 17 page 3 page 3 new process 18 new process 18 page 2 19 014 19 113 20 218 20 page 3 320 21 new-process page table 21 A process can be given a non-contiguous set of frames 48/59" }, { "page_index": 423, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_049.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_049.png", "page_index": 423, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:17:45+07:00" }, "raw_text": "Frame allocation free-frame list free-frame list 14 15 13 13 page 1 13 18 20 14 14 page 0 15 15 15 page 0 16 page 0 16 page 1 page 1 page 2 17 page 2 17 page 3 page 3 new process 18 new process 18 page 2 19 014 19 113 20 218 20 page 3 320 21 new-process page table 21 A process can be given nntinunir A data structure (frame-table) is needed to manage frames. 49/59" }, { "page_index": 424, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_050.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_050.png", "page_index": 424, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:17:46+07:00" }, "raw_text": "Hardware support Page table stored in main memory, A page table for each process, pointer to it in PCB Few page tables for all processes 50/59" }, { "page_index": 425, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_051.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_051.png", "page_index": 425, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:17:48+07:00" }, "raw_text": "Hardware support Page table stored in main memory, A page table for each process, pointer to it in PCB Few page tables for all processes Page-address translation overhead => hardware support Page-table base register (PTBR): point to page table Translation look-aside buffer (TLB): associative, high-speed memory () 51/59" }, { "page_index": 426, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_052.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_052.png", "page_index": 426, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:17:51+07:00" }, "raw_text": "Hardware support Page table stored in main memory, A page table for each process, pointer to it in PCB Few page tables for all processes Page-address translation overhead = hardware support Page-table base register (PTBR): point to page table Translation look-aside buffer (TLB): associative, high-speed memory () hit ratio logical address CPU pd 80% effective access time: page frame 80% x 100(ns) + 20% x 200(ns) = 120(ns) number number 99% TLB hit physical effective access time = address 99% x 100(ns) + 1% x 200(ns) = 101(ns) TLB TLB miss physical memory page table 52/59" }, { "page_index": 427, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_053.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_053.png", "page_index": 427, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:17:56+07:00" }, "raw_text": "Protection From access permission: read-write/read-only bit From out-of-range access: valid-invalid bit Just keep a small range of pages => page-table length register (PTLR) 0 2 page 0 00000 frame number valid-invalid bit page 0 3 page 1 0 2 page 1 4 page 2 3 page 2 2 4 T 5 3 7 page 3 4 6 5 9 page 4 7 page 3 10,468 page 5 8 page 4 12,287 page table 9 page 5 . .. page n 53/59" }, { "page_index": 428, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_054.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_054.png", "page_index": 428, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:18:00+07:00" }, "raw_text": "Shared pages ed 1 0 3 ed 2 data 1 4 ed3 6 2 data 3 data 1 page table 3 ed 1 for P, ed 1 process P 4 ed 2 3 ed2 4 5 6 ed 3 7 6 ed 3 data 2 page table for P2 7 data 2 ed 1 process P2 3 8 ed2 4 6 9 ed3 2 10 data 3 page table for Pa 11 An advantage of paging is possibility of sharing common code 54/59" }, { "page_index": 429, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_055.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_055.png", "page_index": 429, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:18:04+07:00" }, "raw_text": "Hierarchical paging 2-level paging scheme ... ... 100 500 : ogicaladdress ... P1 P 100 500 ... ... 708 Pa .. 708 outer page table d outer page 929 : 900 page of table page table : 900 : page of 929 page table : page table memory It is often applied for 32(or less)-bit address space 55/59" }, { "page_index": 430, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_056.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_056.png", "page_index": 430, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:18:06+07:00" }, "raw_text": "Hashed paging physical logical address address hash physical function memory hash table It is often applied for 32(or more)-bit address space 56/59" }, { "page_index": 431, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_057.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_057.png", "page_index": 431, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:18:08+07:00" }, "raw_text": "Hashed paging physical logical address address hash physical function memory hash table It is often applied for 32(or more)-bit address space 57/59" }, { "page_index": 432, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_058.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_058.png", "page_index": 432, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:18:10+07:00" }, "raw_text": "Inverted paging Just keep a page table for all processes. PID is needed to search for an address-space identifier logical physical address address pidp physical CPU d d memory search pid page table 58/59" }, { "page_index": 433, "chapter_num": 8, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_059.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_8/slide_059.png", "page_index": 433, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:18:12+07:00" }, "raw_text": "Swapping with paging Mobile OSs (iOS, Android) follow the idea of swapping with paging, not swapping entire the process process page out A d 121314 g page in 1617f18h19j process B 20212223 y backing store main memory 59/59" }, { "page_index": 434, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_001.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_001.png", "page_index": 434, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:18:15+07:00" }, "raw_text": "Virtual memory Tran, Van Hoai Faculty of Computer Science & Engineering HCMC University of Technology E-mail: hoai@hcmut.edu.vn (partly based on slides of Le Thanh Van) 1/42" }, { "page_index": 435, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_002.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_002.png", "page_index": 435, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:18:16+07:00" }, "raw_text": "Outline 1 Background 2 Operations on virtual memory 3 Page-replacement algorithms 4 Frame allocation 5 Thrashing 6 Other consideration 2/42" }, { "page_index": 436, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_003.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_003.png", "page_index": 436, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:18:18+07:00" }, "raw_text": "Outline 1 Background 2 Operations on virtual memory Page-replacement algorithms 4 Frame allocation 5 Thrashing 6 Other consideration 3/42" }, { "page_index": 437, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_004.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_004.png", "page_index": 437, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:18:20+07:00" }, "raw_text": "Role of virtual memory There needs a mechanism to load partially a program into physical memory for execution Why do we need to load those into memory ? Partially loaded programs may provide some advantages Code to handle unusual error Programmers can write program for extremely large virtual conditions space Array allocated largely, but seldomly User program takes less physical memory = used fully multiprogramming increases without any sacrifice of response/turnaround time Less l/O needed to load/swap programs into memory 4/42" }, { "page_index": 438, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_005.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_005.png", "page_index": 438, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:18:24+07:00" }, "raw_text": "Role of virtual memory There needs a mechanism to load partially a program into physical memory for execution Why do we need to load those into memory ? Partially loaded programs may provide some advantages Code to handle unusual error Programmers can write program for extremely large virtual conditions space Array allocated largely, but seldomly User program takes less physical memory = used fully multiprogramming increases without any sacrifice of response/turnaround time Less l/O needed to load/swap programs into memory page 0 page 1 page2 Virtual memory involves the separation of logical memory as perceived by users from physical memory memory map page v physical virtual memory memory 5/42" }, { "page_index": 439, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_006.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_006.png", "page_index": 439, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:18:28+07:00" }, "raw_text": "Demand paging Idea Demand paging is a strategy to load pages only as they are needed (pager is not swapper) 0 2 B valid-invalid frame bit 3 2 C 0 4 Valid-invalid bit is D 5 E 6 C used to check 5 F 7 G memory resident of a 6 8 H 9 H page logical page table 10 memory 11 12 13 14 15 physical memory 6/42" }, { "page_index": 440, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_007.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_007.png", "page_index": 440, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:18:30+07:00" }, "raw_text": "Steps in demand paging Pure demand paging page is on backing store operating system Pure demand paging reference trap = only bringing pages into memory as load M required restart page table instruction free frame reset page bring in table missing page physical memory 7/42" }, { "page_index": 441, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_008.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_008.png", "page_index": 441, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:18:33+07:00" }, "raw_text": "Hardware support Page table: marking valid-invalid of a page Secondary memory (disk): known as swap device or swap space An instruction may have page fault anywhere, restarting the whole instruction is needed. Consider three-address instruction ADD A,B,C. 1 Fetch and decode the instruction (ADD) 2 Fetch A 3 Fetch B 4 Add A and B 5 Store sum to C 8/42" }, { "page_index": 442, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_009.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_009.png", "page_index": 442, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:18:36+07:00" }, "raw_text": "Hardware support Page table: marking valid-invalid of a page Secondary memory (disk): known as swap device or swap space An instruction may have page fault anywhere, restarting the whole instruction is needed. Consider three-address instruction ADD A, B, C. What happens if A, B, C 1 Fetch and decode the instruction (ADD) 2 Fetch A cannot be in main 3 Fetch B memory at the time of 4 Add A and B instruction ADD 5 Store sum to C executed ? 9/42" }, { "page_index": 443, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_010.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_010.png", "page_index": 443, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:18:38+07:00" }, "raw_text": "Performance of demand paging Denote p be probability of a page fault Effective access time = (1 - p) x memory access time +p x page fault time Page fault time generally consists of 11 Service the page-fault interrupt Read in the page Restart the process 590 10/42" }, { "page_index": 444, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_011.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_011.png", "page_index": 444, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:18:40+07:00" }, "raw_text": "Performance of demand paging Denote p be probability of a page fault Effective access time = (1 - p) x memory access time +p x page fault time Page fault time generally consists of 1 Service the page-fault interrupt Read in the page 2 3 Restart the process If page fault time = 8ms and memory access time = 200ns, then Effective access time (in ns) = 200 + 7,999,800 x p If page-fault rate p = 1/1000 then effective access time = 8.2 microseconds ( 40 x 200ns). 11/42" }, { "page_index": 445, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_012.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_012.png", "page_index": 445, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:18:41+07:00" }, "raw_text": "Outline 1 Background 2 Operations on virtual memory Page-replacement algorithms 4Frame allocation 5 Thrashing 6 Other consideration 12/42" }, { "page_index": 446, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_013.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_013.png", "page_index": 446, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:18:45+07:00" }, "raw_text": "Copy-on-write Copy-on-write Rapid process creation Minimizing the number of new pages allocated to newly created processes Before physical process memory process page A page B Applied for forkO page C vforkQ has no copy-on-write (more After process 1 modifies page C efficient), and physical process, memory process. parent process is page A suspended page B page C Copy of page C 13/42" }, { "page_index": 447, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_014.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_014.png", "page_index": 447, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:18:50+07:00" }, "raw_text": "Page replacement Some processes can utilize less pages than demanding = In order to increase multiprogramming degree, OS could over-allocating memory (when increasing multiprogramming degree) frame valid-invalic 0 A PC V B 2 C 3 D logicalmemory page table for kerne for process 1 process 1 1 2 D 3 C frame valid-invalid 4 F K bit 5 H F 6 A 2 G LLI H physical memory backing store ogical memory page table for for process2 process 2 14/42" }, { "page_index": 448, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_015.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_015.png", "page_index": 448, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:18:55+07:00" }, "raw_text": "Page replacement Some processes can utilize less pages than demanding = In order to increase multiprogramming degree, OS could over-allocating memory (when increasing multiprogramming degree) frame valid-invalic bit 0 A PC B 2 C ogical memory page table for kerne for process 1 process 1 1 2 D 3 C frame valid-invalid bit A F E 5 H F 6 A 2 G H physical memor No free frames. Options: ogical memory page table for for process2 process 2 - kill the process - swap out other process - page replacement 15/42" }, { "page_index": 449, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_016.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_016.png", "page_index": 449, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:18:58+07:00" }, "raw_text": "Basic page replacement Find location of desired page on disk frame validinvalid bit Find a free frame page out change victim a. if there is a free frame, use it 0 to invalid page b. if there is no free frame, call page-replacement algorithm victim reset page to select a victim frame page table table for new page C Write victim to disk and page in desired change status of related data page structures 3 Read desired page into frame, change data structures physical memory 4 Continue the process where page fault occurred 16/42" }, { "page_index": 450, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_017.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_017.png", "page_index": 450, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:19:02+07:00" }, "raw_text": "Basic page replacement Find location of desired page on disk frame valid-invalid bit 2 Find a free frame page out change victim a. if there is a free frame, use it 0 to invalid page b. if there is no free frame, call page-replacement algorithm victim resetpage to select a victim frame page table table for new page page in C. Write victim to disk and desired change status of related data page structures 3 Read desired page into frame change data structures physical memory 4 Continue the process where page fault occurred Minor tunnings Many stuffs in above scheme can be modified to get better performance, such as modify bit (no need to write pages without any modification) Read-only pages can be discarded when desired. 290 17/ 42" }, { "page_index": 451, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_018.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_018.png", "page_index": 451, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:19:05+07:00" }, "raw_text": "Outline 1 Background 2 Operations on virtual memory 3 Page-replacement algorithms 4 Frame allocation 5 Thrashing 6 Other consideration 18/42" }, { "page_index": 452, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_019.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_019.png", "page_index": 452, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:19:07+07:00" }, "raw_text": "Page replacement algorithm Questions How many frames allocated for a process ? Which frame to be replaced ? Different programs have different memory references (namely reference string) Recording an address sequence as follows 0100, 0432, 0101, 0612, 0102, 0103, 0104, 0101, 0611, 0102, 0103, 0104, 0101, 0610, 0102, 0103, 0104, 0609, 0102, 0105 100 bytes per page, then address sequence converted to reference string 1,4,1,6,1,6,1,6,1,6,1 19/42" }, { "page_index": 453, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_020.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_020.png", "page_index": 453, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:19:08+07:00" }, "raw_text": "FIFO r page replacement Let's try the following reference string for three-frame memory 7,0,1,2,0,3,0,4,2,3,0,3,2,1,2,0,1,7,0,1 20/42" }, { "page_index": 454, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_021.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_021.png", "page_index": 454, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:19:13+07:00" }, "raw_text": "FIFO page replacement Let's try the following reference string for three-frame memory 7,0,1,2,0,3,0,4,2,3,0,3,2,1,2,0,1,7,0,1 FIFO page replacement Choose next page to be replaced in FIFO scheme reference string 0 1 2 0 3 0 4 2 3 0 3 2 2 0 1 7 0 7 2 2 2 4 4 0 0 0 0 3 3 2 0 0 3 2 page frames 15 page faults 21/42" }, { "page_index": 455, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_022.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_022.png", "page_index": 455, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:19:15+07:00" }, "raw_text": "Optimal replacement algorithm Bélädy's anomaly for FIFO 16 Number of available frames increases, but page fault does increase (proved to be unbounded (2010)) 2 3 4 5 6 number of frames 22/42" }, { "page_index": 456, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_023.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_023.png", "page_index": 456, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:19:20+07:00" }, "raw_text": "Optimal replacement algorithm Bélädy's anomaly for FIFO 16 Number of available frames increases, but page fault does increase (proved to be unbounded (2010)) 1 2 3 4 5 6 number of frames Optimal (MIN/OPT) page replacement Replace the page that will not be used for the longest period of time reference string 0 2 0 3 0 4 2 3 0 3 2 1 0 7 2 2 2 2 2 7 0 0 0 4 0 3 3 3 1 page frames 23/42" }, { "page_index": 457, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_024.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_024.png", "page_index": 457, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:19:25+07:00" }, "raw_text": "Optimal replacement algorithm Bélädy's anomaly for FIFO 16 20 Number of available frames increases, but page fault does increase (proved to be unbounded (2010)) 1 2 3 4 5 6 number of frames Optimal (MIN/OPT) page replacement Replace the page that will not be used for the longest period of time reference string C 2 0 3 3 0 - 2 2 2 2 9 page faults 0 0 0 4 0 3 3 1 1 page frames 24/42" }, { "page_index": 458, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_025.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_025.png", "page_index": 458, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:19:29+07:00" }, "raw_text": "Optimal replacement algorithm Bélädy's anomaly for FIFO 16 20 Number of available frames increases, but page fault does increase (proved to be unbounded (2010)) 2 1 2 3 4 5 6 number of frames Optimal (MIN/OPT) page replacement Replace the page that will not be used for the longest period of time reference string C 7 2 0 3 3 0 1 2 2 2 2 2 9 page faults 0 3 3 3 1 1 There is no information of the future 29C 25/42" }, { "page_index": 459, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_026.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_026.png", "page_index": 459, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:19:32+07:00" }, "raw_text": "LRU replacement algorithm LRU page replacement LRU (Least recently used) chooses the page that has not been used for the longest period of time reference string 0 1 2 3 3 0 3 2 0 0 2 2 0 1 1 1 0 0 3 3 O 3 2 2 2 page frames 26/42" }, { "page_index": 460, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_027.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_027.png", "page_index": 460, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:19:36+07:00" }, "raw_text": "LRU replacement algorithm LRU page replacement LRU (Least recently used) chooses the page that has not been used for the longest period of time reference string 0 2 0 2 0 0 2 2 0 1 1 1 0 3 3 O 3 2 2 2 page frames 27/ 42" }, { "page_index": 461, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_028.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_028.png", "page_index": 461, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:19:39+07:00" }, "raw_text": "LRU replacement algorithm LRU page replacement LRU (Least recently used) chooses the page that has not been used for the longest period of time reference string 7 0 2 4 0 2 0 Q 2 2 0 1 1 1 0 3 3 O O 3 2 2 2 7 page frames We need hardware support to implement LRU algorithm Counters: an additional field in each page-table entry to store time-of-use (clock or counter). Referencing a page - copying storing clock register to time-of-use field Stack: using the idea of a stack, \"Last In First Out\" 28/42" }, { "page_index": 462, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_029.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_029.png", "page_index": 462, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:19:41+07:00" }, "raw_text": "Other algorithms LRU-approximation page replacement Additional-reference-bits algorithm Second-chance algorithm Enhanced second-chance algorithm Counting-based page replacement Least frequently used (LFU) Most frequently used (MFU) Page-buffering algorithm 590 29/42" }, { "page_index": 463, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_030.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_030.png", "page_index": 463, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:19:42+07:00" }, "raw_text": "Outline 1 Background 4 Frame allocation 5 Thrashing 6 Other consideration 30/42" }, { "page_index": 464, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_031.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_031.png", "page_index": 464, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:19:45+07:00" }, "raw_text": "Minimum number of frames Minimum number of frames is defined by computer architecture IBM MVC instruction needs a 6 bytes (can straddle 2 pages) b) source location (2 pages) c) destination location (2 pages) > 6 pages totally Number levels of indirection should be limited 31/42" }, { "page_index": 465, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_032.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_032.png", "page_index": 465, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:19:47+07:00" }, "raw_text": "Allocation algorithms There are m frames Equal allocation: n processes -? for each process Proportional allocation: virtual memory size of p: is s: ai possibly depends on a combination of size and priority of the process 32/42" }, { "page_index": 466, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_033.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_033.png", "page_index": 466, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:19:49+07:00" }, "raw_text": "Allocation algorithms There are m frames Equal allocation: n processes -?m for each process Proportional allocation: virtual memory size of p: is sj a; possibly depends on a combination of size and priority of the process Performance issues Global vs. local allocation Global replacement: replacement frame is any in the set of all frames Local replacement: replacement frame is in its own set of allocated frames Non-uniform memory access (NUMA) 33/42" }, { "page_index": 467, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_034.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_034.png", "page_index": 467, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:19:50+07:00" }, "raw_text": "Outline 1 Background Page-replacement algorithms 4 Frame allocation 5 Thrashing 6 Other consideration 34/42" }, { "page_index": 468, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_035.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_035.png", "page_index": 468, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:19:52+07:00" }, "raw_text": "Thrashing A process has no enough frames. Page faults occur frequently Time for paging is more than that for execution. SQC 35/42" }, { "page_index": 469, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_036.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_036.png", "page_index": 469, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:19:54+07:00" }, "raw_text": "Thrashing A process has no enough frames. Page faults occur frequently Time for paging is more than that for execution Thrashing High paging activity is called thrashing thrashing degree of multiprogramming 590 36/42" }, { "page_index": 470, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_037.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_037.png", "page_index": 470, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:19:56+07:00" }, "raw_text": "Working with thrashing We can limit effects of thrashing by Using local replacement algorithm, not steal frames from another process Working-set strategy: using a locality model (locality = set of pages that are actively used together) A function has its own B locality which consists of its local variables subset of global variables sseuppe uowaw 24 22 suaqwnu eled 20 37/42" }, { "page_index": 471, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_038.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_038.png", "page_index": 471, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:19:59+07:00" }, "raw_text": "Working-set model : working-set window Working set: set of pages in the most recent pages references = 10 page reference table 2615777751623412344434344413234443444 4 12 WS(t,) ={1,2,5,6,7} WS(tz) ={3,4} Denote WSS; be working-set size of process i. Total demand is d=Z WSS: We can monitor D and respond accordingly when D > m 38/42" }, { "page_index": 472, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_039.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_039.png", "page_index": 472, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:20:00+07:00" }, "raw_text": "Page-fault frequency (PFF) increase number of frames upper bound lower bound decrease number of frames number of frames 590 39/42" }, { "page_index": 473, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_040.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_040.png", "page_index": 473, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:20:02+07:00" }, "raw_text": "Outline 1 Background Page-replacement algorithms 4Frame allocation 5 Thrashing 6 Other consideration 40/42" }, { "page_index": 474, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_041.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_041.png", "page_index": 474, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:20:05+07:00" }, "raw_text": " Prepaging: prevent large number of page faults that occur when a process is started Page size: choice of page sige is often performed in OS design TLB reach Inverted page tables Program structure int i, j; int i, j; int data[128] [128] ; int data[128][128]; for( j = 0; j < 128; j++ ) for( i = 0; i < 128; i++ ) for( i = 0; i < 128; i++ ) for( j = 0; j < 128; j++ ) data[i][j] = 0; data[i][j] = 0; 41/42" }, { "page_index": 475, "chapter_num": 9, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_042.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_9/slide_042.png", "page_index": 475, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:20:08+07:00" }, "raw_text": " Prepaging: prevent large number of page faults that occur when a process is started Page size: choice of page sige is often performed in OS design TLB reach Inverted page tables Program structure int i, j; int i, j; int data[128][128] ; int data[128][128]; for( j = 0; j < 128; j++ ) for( i = 0; i < 128; i++ for( i = 0; i < 128; i++ ) for( j = O; j < 128; j++ ) data[i][j] = 0; data[i][j] = 0; If OS allocates fewer than 128 frames of 128 words for entire program, the left code has 128 x 128 = 16,384 page faults The right code possibly has only 128 page faults. 42/42" }, { "page_index": 476, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_001.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_001.png", "page_index": 476, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:20:10+07:00" }, "raw_text": "Chapter 1 10.A: File-System lnterface 8 M What lsar OPERATING SYSTEM (OS) and How Does lt Work CLEVERISM.COM Silberschatz, Galvin and Gagne C2018 Operating System Concepts" }, { "page_index": 477, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_002.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_002.png", "page_index": 477, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:20:14+07:00" }, "raw_text": "BK Chapter 10.A: Outline TP.HCM File Concept Access Methods Disk and Directory Structure File-System Mounting File Sharing Protection Operating System Concepts 2 Silberschatz, Galvin and Gagne @2018" }, { "page_index": 478, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_003.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_003.png", "page_index": 478, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:20:17+07:00" }, "raw_text": "BK Obiectives TP.HCM To explain the function of file systems To describe the interfaces to file systems To discuss file-system design tradeoffs, including access methods file sharing, file locking, and directory structures To explore file-system protection Operating System Concepts 3 Silberschatz, Galvin and Gagne O2018" }, { "page_index": 479, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_004.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_004.png", "page_index": 479, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:20:20+07:00" }, "raw_text": "BK File Concept TP.HCM Contiguous logical address space Types: Data complex numeric character binary Program Contents defined by file's creator Many types Text file Source file Executable file Operating System Concepts 4 Silberschatz, Galvin and Gagne @2018" }, { "page_index": 480, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_005.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_005.png", "page_index": 480, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:20:25+07:00" }, "raw_text": "BK File Attributes TP.HCM Name - only information kept in human-readable form Identifier - unique tag (number) identifies file within file system Type - needed for systems that support different types Location - pointer to file location on device Size - current file size Protection - controls who can do reading, writing, executing Time, date, and user identification - data for protection, security, and usage monitoring Information about files are kept in the directory structure, which is maintained on the disk Many variations, including extended file attributes such as file checksum Operating System Concepts 5 Silberschatz, Galvin and Gagne O2018" }, { "page_index": 481, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_006.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_006.png", "page_index": 481, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:20:31+07:00" }, "raw_text": "BK A window of file info on Mac OS X TP.HCM O O O TX 11.tex Info TEX 11.tex 111KB Modified:Today2:00 PM Spotlight Comments: Ceneral: Kind:Tex Document Size:111,389 bytes (115 K8 on disk Where:/Users/greg/Dropbox/osc9e/tex CreatedToday 1:46 PM Modificd:Today 2:00 PM Label: C - Stationery pad D Locked More Info: Last opened:Today 1:47 PM Name&Extension: 11.tex Hide extension Open with: Tixtexmaker Use thisapplication to open all documents like this one. ChangeAll.. Preview. Sharing &Permissions: You can read and write Name Privilege greg (Me) Read&Write staff Read only everyone NoAccess Operating System Concepts 6 Silberschatz, Galvin and Gagne C2018" }, { "page_index": 482, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_007.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_007.png", "page_index": 482, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:20:35+07:00" }, "raw_text": "BK File Operations TP.HCM File is an abstract data type Create Write - at write pointer location Read - at read pointer location Reposition within file (or seek) Delete Truncate Open(F) - search the directory structure on disk for entry F, and move the content of entry to memory Close(F) - move the content of entry F in memory to directory structure on disk Operating System Concepts 7 Silberschatz, Galvin and Gagne O2018" }, { "page_index": 483, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_008.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_008.png", "page_index": 483, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:20:38+07:00" }, "raw_text": "BK Open Files TP.HCM Several pieces of data are needed to manage open files: Open-file table: tracks open files File pointer: pointer to last read/write location, per process that has the file open File-open count: counter of number of times a file is open - to allow removal of data from open-file table when last processes closes it Disk location of the file: cache of data access information Access rights: per-process access mode information Operating System Concepts 8 Silberschatz, Galvin and Gagne O2018" }, { "page_index": 484, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_009.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_009.png", "page_index": 484, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:20:41+07:00" }, "raw_text": "BK Open File Locking TP.HCM Provided by some operating systems and file systems Similar to reader-writer locks Shared lock similar to reader lock - several processes can acguire concurrently Exc/usive /ock similar to writer lock Mediates access to a file Mandatory or advisory Mandatory - access is denied depending on locks held and requested Advisory - processes can find status of locks and decide what to do Operating System Concepts 9 Silberschatz, Galvin and Gagne O2018" }, { "page_index": 485, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_010.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_010.png", "page_index": 485, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:20:47+07:00" }, "raw_text": "BK File Locking Example - Java APl TP.HCM import java.io.*: import java.nio.channels.* : public class LockingExample { public static final boolean EXCLUSIVE = false; public static final boolean SHARED = true; public static void main(String arsg[] throws IoException { FileLock sharedLock = null; FileLock exclusiveLock = null; try { RandomAccessFile raf = new RandomAccessFile(\"file.txt\" \"rw\"); // get the channel for the file Filechannel ch = raf.getchannelO : // this locks the first half of the file - exclusive exclusiveLock = ch.lock(0, raf.length(O)/2, ExcLusIVE) : // release the lock exclusiveLock.releaseQ ; Operating System Concepts 10 Silberschatz, Galvin and Gagne O2018" }, { "page_index": 486, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_011.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_011.png", "page_index": 486, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:20:51+07:00" }, "raw_text": "BK File Locking Example - Java API (Cont.) TP.HCM // this locks the second half of the file - shared sharedlock = ch.lock(raf.lengthO/2+1 raf.lengthO, SHARED); / * * Now read the data . // release the lock sharedlock. releaseO ; } catch (java.io.IoException ioe) { System.err -println(ioe) ; }finally { if (exclusiveLock != null) exclusiveLock.releaseO ; if (sharedlock != null) sharedlock. releaseO) ; 2 2 2 Operating System Concepts 11 Silberschatz, Galvin and Gagne O2018" }, { "page_index": 487, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_012.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_012.png", "page_index": 487, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:20:58+07:00" }, "raw_text": "BK File Types - Name, Extension TP.HCM file type usual extension function executable exe, com, bin ready-to-run machine- or none language program object obj, o compiled, machine language, not linked source code c, cc, java, pas, source code in various asm, a languages batch bat, sh commands to the command interpreter text txt, doc textual data, documents word processor wp, tex, rtf, various word-processor doc formats library lib, a, so, dll libraries of routines for programmers print or view ps, pdf, jpg ASCll or binary file in a format for printing or viewing archive arc, zip, tar related files grouped into one file, sometimes com- pressed, for archiving or storage multimedia mpeg, mov, rm, binary file containing mp3, avi audio or A/V information Operating System Concepts 12 Silberschatz, Galvin and Gagne @2018" }, { "page_index": 488, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_013.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_013.png", "page_index": 488, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:21:01+07:00" }, "raw_text": "BK File Structure TP.HCM None - sequence of words or bytes Simple record structures Lines Fixed length Variable length Complex structures Formatted document Relocatable load file (i.e., executable file) Can simulate last two with first method by inserting appropriate control characters Who decides: Operating system Program Operating System Concepts 13 Silberschatz, Galvin and Gagne O2018" }, { "page_index": 489, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_014.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_014.png", "page_index": 489, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:21:04+07:00" }, "raw_text": "BK Sequential-Access File TP.HCM current position beginning end rewind read or write Operating System Concepts 14 Silberschatz, Galvin and Gagne C2018" }, { "page_index": 490, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_015.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_015.png", "page_index": 490, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:21:08+07:00" }, "raw_text": "BK Access Methods TP.HCM Sequential Access Direct Access - file is fixed- length logical records read next read n write next write n reset position to n no read after last write read next (rewrite) write next rewrite n n = relative block number Relative block numbers allow OS to decide where file should be placed See allocation problem in Chapter 12 Operating System Concepts 15 Silberschatz, Galvin and Gagne O2018" }, { "page_index": 491, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_016.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_016.png", "page_index": 491, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:21:12+07:00" }, "raw_text": "Simulation of Sequential-Access on Direct- BK Access File TP.HCM sequential access implementation for direct access reset cp = 0; read next read cp: cp= cp+ 1; write next write cp; cp= cp+ 1; Operating System Concepts 16 Silberschatz, Galvin and Gagne C2018" }, { "page_index": 492, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_017.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_017.png", "page_index": 492, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:21:16+07:00" }, "raw_text": "BK Other Access Methods TP.HCM Can be built on top of base methods General involve creation of an index for the file Keep index in memory for fast determination of location of data to be operated on (consider UPC code plus record of data about that item) If too large, index (in memory) of the index (on disk) E.g., IBM Indexed Sequential-Access Method (IsAM) Small master index, points to disk blocks of secondary index File kept sorted on a defined key All done by the OS VMs operating system provides index and relative files as another example (see next slide) Operating System Concepts 17 Silberschatz, Galvin and Gagne O2018" }, { "page_index": 493, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_018.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_018.png", "page_index": 493, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:21:19+07:00" }, "raw_text": "BK Example of Index and Relative Files TP.HCM logical record last name number Adams Arthur Asher smith, john social-security age Smith index file relative file Operating System Concepts 18 Silberschatz, Galvin and Gagne C2018" }, { "page_index": 494, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_019.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_019.png", "page_index": 494, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:21:22+07:00" }, "raw_text": "BK Directory Structure TP.HCM A collection of nodes containing information about all files Directory Files F 2 F 4 F 1 F 3 F n Both the directory structure and the files reside on disk Operating System Concepts 19 Silberschatz, Galvin and Gagne C2018" }, { "page_index": 495, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_020.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_020.png", "page_index": 495, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:21:26+07:00" }, "raw_text": "BK Disk Structure TP.HCM Disk can be subdivided into partitions Disks or partitions can be RAiD protected against failure Disk or partition can be used raw - without a file system, or formatted with a file system Partitions also known as minidisks, slices Entity containing file system known as a volume Each volume containing file system also tracks that file system's info in device directory or volume table of contents As well as general-purpose file systems there are many special- purpose file systems, frequently all within the same operating system or computer Operating System Concepts 20 Silberschatz, Galvin and Gagne O2018" }, { "page_index": 496, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_021.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_021.png", "page_index": 496, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:21:30+07:00" }, "raw_text": "BK A Typical File-System Organization TP.HCM directory directory partition A disk 2 files disk 1 directory partition C files partition B files disk 3 Operating System Concepts 21 Silberschatz, Galvin and Gagne C2018" }, { "page_index": 497, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_022.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_022.png", "page_index": 497, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:21:34+07:00" }, "raw_text": "BK Types of File Systems TP.HCM We mostly talk of general-purpose file systems But systems frequently have many file systems, some general- and some special- purpose E.g., Solaris has tmpfs - memory-based volatile FS for fast, temporary l/O objfs - interface into kernel memory to get kernel symbols for debugging ctfs - contract file system for managing daemons lofs - loopback file system allows one FS to be accessed in place of another procfs - kernel interface to process structures ufs, zfs - general purpose file systems Operating System Concepts 22 Silberschatz, Galvin and Gagne O2018" }, { "page_index": 498, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_023.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_023.png", "page_index": 498, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:21:37+07:00" }, "raw_text": "BK Operations Performed on Directory TP.HCM Search for a file Create a file Delete a file List a directory Rename a file Traverse the file system Operating System Concepts 23 Silberschatz, Galvin and Gagne @2018" }, { "page_index": 499, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_024.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_024.png", "page_index": 499, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:21:40+07:00" }, "raw_text": "BK Directory Organization TP.HCM The directory is organized logically to obtain Efficiency - locating a file quickly Naming - convenient to users Two users can have same name for different files The same file can have several different names Grouping - logical grouping of files by properties, (e.g., all Java programs, all games, ...) Operating System Concepts 24 Silberschatz, Galvin and Gagne @2018" }, { "page_index": 500, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_025.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_025.png", "page_index": 500, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:21:43+07:00" }, "raw_text": "BK Single-Level Directory TP.HCM A single directory for all users directory cat bo a test data mail cont hexrecords files Naming problem Grouping problem Operating System Concepts 25 Silberschatz, Galvin and Gagne @2018" }, { "page_index": 501, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_026.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_026.png", "page_index": 501, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:21:48+07:00" }, "raw_text": "BK Two-Level Directory TP.HCM Separate directory for each user Master file directory (MFD) User file directory (UFD) master file user 1 user 2 user 3 user 4 directory user file cat bo a test a data a test x data a directory Path name Can have the same file name for different user Efficient searching No grouping capability Operating System Concepts 26 Silberschatz, Galvin and Gagne O2018" }, { "page_index": 502, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_027.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_027.png", "page_index": 502, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:21:53+07:00" }, "raw_text": "BK Tree-Structured Directories TP.HCM root spell bin programs stat mail dist find count hex reorder p e mail prog copy prt exp reorder list find hex count list obj spell all last frst Operating System Concepts 27 Silberschatz, Galvin and Gagne @2018" }, { "page_index": 503, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_028.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_028.png", "page_index": 503, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:21:56+07:00" }, "raw_text": "BK Tree-Structured Directories (Cont.) TP.HCM Efficient searching Grouping Capability Current directory (or working directory) E.g., For Linux OS cd /spell/mail/prog type list Operating System Concepts 28 Silberschatz, Galvin and Gagne C2018" }, { "page_index": 504, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_029.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_029.png", "page_index": 504, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:21:59+07:00" }, "raw_text": "BK Tree-Structured Directories (Cont.) TP.HCM Using absolute or relative path name Creating a new file is done in current directory Delete a file rm Creating a new subdirectory is done in current directory mkdir Example: if in current directory /mail mkdir count mail prog copy prt exp count Operating System Concepts 29 Silberschatz, Galvin and Gagne O2018" }, { "page_index": 505, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_030.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_030.png", "page_index": 505, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:22:05+07:00" }, "raw_text": "BK Acyclic-Graph Directories TP.HCM Have shared subdirectories and files root dict spell Two different names (aliasing) If dict deletes list = dangling list all W count countwords list pointer. Solutions: Backpointers, so we can delete all pointers Variable size records a problem fist rade w7 Backpointers using a daisy chain organization Entry-hold-count solution Operating System Concepts 30 Silberschatz, Galvin and Gagne O2018" }, { "page_index": 506, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_031.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_031.png", "page_index": 506, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:22:07+07:00" }, "raw_text": "BK Acyclic-Graph Directories (Cont.) TP.HCM New directory entry type Link - another name (pointer) to an existing file Resolve the link - follow pointer to locate the file Operating System Concepts 31 Silberschatz, Galvin and Gagne C2018" }, { "page_index": 507, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_032.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_032.png", "page_index": 507, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:22:11+07:00" }, "raw_text": "General Graph Directory BK TP.HCM root avi tc jim text mail countbook book mail unhex hyp avi count unhex hex Operating System Concepts 32 Silberschatz, Galvin and Gagne O2018" }, { "page_index": 508, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_033.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_033.png", "page_index": 508, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:22:14+07:00" }, "raw_text": "BK General Graph Directory (Cont.) TP.HCM How do we guarantee no cycles? Allow on/y links to file not subdirectories Garbage collection Every time a new link is added use a cycle detection algorithm to determine whether it is OK Operating System Concepts 33 Silberschatz, Galvin and Gagne @2018" }, { "page_index": 509, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_034.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_034.png", "page_index": 509, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:22:19+07:00" }, "raw_text": "BK File System n Mounting TP.HCM A file system must be mounted before it can be accessed A unmounted file system (i.e., Fig. (b) is mounted at a mount point Qusers bill fred sue jane C Ohelp Odoc prog (a) (b) Operating System Concepts 34 Silberschatz, Galvin and Gagne O2018" }, { "page_index": 510, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_035.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_035.png", "page_index": 510, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:22:21+07:00" }, "raw_text": "BK Mount Point TP.HCM users jane sue doc prog Operating System Concepts 35 Silberschatz, Galvin and Gagne C2018" }, { "page_index": 511, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_036.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_036.png", "page_index": 511, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:22:25+07:00" }, "raw_text": "BK File Sharing TP.HCM Sharing of files on multi-user systems is desirable Sharing may be done through a protection scheme On distributed systems, files may be shared across a network Network File System (NFs) is a common distributed file-sharing method If multi-user system Owner of a file / directory User /Ds identify users, allowing permissions and protections to be per-user Group of a file / directory Group /Ds allow users to be in groups, permitting group access rights Operating System Concepts 36 Silberschatz, Galvin and Gagne O2018" }, { "page_index": 512, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_037.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_037.png", "page_index": 512, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:22:29+07:00" }, "raw_text": "BK File Sharing - Remote File Systems TP.HCM Uses networking to allow file system access between systems Manually via programs like FTP Automatically, seamlessly using distributed file systems Semi automatically via the world wide web Client-server model allows clients to mount remote file systems from servers Server can serve multiple clients Client and user-on-client identification is insecure or complicated NFs is standard UNIX client-server file sharing protocol CIFs is standard Windows protocol Standard operating system file calls are translated into remote calls Distributed Information Systems (distributed naming services) such as LDAP, DNS, NIS, Active Directory implement unified access to information needed for remote computing Operating System Concepts 37 Silberschatz, Galvin and Gagne O2018" }, { "page_index": 513, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_038.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_038.png", "page_index": 513, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:22:34+07:00" }, "raw_text": "BK File Sharing - Failure Modes TP.HCM All file systems have failure modes For example corruption of directory structures or other non-user data, called metadata Remote file systems add new failure modes, due to network failure server failure Recovery from failure can involve state information about status of each remote request Stateless protocols such as NFS v.3 include all information in each request, allowing easy recovery but less security Operating System Concepts 38 Silberschatz, Galvin and Gagne O2018" }, { "page_index": 514, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_039.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_039.png", "page_index": 514, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:22:38+07:00" }, "raw_text": "BK File Sharing - Consistency Semantics TP.HCM Specify how multiple users are to access a shared file simultaneously Similar to Ch. 5 process synchronization algorithms Tend to be less complex due to disk l/O and network latency (for remote file systems Andrew File System (AFs) implemented complex remote file sharing semantics AFS has session semantics Writes only visible to sessions starting after the file is closed Unix file system (uFs) implements: Writes to an open file visible immediately to other users of the same open file Sharing file pointer to allow multiple users to read and write concurrently Operating System Concepts 39 Silberschatz, Galvin and Gagne O2018" }, { "page_index": 515, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_040.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_040.png", "page_index": 515, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:22:40+07:00" }, "raw_text": "BK Protection TP.HCM File owner/creator should be able to control: what can be done by whom Types of access Read Write Execute Append Delete List Operating System Concepts 40 Silberschatz, Galvin and Gagne 2018" }, { "page_index": 516, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_041.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_041.png", "page_index": 516, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:22:45+07:00" }, "raw_text": "BK Access Lists and Groups TP.HCM Mode of access: read (R), write (W), execute (X) Three classes of users on Unix / Linux RWX owner access 7 = 111 owner group public RWX 6 roup access = 110 chmod 761 game RWX c) public access 1 0 0 1 Ask manager to create a group (unique name), say G, and add some users to the group For a particular file (say game) or subdirectory, define an appropriate access. Attach a group to a file chgrp G game Operating System Concepts 41 Silberschatz, Galvin and Gagne O2018" }, { "page_index": 517, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_042.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_042.png", "page_index": 517, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:22:50+07:00" }, "raw_text": "Windows 7 Access-Control List BK Management TP.HCM ListPanel.java Properties General Security Details Previous Versions Object name: HDATAPattems MaterialSrcistPaneljava Group or user names: 8 SYSTEM Gregory G. Gagne (ggagne@wcusers.int) &Guest(WCUSERSGuest) g3 FileAdmins (WCUSERSFileAdmins) g3 Administrators (FILESAdministrators) To change pemissions.click Edit Edit... Pemissions for Guest Allow Deny Full control Modify V Read & execute V Read Write Special permissions For special permissions or advanced settings Advanced click Advanced Leam about access control and permissions OK Cancel Apply Operating System Concepts 42 Silberschatz, Galvin and Gagne O2018" }, { "page_index": 518, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_043.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_043.png", "page_index": 518, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:22:56+07:00" }, "raw_text": "BK A Sample UNIX Directory Listing TP.HCM 1 pbg staff 31200 Sep 3 08:30 intro.ps rw-rw-r-- drwx--- 5 pbg staff 512 Jul 8 09.33 private/ drwxrwxr-x 2 pbg staff 512 Jul 8 09:35 doc/ 2 pbg drwxrwx--- student 512 Aug 3 14:13 student-proj 1 pbg staff 9423 Feb 24 2003 rw-r--r-- program.c 1 pbg staff 20471 Feb 24 2003 rwxr-xr-x program drwx--x--x 4 pbg faculty 512 Jul 31 10:31 lib/ 3 pbg drwx---- staff 1024 Aug 29 06:52 mail/ drwxrwxrwx 3 pbg staff 512 Jul 8 09:35 test/ Operating System Concepts 43 Silberschatz, Galvin and Gagne O2018" }, { "page_index": 519, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_044.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_044.png", "page_index": 519, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:23:00+07:00" }, "raw_text": "BK Summary TP.HCM A file is an abstract data type defined and implemented by the operating system. It is a sequence of logical records. A logical record may be a byte, a line (of fixed or variable length), or a more complex data item. The operating system may specifically support various record types or may leave that support to the application program. A major task for the operating system is to map the /ogical file concept onto physical storage devices such as hard disk or NVM device. Since the physical record size of the device may not be the same as the logical record size, it may be necessary to order logical records into physical records. Again, this task may be supported by the operating system or left for the application program. Operating System Concepts 44 Silberschatz, Galvin and Gagne O2018" }, { "page_index": 520, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_045.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_045.png", "page_index": 520, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:23:05+07:00" }, "raw_text": "BK Summary (Cont.) TP.HCM Within a file system, it is useful to create directories to allow files to be organized. A sing/e-level directory in a multiuser system causes naming problems, since each file must have a unique name. A two- level directory solves this problem by creating a separate directory for each user's files. The directory lists the files by name and includes the file's location on the disk, length, type, owner, time of creation, time of last use, ... The natural generalization of a two-level directory is a tree-structured directory. A tree-structured directory allows a user to create subdirectories to organize files. Acyclic-graph directory structures enable users to share subdirectories and files but complicate searching and deletion. A general graph structure allows complete flexibility in the sharing of files and direc- tories but sometimes requires garbage collection to recover unused disk space Operating System Concepts 45 Silberschatz, Galvin and Gagne O2018" }, { "page_index": 521, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_046.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_046.png", "page_index": 521, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:23:09+07:00" }, "raw_text": "BK Summary (Cont.) TP.HCM Remote file systems present challenges in reliability, performance and security. Distributed information systems maintain user, host, and access information so that clients and servers can share state information to man- age use and access. Since files are the main information-storage mechanism in most computer systems, file protection is needed on multiuser systems. Access to files can be controlled separately for each type of access - read, write, execute, append, delete, list directory, and so on. File protection can be provided by access lists, passwords, or other techniques Operating System Concepts 46 Silberschatz, Galvin and Gagne O2018" }, { "page_index": 522, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_047.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_a/slide_047.png", "page_index": 522, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:23:12+07:00" }, "raw_text": "End of Chapter 1 10.A. M Whatlar OPERATING SYSTEM (OS) and How Does lt Work CLEVERISM.COM Silberschatz, Galvin and Gagne @2018 Operating System Concepts" }, { "page_index": 523, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_001.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_001.png", "page_index": 523, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:23:15+07:00" }, "raw_text": "Chapter 10.B: File-System Implementation M Whatlgar OPERATING SYSTEM (OS and How loes lt Work CLEVERISM.COM Some slides from the Silberschatz, Galvin and Gagne \"Operating System Concepts\", 10th eds, 2018 @2022" }, { "page_index": 524, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_002.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_002.png", "page_index": 524, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:23:19+07:00" }, "raw_text": "BK File-System Structure TP.HCM File structure Logical storage unit Collection of related information File system resides on secondary storage (e.g., disks) Provided user interface to storage, mapping logical to physical Provides efficient and convenient access to disk by allowing data to be stored, located, and retrieved easily Disk provides in-place rewrite and random access l/O transfers performed in blocks of sectors (usually 512 bytes) File control block (FCB) - storage structure consisting of information about a file Device driver controls the physical device File system is organized into layers Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 4 2022" }, { "page_index": 525, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_003.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_003.png", "page_index": 525, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:23:25+07:00" }, "raw_text": "BK Layered File System TP.HCM Layering useful for reducing complexity and application programs redundancy, but adds overhead and can decrease performance logical file system Device drivers_manage l/O devices at the I/O control layer E.g., Given commands like \"read drive1, cylinder file-organization module 72, track 2, sector 10, into memory location 1060' outputs low-level hardware specific commands to hardware controller basic file system Basic file system_given command like \"retrieve block 123\" translates to device driver Also manages memory buffers and caches l/O control (allocation, freeing, replacement) Buffers hold data in transit devices Caches hold frequently used data Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 5 2022" }, { "page_index": 526, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_004.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_004.png", "page_index": 526, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:23:29+07:00" }, "raw_text": "BK Layered File System TP.HCM application programs File organization module_understands files, logical address, and physical blocks Translates logical block # to physical block # logical file system Manages free space, disk allocation Logical file system_manages metadata information file-organization module Translates file name into file number, file handle location by maintaining file control blocks (i.e. inodes in UNIX) basic file system Directory management Protection l/O control Logical layers can be implemented by any coding method according to OS designer devices Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 6 2022" }, { "page_index": 527, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_005.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_005.png", "page_index": 527, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:23:32+07:00" }, "raw_text": "BK File-System Implementation TP.HCM We have system cal/s at the API level, but how do we implement their functions? On-disk and in-memory structures Boot control block contains info needed by system to boot OS from that volume Needed if volume contains OS, usually first block of volume Volume control block (e.g., superblock, master file table) contains volume details Total # of blocks, # of free blocks, block size, free block pointers or array Directory structure organizes the files Names and inode numbers, master file table Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 8 2022" }, { "page_index": 528, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_006.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_006.png", "page_index": 528, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:23:36+07:00" }, "raw_text": "BK File-System Implementation (Cont.) TP.HCM Entire disk Partition table Disk partition MBR Boot sector Partition control block FCB's Files and directories Some slides from the Silberschatz, Galvin and Gagne. \"Operating System Concepts\", 10th eds, 2018. 9 C2022" }, { "page_index": 529, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_007.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_007.png", "page_index": 529, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:23:40+07:00" }, "raw_text": "BK File-System Implementation (Cont.) TP.HCM Per-file File Control Block (FCB) contains many details about the file typically inode number, permissions, size, dates NTFS stores into in master file table using relational DB structures file permissions file dates (create, access, write file owner, group, ACL file size file data blocks or pointers to file data blocks Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 10 2022" }, { "page_index": 530, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_008.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_008.png", "page_index": 530, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:23:45+07:00" }, "raw_text": "BK In-Memory File System Structures TP.HCM Mount table storing file system mounts, mount points, file system types System-wide open-file table contains a copy of the FCB of each file and other info Per-process open-file table contains pointers to appropriate entries in system-wide open-file table as well as other info The following figure illustrates the necessary file system structures provided by the operating systems Figure (a) refers to opening a file Figure (b) refers to reading a file Plus buffers hold data blocks from secondary storage Open returns a file handle for subsequent use Data from read copied to specified user process memory address Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 11 2022" }, { "page_index": 531, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_009.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_009.png", "page_index": 531, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:23:49+07:00" }, "raw_text": "BK In-Memory File System Structures TP.HCM directory structure open (file name) directory structure file-control block kernel memory user space secondary storage (a) index data blocks read (index) per-process system-wide file-control block open-file table open-file table kernel memory user space secondary storage (b) Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 12 2022" }, { "page_index": 532, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_010.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_010.png", "page_index": 532, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:23:52+07:00" }, "raw_text": "BK Directory Implementation TP.HCM Linear list of file names with pointer to the data blocks Simple to program Time-consuming to execute Linear search time Could keep ordered alphabetically via linked list or use B+ tree Hash Table - linear list with hash data structure Decreases directory search time Collisions - situations where two file names hash to the same location Only good if entries are fixed size, or use chained-overflow method Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 13 2022" }, { "page_index": 533, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_011.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_011.png", "page_index": 533, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:23:56+07:00" }, "raw_text": "BK Allocation Methods - Contiguous TP.HCM An allocation method refers to how disk blocks are allocated for files Contiguous allocation - each file occupies set of contiguous blocks Best performance in most cases Simple - only starting location (block #) and length (number of blocks are required Problems include finding space for file, knowing file size, external fragmentation, need for compaction off-line (downtime) or on-line Some slides from the Silberschatz, Galvin and Gagne. \"Operating System Concepts\", 10th eds, 2018. 14 2022" }, { "page_index": 534, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_012.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_012.png", "page_index": 534, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:24:01+07:00" }, "raw_text": "BK Contiguous Allocation TP.HCM Mapping from logical to physical directory file start length count count 0 2 tr 14 3 mail 19 6 Q list 28 4 91011 : f 6 2 tr LA/512 12 131415 16171819 R mail 20212223 24252627 list 28293031 Block to be accessed = Q + starting address Displacement into block = R Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 15 C2022" }, { "page_index": 535, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_013.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_013.png", "page_index": 535, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:24:05+07:00" }, "raw_text": "BK Extent-Based Systems TP.HCM Many newer file systems (e.g., Veritas File System) use a modified contiguous allocation scheme Extent-based file systems allocate disk blocks in extents An extent is a contiguous block of disks Extents are allocated for file allocation A file consists of one or more extents Some slides from the Silberschatz, Galvin and Gagne. \"Operating System Concepts\", 10th eds, 2018. 16 2022" }, { "page_index": 536, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_014.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_014.png", "page_index": 536, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:24:10+07:00" }, "raw_text": "BK Allocation Methods - Linked TP.HCM Linked allocation - each file is a linked list of blocks File ends at nil pointer No external fragmentation Each block contains pointer to next block No compaction, external fragmentation Free space management system called when new block needed Improve efficiency by clustering blocks into groups but increases internal fragmentation Reliability can be a problem Locating a block can take many l/Os and disk seeks File Allocation Table (FAT) variation Beginning of volume has table, indexed by block number Much like a linked list. but faster on disk and cacheable New block allocation simple Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 17 2022" }, { "page_index": 537, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_015.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_015.png", "page_index": 537, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:24:15+07:00" }, "raw_text": "BK Linked Allocation TP.HCM directory file start end jeep 9 25 2 3 4 5 6 8 10 11 12131415 16171819 20212223 24252627 28293031 Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 19 2022" }, { "page_index": 538, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_016.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_016.png", "page_index": 538, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:24:18+07:00" }, "raw_text": "BK File-Allocation Table (FAT) TP.HCM directory entry test 217 name start block 0 217 618 339 618 339 number of disk blocks FAT Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 20 2022" }, { "page_index": 539, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_017.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_017.png", "page_index": 539, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:24:21+07:00" }, "raw_text": "BK Allocation Methods - lndexed TP.HCM Indexed allocation Each file has its own index block(s) of pointers to its data blocks Logical view index table Some slides from the Silberschatz, Galvin and Gagne. \"Operating System Concepts\", 10th eds, 2018. 21 C2022" }, { "page_index": 540, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_018.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_018.png", "page_index": 540, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:24:26+07:00" }, "raw_text": "BK Example of Indexed Allocation TP.HCM directory file index block jeep 19 2 5 8 1011 9 16 12 13 1 10 19 18 19 25 -1 202122Z23 -1 -1 24252627 28293031 Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 22 2022" }, { "page_index": 541, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_019.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_019.png", "page_index": 541, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:24:30+07:00" }, "raw_text": "BK Indexed Allocation (Cont.) TP.HCM Need index table Random access Dynamic access without external fragmentation, but have overhead of index block E.g., Mapping from logical to physical in a file of maximum size of 256K bytes and block size of 512 bytes. We need only 1 block for index table Q = displacement into index table Q R = displacement into block LA/512 R Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 23 C2022" }, { "page_index": 542, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_020.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_020.png", "page_index": 542, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:24:37+07:00" }, "raw_text": "Combined Scheme: UNIX UFS BK Suppose that on a computer, the Os uses i- TP.HCM nodes and each disk block is 4KB. Assume that an i-node contains 12 direct block numbers (disk addresses) and the block numbers for one indirect block file one double indirect block metadata and one triple indirect block. Assume also that a block data number is 4 bytes. What is the largest possible file on that direct blocks data computer (assuming the disk is large enough) data single indirect blocks data data 4K bytes per data double indirect blocks block,32-bit data triple indirect addresses data data blocks data More index data blocks than can data be addressed data with 32-bit file data pointer data data Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018 27 2022" }, { "page_index": 543, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_021.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_021.png", "page_index": 543, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:24:46+07:00" }, "raw_text": "BK File (user view) TP.HCM directory inode#1109 triple-indirect block#32 foo.txt (10 blocks) file inode# double-indirect=2 A B C D E 123 double-indirect=3 . G H 1 11 foo.txt 777 A B E file inode#777 2 3 4 5 6 7 8 9 permissions size 10 11 12 13 14 15 16 17 18 19 moditication time access time directblock=0 20 21 directblock=1 22 23 24 25 26 27 28 29 indirectblock=20 double-indirect=30 C D triple-indirect=32 30 31 32 33 34 35 36 37 38 39 single indirect block#20 double-indirect block#30 single indirect block #38 directblock=35 indirectblock=38 direct-block=9 directblock=36 indirectblock=39 direct-block=19 Some slides fron \"Operating Syste 28022" }, { "page_index": 544, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_022.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_022.png", "page_index": 544, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:24:50+07:00" }, "raw_text": "BK Free-Space Management TP.HCM File system maintains free-space list to track available blocks/clusters (Using term \"block\" for simplicity) Bit vector or bit map (n blocks) 0 1 2 n-1 bit[1]= 1 => block[i] free 8 0 =block[i] occupied Block number calculation number of bits per word)* (number of 0-value words) + offset of first 1 bit CPUs have instructions to return offset within word of first \"1\" bit Some slides from the Silberschatz, Galvin and Gagne. \"Operating System Concepts\", 10th eds, 2018. 31 2022" }, { "page_index": 545, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_023.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_023.png", "page_index": 545, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:24:55+07:00" }, "raw_text": "BK Free-Space Management .(Cont.) TP.HCM Bit map requires extra space Example: block size = 4KB = 212 bytes disk size = 240 bytes (1 terabyte) n = 240/212 = 228 bits (or 32MB if clusters of 4 blocks -> 8MB of memory Easy to get contiguous files Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 32 C2022" }, { "page_index": 546, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_024.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_024.png", "page_index": 546, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:24:59+07:00" }, "raw_text": "BK Linked Free Space List on Disk TP.HCM Linked list (free list) Cannot get contiguous space free-space list head - easily 2 3 No waste of space No need to traverse the entire 8 list (if # free blocks recorded) 12 13 16 18 19 20212223 24 25 26 27 28293031 Some slides from the Silberschatz, Galvin and Gagne. \"Operating System Concepts\", 10th eds, 2018. 33 C2022" }, { "page_index": 547, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_025.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_025.png", "page_index": 547, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:25:03+07:00" }, "raw_text": "BK Free-Space e Management (Cont.) TP.HCM Grouping Modify linked list to store address of next (n-1) free blocks in first free block, plus a pointer to next block that contains free-block-pointers (like this one) Counting Because space is frequently contiguously used and freed, with contiguous-allocation allocation, extents, or clustering Keep address of first free block and count of following free blocks Free space list then has entries containing addresses and counts Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 34 C2022" }, { "page_index": 548, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_026.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_026.png", "page_index": 548, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:25:09+07:00" }, "raw_text": "BK Free-Space Management .(Cont.) TP.HCM Grouping 2 3 Modify linked list to store address of 4 5 6 7 next (n) free blocks in first free block. plus a pointer to next block that 8 9 10 11 contains free-block-pointers (like this 12 13 14 15 one) 16 17 18 19 Grouping, n = 3 20 21 22 23 Bock 2 stores 3,4,5 24 25 26 27 Bock 5 stores 8,9,10 28 29 30 31 Block 10 stores 11, 12, 13 Bock 13 stores 17,28,25 Bock 25 stores 26,27 Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 35 2022" }, { "page_index": 549, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_027.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_027.png", "page_index": 549, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:25:16+07:00" }, "raw_text": "BK Free-Space Management .(Cont.) TP.HCM Counting 0 2 3 Because space is frequently 4 5 6 7 contiguously used and freed, with contiguous-allocation allocation, 8 9 10 11 extents, or clustering 12 13 14 15 Keep address of first free block and 16 17 18 19 count of following free blocks 20 21 22 23 Free space list then has entries 24 25 26 27 containing addresses and counts 28 29 30 31 start count 2 4 8 6 17 2 25 3 Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 36 2022" }, { "page_index": 550, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_028.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_028.png", "page_index": 550, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:25:20+07:00" }, "raw_text": "BK Efficiency and Performance TP.HCM Efficiency dependent on: Disk allocation and directory algorithms Types of data kept in file's directory entry Pre-allocation or as-needed allocation of metadata structures Fixed-size or varying-size data structures Performance Keeping data and metadata close together Buffer cache - separate section of main memory for frequently used blocks Synchronous writes sometimes requested by apps or needed by Os No buffering / caching - writes must hit disk before acknowledgement Asynchronous writes more common, buffer-able, faster Free-behind and read-ahead - techniques to optimize sequential access Reads frequently slower than writes Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018 39 2022" }, { "page_index": 551, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_029.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_029.png", "page_index": 551, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:25:25+07:00" }, "raw_text": "BK Recovery TP.HCM Consistency checking - compares data in directory structure with data blocks on disk, and tries to fix inconsistencies Can be slow and sometimes fails Use system programs to back up data from disk to another storage device (magnetic tape, other magnetic disk, optical) Recover lost file or disk by restoring data from backup Some slides from the Silberschatz, Galvin and Gagne. \"Operating System Concepts\", 10th eds, 2018. 43 2022" }, { "page_index": 552, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_030.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_030.png", "page_index": 552, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:25:29+07:00" }, "raw_text": "BK Log Structured File Systems TP.HCM Log structured (or iournaling) file systems record each metadata update to the file system as a transaction All transactions are written to a log A transaction is considered committed once it is written to the log (sequentially) Sometimes to a separate device or section of disk However, the file system may not yet be updated The transactions in the log are asynchronously written to the file system structures When the file system structures are modified, the transaction is removed from the log If the file system crashes, all remaining transactions in the log must still be performed Faster recovery from crash, removes chance of inconsistency of metadata Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 44 2022" }, { "page_index": 553, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_031.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_031.png", "page_index": 553, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:25:37+07:00" }, "raw_text": "BK The Apple File System TP.HCM In 2017, Apple, Inc., released a new file system to replace its 30-year-old HFS+ file system. HFS+ had been stretched to add many new features, but as usual, this process added complexity, along with lines of code, and made adding more features more difficult. Starting from scratch on a blank page allows a design to start with current technologies and methodologies and provide the exact set of features needed. Apple File System (APFS) is a good example of such a design. Its goal is to run on all current Apple devices, from the Apple Watch through the iPhone to the Mac computers. Creating a file system that works in watchOs, I/Os, tvOS, and macOS is certainly a challenge. APFS is feature-rich, including 64-bit pointers, clones for files and directories, snapshots, space sharing, fast directory sizing, atomic safe-save primitives, copy-on-write design, encryp- tion (single- and multi-key), and I/O coalescing. It understands NVM as well as HDD storage. Most of these features we've discussed, but there are a few new concepts worth exploring. Space sharing is a ZFS-like feature in which storage is avail able as one or more large free spaces (containers) from which file systems can draw allocations (allowing APFS-formatted volumes to grow and shrink)) Fast directory sizing provides quick used-space calculation and updating. Atomic safe-save is a primitive (available via API, not via file-system com- mands) that performs renames of files, bundles of files, and directories as single atomic operations. I/O coalescing is an optimization for NVM devices in which several small writes are gathered together into a large write to optimize write performance. Apple chose not to implement RAID as part of the new APFS, instead depending on the existing Apple RAID volume mechanism for software RAID. APFS is also compatible with HFS+, allowing easy conversion for existing deployments. Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 47 2022" }, { "page_index": 554, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_032.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_032.png", "page_index": 554, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:25:41+07:00" }, "raw_text": "BK Summary TP.HCM Most file systems reside on secondary storage, which is designed to hold a large amount of data permanently. The most common secondary-storage medium is the disk, but the use of NVM devices is increasing Storage devices are segmented into partitions to control media use and to allow multiple, possibly varying, file systems on a single device. These file systems are mounted onto a logical file system architecture to make them available for use. File systems are often implemented in a layered or modular structure. The lower levels deal with the physical properties of storage devices and communicating with them. Upper levels deal with symbolic file names and logical properties of files. Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 48 2022" }, { "page_index": 555, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_033.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_033.png", "page_index": 555, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:25:47+07:00" }, "raw_text": "BK Summary (Cont. TP.HCM The various files within a file system can be allocated space on the storage device in three ways: through contiguous, linked, or indexed allocation. Contiguous allocation can suffer from external fragmentation. Direct access is very inefficient with linked allocation. Indexed allocation may require substantial overhead for its index block. These algorithms can be optimized in many ways. Contiguous space can be enlarged through extents to increase flexibility and to decrease external fragmentation. Indexed allocation can be done in clusters of multiple blocks to increase throughput and to reduce the number of index entries needed. Indexing in large clusters is similar to contiguous allocation with extents. Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 49 2022" }, { "page_index": 556, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_034.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_034.png", "page_index": 556, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:25:51+07:00" }, "raw_text": "BK Summary (Cont.) TP.HCM Free-space allocation methods also influence the efficiency of disk- space use, the performance of the file system, and the reliability of secondary storage. The methods used include bit vectors and linked lists. Optimizations include grouping, counting, and the FAT, which places the linked list in one contiguous area. Directory-management routines must consider efficiency, performance, and reliability. A hash table is a commonly used method, as it is fast and efficient. Unfortunately, damage to the table or a system crash can result in inconsistency between the directory information and the disk's contents. A consistency checker can be used to repair damaged file-system structures. Operating-system backup tools allow data to be copied to magnetic tape or other storage devices, enabling the user to recover from data loss or even entire device loss due to hardware failure operating system bug, or user error. Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 50 2022" }, { "page_index": 557, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_035.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_035.png", "page_index": 557, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:25:55+07:00" }, "raw_text": "BK Summary (Cont.) TP.HCM Due to the fundamental role that file systems play in system operation, their performance and reliability are crucial. Techniques such as log structures and caching help improve performance, while log structures and RAID improve reliability. The WAFL file system is an example of optimization of performance to match a specific l/0 load. Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 51 2022" }, { "page_index": 558, "chapter_num": 10, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_036.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_10_b/slide_036.png", "page_index": 558, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:25:58+07:00" }, "raw_text": "End of Chapter 1 10.B M Whatlgar OPERATING SYSTEM (OS and How loes lt Work CLEVERISM.COM Some slides from the Silberschatz, Galvin and Gagne \"Operating System Concepts\", 10th eds, 2018 2022" }, { "page_index": 559, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_001.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_001.png", "page_index": 559, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:26:01+07:00" }, "raw_text": "Chapter 11: Mass-Storage Systems H Whatlgar OPERATING SYSTEM (OS) and How loes lt Work CLEVERISM.COM Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. Chapter 10,OS Slides, CSE-HCMUT O2022" }, { "page_index": 560, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_002.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_002.png", "page_index": 560, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:26:04+07:00" }, "raw_text": "BK Outline TP.HCM Overview of Mass Storage Structure HDD Scheduling NVM Scheduling Error Detection and Correction Storage Device Management Swap-Space Management Storage Attachment RAlD Structure Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 2 OS Slides,CSE-HCMUT O2022" }, { "page_index": 561, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_003.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_003.png", "page_index": 561, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:26:08+07:00" }, "raw_text": "BK Obiectives TP.HCM Describe the physical structure of secondary storage devices and the effect of a device's structure on its uses Explain the performance characteristics of mass-storage devices Evaluate l/O scheduling algorithms Discuss operating-system services provided for mass storage including RAID Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 3 OS Slides,CSE-HCMUT @2022" }, { "page_index": 562, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_004.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_004.png", "page_index": 562, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:26:12+07:00" }, "raw_text": "BK Overview of Mass Storage Structure TP.HCM Bulk of secondary storage for modern computers is hard disk drives (HDDs) and nonvolatile memory (NVM) devices HDDs spin platters of magnetically-coated material under moving read-write heads Disks can be removable Head crash results from disk head making contact with the disk surface That's bad Performance Drive rotation is at 60 to 250 times per second Transfer rate is rate at which data flow between drive and computer Positioning time (random-access time) is time to move disk arm to desired cylinder (seek time) and time for desired sector to rotate under the disk head (rotational latency) Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 4 OS Slides,CSE-HCMUT O2022" }, { "page_index": 563, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_005.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_005.png", "page_index": 563, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:26:16+07:00" }, "raw_text": "BK Moving-head Disk Mechanism TP.HCM track t -spindle t-armassembl sectors read-write cylinder c- head platter arm rotation Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 5 OS Slides, CSE-HCMUT C2022" }, { "page_index": 564, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_006.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_006.png", "page_index": 564, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:26:20+07:00" }, "raw_text": "BK Example of Hard Disk Drives TP.HCM Platters range from .85\" to 14\" (historically) Commonly 3.5\", 2.5\", and 1.8 Range from 30GB to 3TB per drive Performance Transfer Rate - theoretical - 6 Gb/sec Effective Transfer Rate - real - 1Gb/sec Seek time from 3ms to 12ms (e.g., 9ms is common for desktop drives) Average seek time is measured or calculated based on 1/3 of tracks Latency based on spindle speed 1/ (RPM / 60) = 60 /RPM Average latency = 1/2 latency Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 6 OS Slides,CSE-HCMUT O2022" }, { "page_index": 565, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_007.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_007.png", "page_index": 565, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:26:25+07:00" }, "raw_text": "BK Hard Disk Performance TP.HCM Access Latency = Average access time = average seek time + average rotational latency For fastest disk: 3ms + 2ms = 5ms For slow disk: 9ms + 5.56ms = 14.56ms Average I/O time = average access time + (amount to transfer 1 transfer rate) + controller overhead For example, to transfer a 4KB block on a 7200 RPM disk with a 5ms average seek time, 1Gb/sec transfer rate with a 0.1ms controller overhead, the average l/O time for 4KB block is = 5ms + 4.17ms + 0.1ms + transfer time Transfer time = 4KB / 1Gb/s = /4*8 (KB) *1000 (ms)l/ 10242 (KB) = 0.031 ms = 9.27ms + .031ms = 9.301ms Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 7 OS Slides,CSE-HCMUT @2022" }, { "page_index": 566, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_008.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_008.png", "page_index": 566, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:26:29+07:00" }, "raw_text": "BK Address Mapping TP.HCM Disk drives are addressed as large 1-dimensional arrays of logical b/ocks, where the logical block is the smallest unit of transfer Low-level formatting creates logical blocks on physical media The 1-dimensional array of logical blocks is mapped into the sectors of the disk sequentially Sector 0 is the first sector of the first track on the outermost cylinder Mapping proceeds in order through that track, then the rest of the tracks in that cylinder, and then through the rest of the cylinders from outermost to innermost Logical to physical address should be easy Except for bad sectors Non-constant # of sectors per track via constant angular velocity Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 15 OS Slides,CSE-HCMUT O2022" }, { "page_index": 567, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_009.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_009.png", "page_index": 567, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:26:32+07:00" }, "raw_text": "BK HDD Scheduling TP.HCM The operating system is responsible for using hardware efficiently - for the disk drives, this means having a fast access time and disk bandwidth Seek time seek distance Disk bandwidth is the total number of bytes transferred, divided by the total time between the first request for service and the completion of the last transfer Minimize seek time Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 16 OS Slides,CSE-HCMUT O2022" }, { "page_index": 568, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_010.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_010.png", "page_index": 568, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:26:37+07:00" }, "raw_text": "BK Disk Scheduling (Cont.) TP.HCM There are many sources of disk l/O request OS System processes Users processes I/O request includes input or output mode, disk address, memory address, number of sectors to transfer OS maintains queue of requests, per disk or device Idle disk can immediately work on l/O request, busy disk means work must queue Optimization algorithms only make sense when a queue exists In the past, operating system responsible for queue management, disk drive head scheduling Now, built into the storage devices, controllers Just provide LBAs, handle sorting of requests Some slides from the Silberschatz, Galvin and Gagne \"Operating System Concepts\", 10th eds, 2018. 17 OS Slides,CSE-HCMUT O2022" }, { "page_index": 569, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_011.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_011.png", "page_index": 569, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:26:41+07:00" }, "raw_text": "BK Disk Scheduling (Cont.) TP.HCM Note that drive controllers have small buffers and can manage a queue of I/O requests (of varying \"depth\") Several algorithms exist to schedule the servicing of disk I/O requests The analysis is true for one or many platters E.g., We illustrate scheduling algorithms with a request queue (0- 199) 98, 183, 37, 122, 14, 124, 65, 67 Head pointer -> 53 Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 18 OS Slides,CSE-HCMUT O2022" }, { "page_index": 570, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_012.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_012.png", "page_index": 570, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:26:45+07:00" }, "raw_text": "BK First Come First Served (FCFS) TP.HCM Illustration shows total head movement of 640 cylinders queue = 98, 183, 37, 122, 14, 124, 65, 67 head starts at 53 0 14 37 536567 98 122124 183199 Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 19 OS Slides,CSE-HCMUT C2022" }, { "page_index": 571, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_013.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_013.png", "page_index": 571, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:26:48+07:00" }, "raw_text": "BK SCAN TP.HCM The disk arm starts at one end of the disk, and moves toward the other end, servicing requests until it gets to the other end of the disk where the head movement is reversed and servicing continues. SCAN algorithm sometimes called the elevator algorithm But note that if requests are uniformly dense, largest density at other end of disk and those wait the longest Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 20 OS Slides,CSE-HCMUT O2022" }, { "page_index": 572, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_014.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_014.png", "page_index": 572, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:26:52+07:00" }, "raw_text": "BK SCAN (Cont.) TP.HCM Illustration shows total head movement of 208 cylinders queue = 98,183, 37, 122, 14, 124, 65, 67 head starts at 53 0 14 37 536567 98 122124 183199 Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 21 OS Slides,CSE-HCMUT C2022" }, { "page_index": 573, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_015.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_015.png", "page_index": 573, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:26:56+07:00" }, "raw_text": "BK C-SCAN TP.HCM Provides a more uniform wait time than SCAN The head moves from one end of the disk to the other, servicing requests as it goes When it reaches the other end, however, it immediately returns to the beginning of the disk, without servicing any requests on the return trip Treats the cylinders as a circular list that wraps around from the last cylinder to the first one Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 22 OS Slides,CSE-HCMUT O2022" }, { "page_index": 574, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_016.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_016.png", "page_index": 574, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:26:59+07:00" }, "raw_text": "BK C-SCAN (Cont.) TP.HCM Total number of cylinders? queue = 98, 183, 37, 122, 14, 124, 65, 67 head starts at 53 0 14 37 53 65 67 98 122124 183199 Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 23 OS Slides,CSE-HCMUT C2022" }, { "page_index": 575, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_017.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_017.png", "page_index": 575, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:27:05+07:00" }, "raw_text": "BK Selecting a Disk-Scheduling Algorithm TP.HCM FCFS is common and has a natural appeal sCAN and C-sCAN perform better for systems that place a heavy load on the disk (less starvation, but still possible) To avoid starvation Linux implements deadline scheduler Maintains separate read and write queues, gives read priority Because processes more likely to block on read than write Implements four queues: 2 x read and 2 x write 1 read and 1 write queue sorted in LBA order, (implementing C-SCAN) 1 read and 1 write queue sorted in FCFS order All I/O requests sent in batch sorted in that queue's order After each batch, checks if any requests in FCFS older than configured age (default 500ms) If so, LBA queue containing that request is selected for next batch of I/O In RHEL 7, NOOP and completely fair queueing scheduler (CFQ) are also available, defaults vary by storage device Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 24 OS Slides,CSE-HCMUT O2022" }, { "page_index": 576, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_018.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_018.png", "page_index": 576, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:27:09+07:00" }, "raw_text": "BK NVM Scheduling TP.HCM No disk heads or rotational latency but still room for optimization In RHEL 7, NOOP (no scheduling) is used but adiacent LBA requests are combined NVM best at random I/O, HDD at sequential Throughput can be similar Input/Output operations per second (IOPS) much higher with NVM (hundreds of thousands vs hundreds) But write amplification (one write, causing garbage collection and many read/writes) can decrease the performance advantage Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 25 OS Slides,CSE-HCMUT O2022" }, { "page_index": 577, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_019.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_019.png", "page_index": 577, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:27:13+07:00" }, "raw_text": "BK Error Detection and Correction TP.HCM Fundamental aspect of many parts of computing (memory networking, storage) Error detection determines if there a problem has occurred (for example a bit flipping) If detected, can halt the operation Detection frequently done via parity bit Parity - one form of checksum - uses modular arithmetic to compute store, compare values of fixed-length words Another error-detection method common in networking is Cyclic Redundancy Check (CRC) which uses hash function to detect multiple-bit errors Error-correction code (Ecc) not only detects, but can correct some errors Soft errors correctable, hard errors detected but not corrected Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 26 OS Slides,CSE-HCMUT O2022" }, { "page_index": 578, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_020.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_020.png", "page_index": 578, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:27:17+07:00" }, "raw_text": "BK Storage Attachment TP.HCM Computers access storage in three ways host-attached network-attached cloud Host attached access through local I/O ports, using one of several technologies To attach many devices, use storage busses such as USB, firewire thunderbolt High-end systems use fibre channel (FC) High-speed serial architecture using fibre or copper cables Multiple hosts and storage devices can connect to the FC fabric Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 31 OS Slides,CSE-HCMUT O2022" }, { "page_index": 579, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_021.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_021.png", "page_index": 579, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:27:21+07:00" }, "raw_text": "Network-Attached Storage BK TP.HCM Network-attached storage (NAs) is storage made available over a network rather than over a local connection (such as a bus) Remotely attaching to file systems NFS and CIFS are common protocols Implemented via remote procedure calls (RPCs) between host and storage over typically TCP or UDP on IP network iSCsI protocol uses IP network to carry the SCSI protocol Remotely attaching to devices (blocks) client NAS client LANZWAN NAS client Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 32 OS Slides,CSE-HCMUT @2022" }, { "page_index": 580, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_022.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_022.png", "page_index": 580, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:27:25+07:00" }, "raw_text": "BK Cloud Storage TP.HCM Similar to NAS, provides access to storage across a network Unlike NAS, accessed over the Internet or a WAN to remote data center NAS presented as just another file system, while cloud storage is API based, with programs using the APIs to provide access Examples include Dropbox, Amazon S3, Microsoft OneDrive, Apple iCloud Use APIs because of latency and failure scenarios (NAS protocols wouldn't work well) Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 33 OS Slides,CSE-HCMUT O2022" }, { "page_index": 581, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_023.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_023.png", "page_index": 581, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:27:29+07:00" }, "raw_text": "BK Storage Array TP.HCM Can just attach disks, or arrays of disks Avoids the NAS drawback of using network bandwidth Storage Array has controller(s), provides features to attached host(s Ports to connect hosts to array Memory, controlling software (sometimes NVRAM, etc) A few to thousands of disks RAiD, hot spares, hot swap (discussed later Shared storage -> more efficiency Features found in some file systems Snaphots, clones, thin provisioning, replication, deduplication, etc Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 34 OS Slides,CSE-HCMUT O2022" }, { "page_index": 582, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_024.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_024.png", "page_index": 582, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:27:33+07:00" }, "raw_text": "BK RAlD Structure TP.HCM RAiD - redundant array of inexpensive disks multiple disk drives provides reliability via redundancy Increases the mean time to failure Mean time to repair - exposure time when another failure could cause data loss Mean time to data loss based on above factors If mirrored disks fail independently, consider disk with 1300,000 mean time to failure and 10 hour mean time to repair Mean time to data loss is 100, 0002/ (2 * 10) = 500 * 106 hours, or 57,000 years! Frequently combined with NVRAM to improve write performance Several improvements in disk-use techniques involve the use of multiple disks working cooperatively Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 37 OS Slides,CSE-HCMUT O2022" }, { "page_index": 583, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_025.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_025.png", "page_index": 583, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:27:38+07:00" }, "raw_text": "BK RAlD (Cont.) TP.HCM Disk striping uses a group of disks as one storage unit RAlD is arranged into six different levels RAlD schemes improve performance and improve the reliability of the storage system by storing redundant data Mirroring or shadowing (RAID 1) keeps duplicate of each disk Striped mirrors (RAID 1+0) or mirrored stripes (RAID 0+1) provides high performance and high reliability Block interleaved parity (RAID 4, 5, 6) uses much less redundancy RAlD within a storage array can still fail if the array fails, so automatic replication of the data between arrays is common Frequently, a small number of hot-spare disks are left unallocated, automatically replacing a failed disk and having data rebuilt onto them Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 38 OS Slides,CSE-HCMUT O2022" }, { "page_index": 584, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_026.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_026.png", "page_index": 584, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:27:42+07:00" }, "raw_text": "BK Traditional and Pooled Storage TP.HCM FS FS FS volume volume volume a) Traditional volumes and file systems ZFS ZFS ZFS storagepool (b) ZFS and pooled storage Some slides from the Silberschatz, Galvin and Gagne, \"Operating System Concepts\", 10th eds, 2018. 43 OS Slides, CSE-HCMUT C2022" }, { "page_index": 585, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_027.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_027.png", "page_index": 585, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:27:48+07:00" }, "raw_text": "BK Object Storage TP.HCM General-purpose computing, file systems Object storage not sufficient for very large scale management software like Hadoop file system Another approach - start with a storage (HDFS) and Ceph pool and place objects in it determine where to store objects, manages Object just a container of data protection No way to navigate the pool to find objects (no directory structures, few Typically by storing N services) copies, across N systems, in the object Computer-oriented, not user-oriented storage cluster Typical sequence Horizontally scalable Create an object within the pool, receive Content addressable an object ID unstructured Access object via that ID Delete object via that ID Some slides from the Silberschatz, Galvin and Gagne \"Operating System Concepts\", 10th eds, 2018. 44 OS Slides,CSE-HCMUT O2022" }, { "page_index": 586, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_028.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_028.png", "page_index": 586, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:27:53+07:00" }, "raw_text": "BK Summary TP.HCM Hard disk drives and nonvolatile memory devices are themajor secondary storage l/O units on most computers. Modern secondary storage is structured as large one-dimensional arrays of logical blocks. Drives of either type may be attached to a computer system in one of three ways: (1) through the local l/O ports on the host computer, (2) directly connected to motherboards, or (3) through a communications network or storage network connection. Requests for secondary storage l/O are generated by the file system and by the virtual memory system. Each request specifies the address on the device to be referenced in the form of a logical block number. Some slides from the Silberschatz, Galvin and Gagne \"Operating System Concepts\", 10th eds, 2018. 45 OS Slides,CSE-HCMUT O2022" }, { "page_index": 587, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_029.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_029.png", "page_index": 587, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:27:59+07:00" }, "raw_text": "BK Summary (Cont.) TP.HCM Disk-scheduling algorithms can improve the effective bandwidth of HDDs, the average response time, and the variance in response time. Algorithms such as SCAN and C-SCAN are designed to make such improvements through strategies for disk-queue ordering. Performance of disks cheduling algorithms can vary greatly on hard disks. In contrast, because solid-state disks have no moving parts, performance varies little among scheduling algorithms, and quite often a simple FCFS strategy is used. Data storage and transmission are complex and freguently result in errors. Error detection attempts to spot such problems to alert the system for corrective action and to avoid error propagation. Error correction can detect and repair problems, depending on the amount of correction data available and the amount of data that was corrupted Some slides from the Silberschatz, Galvin and Gagne \"Operating System Concepts\", 10th eds, 2018. 46 OS Slides,CSE-HCMUT O2022" }, { "page_index": 588, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_030.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_030.png", "page_index": 588, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:28:05+07:00" }, "raw_text": "BK Summary (Cont.) TP.HCM Storage devices are partitioned into one or more chunks of space. Each partition can hold a volume or be part of a multidevice volume. File systems are created in volumes. The operating system manages the storage device's blocks. New devices typically come pre-formatted. The device is partitioned, file systems are created, and boot blocks are allocated to store the system's bootstrap program if the device will contain an operating system. Finally, when a block or page is corrupted, the system must have a way to lock out that block or to replace it logically with a spare. An efficient swap space is a key to good performance in some systems. Some systems dedicate a raw partition to swap space, and others use a file within the file system instead. Still other systems allow the user or system administrator to make the decision by providing both options Some slides from the Silberschatz, Galvin and Gagne \"Operating System Concepts\", 10th eds, 2018. 47 OS Slides,CSE-HCMUT O2022" }, { "page_index": 589, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_031.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_031.png", "page_index": 589, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:28:11+07:00" }, "raw_text": "BK Summary (Cont.) TP.HCM Because of the amount of storage required on large systems, and because storage devices fail in various ways, secondary storage devices are frequently made redundant via RAiD algorithms. These algorithms allow more than one drive to be used for a given operation and allow continued operation and even automatic recovery in the face of a drive failure. RAlD algorithms are organized into different levels; each level provides some combination of reliability and high transfer rates. Object storage is used for big data problems such as indexing the Internet and cloud photo storage. Objects are self-defining collections of data, addressed by object ID rather than file name. Typically it uses replication for data protection, computes based on the data on systems where a copy of the data exists, and is horizontally scalable for vast capacity and easy expansion. Some slides from the Silberschatz, Galvin and Gagne \"Operating System Concepts\", 10th eds, 2018. 48 OS Slides,CSE-HCMUT @2022" }, { "page_index": 590, "chapter_num": 11, "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_032.png", "metadata": { "doc_type": "slide", "course_id": "CO2017", "source_file": "/workspace/data/converted/CO2017_Operating_Systems/Chapter_11/slide_032.png", "page_index": 590, "language": "en", "ocr_engine": "PaddleOCR 3.2", "extractor_version": "1.0.0", "timestamp": "2025-10-31T12:28:15+07:00" }, "raw_text": "End of Chapter 11 M What lar OPERATING SYSTEM (OS) and How Does lt Work CLEVERISM.COM Some slides from the Silberschatz, Galvin and Gagne. \"Operating System Concepts\", 10th eds, 2018. Chapter 10,OS Slides, CSE-HCMUT O2022" } ] }