CS/System software
[System software] (5) Operating system
jac99
2023. 12. 24. 03:35
Access provided to a user:
- batch processing sys: 순차적으로 처리
- time-sharing sys: 동시간에 여러 개 처리
- real-time sys: 정의한 시간 안에 프로세스 완료
Run-time environment
- virtual machine/ 확장 머신 : 하드웨어 이름만 알고 있으면 불러서 쓸 수 있다.
- 멀티프로그래밍: 일정 시간: 여러개 일이 잘라서 처리 - > resource 관리해줘야 함
Machine-dependent os features
OS 특징 ( 전체적으로 resource 관리)
- interrupt processing
- process scheduling
- i/o supervision
- management of real memory
- mag of virtual memory
Interrupt processing
- 흐름이 변화한다. 프로그램 실행하다가 중간에 interrupt 발생 → interrupt 먼저 처리해줘야 한다.
- 언제 발생: 아무도 모름. ( 프로그램과 인터럽 서로 관계 없다 )
- 입출력 처리 땜에 발생할 수 있다 ( 왜냐: 속도…)
- 0으로 나워서
- 각 프로세스 시간 있다.
- interrupt occur → interrupt processing routine 실행
SIC/XE interrupt type
I - SVC
II- Program
III- Timer
IV- I/O
- interrupt 발생 - > CPU 상태 저장해야함( interrupt work area 공간에서 )
- timer interrupt 발생 → 또 timer interrupt 발생 - > 안됨.
Context switching
= saving and restoring cpu status n register
Mask
Is used to control whether interrupts are allowed
→ prevent certain intterrupts form occuring which the 1st one is being processed
to be masked
- to be pending
Nested interrupt processing
I/O interrupt → status of A is saved → timer interrupt → control is transfered to timer interrupt handler → LPS instruction → return to I/O interrupt handler.
Process scheduling
management of the CPU by switching control among various competing processes
- time-slice: max amount of CPU time the task is allowed to use
- running state→ ready state
- dispatching = selection of a process and give it control
- PSB: process status block
- ETB: event status block
- preemptive process scheduling: transfer control to the highest priority process
Algorithm for wait& signal
- examines ESBFLAG → not occured → ESBQUEUE
I/O supervision
- I/O channel: hardware to take care of transfering data and controlling I/O devices
Management of real memory
fixed partition
- Using when sizes of job tend to cluster around certiain common value & job size does not change frequently
- fixed size and position
variable partition
- Is allocated dynamically
- The OS needs to maintain a linkedlist of free memory area
- first-fit allocation(first free area) or best-fit allocation(smallest area)
- PMT( page map table) : mapping pages onto page frames
Management of virtual memory
- virtual memory may be larger than total amount of real memory
- backing store and virtual-to-real mapping are invisible to user
Virtual-to-Real mapping using a page map table
- implement of the page table as array in central memory can be inefficient
- using technique in conbination with high speed buffer
- demand-paging sys: avoid wasted memory
- threshing: collapse of service cuz high page rate
- avoid by page fault rate to be much lower ( memory references)
- page fault error: a page has not been loaded to real memory→ program interrupt called page fault