Operating System Structure
- Multiprogramming - One job selected and run via job scheduling
- Timesharing(multitasking) - Timesharing is logical extension in which CPU switches jobs so frequently that users can interact with each jab while it is running, creating interactive computing
Operating-System Operations
- Interrupt driven by hardware
- Software error or request creates exception or trap
- Other process problems include infinite loop, processes modifying each other or the operating system
- Dual-mode - Dual-mode operation allows OS to protect itself and other system components
- User mode and Kernel mode
- Mode bit povided by hardware
- user mode : 1 (included typical codes)
- kernel mode : 0 (included I/O codes)
- Timer - To prevent infinite loop/process hogging resources
- Set interrupt after specific period
- Operating system decrements counter
- When counter zero generate an interrupt
- Set up before scheduling process to regain control or terminate program that exceeds allotted time
Operating-System Activities
- Process Management Activities
- Creating and deleting both user and system processes
- Suspending and resuming processes
- Providing mechanisms for process communication
- Providing mechanisms for deadlock handling
- Memory Management Activities
- Keeping track of which parts of memory are currently being used and by whom
- Deciding which processes(or parts thereof) and data to move into and out of memory
- Allocating and deallocating memory space as needed
- Storage Management Activities
- Creating and deleting files and directories
- Primitives to manipulate files and dirs
- Mapping files onto secondary storage
- Backup files onto stable storage media
- Mass-Storage Management Activities
- Free-space management
- Storage allocation
- Disk scheduling
- Caching
- Important principle, performed at many levels in a computer(in hardware, operating system, software)
- Information in use copied from slower to faster storage temporarily
- Faster storage (cache) checked first to determine if information is there
- If it is, information used directly from the cache (fast)
- If not, data copied to cache and used there
- Cache smaller than storage being cached
- Cache management important design problem
- Cache size and replacement policy
- I/O Subsystem
- One purpose of OS is to hide peculiarities of hardware devices from the user
- I/O subsystem responsible for
- - Memory management of I/O including buffering, caching, spooling
- #buffering is storing data temporarily while it is being transferred
- #spooling is the overlapping of output of one job with input of other jobs
- - General device-driver interface
- - Drivers for specific hardware devices
참고 : Operating System Concepts by WILEY
댓글 없음:
댓글 쓰기