본문 바로가기

전체 글

(10)
Operating System Design - Synchronization Tools Backgound Concurrent access to shared data may result in data inconsistency Maintaining data consistency requires mechanisms to ensure the orderly execution of cooperating processes Race Condition Unless there is mutual exclusion, the same pid could be assigned to two different processes Critical Section When one process in critical section, no other may be in its critical section Solution : Mut..
Operating System Design - CPU Scheduling Basic Concepts Maximum CPU utilization obtained with multiprogramming In CPU–I/O Burst Cycle, during I/O burst processing, CPU can handle other process CPU Scheduler CPU scheduler selects from among the processes in ready queue, and allocates the a CPU core to one of them CPU scheduling decisions may take place when a process: 1. Switches from running to waiting state 2. Switches from running to..
Operating System Design - Threads & Concurrency Single and Multithreaded Processes Benefits of Multithread: Responsiveness : may allow continued execution if part of process is blocked, especially important for user interfaces Resource Sharing : threads share resources of process, easier than shared memory or message passing Economy : cheaper than process creation, thread switching lower overhead than context switching Scalability : process c..
Operating System Design - Processes Process Concept Process : a program in execution; process execution must progress in sequential fashion program code (text section), program counter, processor registers, Stack containing temporary data, Data section containing global variables, Heap containing memory dynamically allocated during run time One program can be several processes Process State New : The process is being created Runni..
Operating System Design - Operating System Structures Operating System Services User interface Program execution I/O operation File-system manipulation Communications Error detection Resource allocation Logging Protection and security System Call Programming interface to the services provided by the Operating System Mostly accessed by programs via a high-level API rather than direct system call use Typically, a number associated with each system ca..
Operating System Design - File System Implementation File-System Structure File system reside on secondary storage (disk) File control block (FCB) : storage structure consisting of information about a file Device driver controls the physical device Layered File System Device driver manage I/O devices at the I/O control layer Basic file system : given command like "retrieve block 1" translates to device driver manages memory buffer and caches File ..
Operating System Design - I/O Systems I/O hardware Port : connection point for device Bus : daisy chain or shared direct access Controller(host adapter) : elections that operate port, bus, device I/O instructions controler device (data-in-register, data-out-register, status register, control register) Devices have addresses used by Direct I/O instructions, Memory-mapped I/O Polling The CPU repeatedly checks the command line bit (to ..
Operating System Design - Virtual Memory Background of Virtual Memory Code needs to be in memory to execute, but entire program rarely used Entire program code not needed at same time Each program takes less memory while running => more programs run at the same time Increased CPU utilization and throughput with no increase in response time or turnaround time Less I/O needed to load or swap programs into memory => program runs faster Vi..