- •Scheduling : Scheduling criteria's ос.
- •Paging : fifo ,min,lru, Second chance, Enhanced second chance
- •Os File Operations
- •Scheduling: First Come First Served (fcfs)
- •Paging : the temporal locality and the spatial locality. What effect do these have on the performance of paging?
- •File Access Methods a & Directory Operations
- •Scheduling: Round Robin Scheduling (rr)
- •Paging : a working set, a thrashing and what are strategies to eliminate it?
- •Protection & File System Implementation
- •Scheduling : Shortest Job First (sjf)
- •Paging : a page fault, how does the os know it needs to take one, and what does the os do when a page fault occurs?
- •How Disks Work. Disk Overheads
Scheduling: First Come First Served (fcfs)
First Come First Served (FCFS) . The First-Come-First-Served algorithm is the simplest scheduling algorithm. Processes are dispatched in order according to their arrival time on the ready queue. Being a nonpreemptive discipline, once a process has a CPU, it runs to completion. The FCFS scheduling is fair in the formal sense or human sense of fairness but it is unfair in the sense that long jobs make short jobs wait and unimportant jobs make important jobs wait. FCFS is more predictable than most of other schemes since the scheduling order can be easily understood and the code for FCFS scheduling is simple to write and understand. However, the FCFS scheme is not useful in scheduling interactive processes because it cannot guarantee good response time. One of the major drawbacks of this scheme is that the average time is often quite long. Short jobs or jobs that frequently perform I/O can have very high waiting times since long jobs can monopolize the CPU.
The First-Come-First-Served algorithm is rarely used as a master scheme in modern operating systems but it is often embedded within other schemes.
Paging : the temporal locality and the spatial locality. What effect do these have on the performance of paging?
Performance Of Demand Paging
• Theoretically, a process could access a new page with each instruction.
• Fortunately, processes typically exhibit locality of reference
– Temporal locality: if a process accesses an item in memory, it will tend to reference the same item again soon.
– Spatial locality: if a process accesses an item in memory, it will tend to reference an adjacent item soon.
Good temporal locality ⇒ cache miss traffic
decreases fast when cache size increases
Good spatial locality ⇒ cache miss traffic
does not increase much when line size
increases
• Let p be the probability of a page fault (0 ! p ! 1).
• Effective access time = (1-p) x ma + p x page fault time
– If memory access time is 200 ns and a page fault takes 25 ms
– Effective access time = (1-p) x 200 + p x 25,000,000
File Access Methods a & Directory Operations
File access methods
• Some file systems provide different access methods
that specify ways the application will access data
– sequential access
• read bytes one at a time, in order
– direct access
• random access given a block/byte #
– record access
• file is array of fixed- or variable-sized records
– indexed access
• FS contains an index to a particular field of each record in a file
• apps can find a file based on value in that record (similar to DB)
Directory Operations
• Directories provide:
– a way for users to organize their files
– a convenient file name space for both users and FS’s
• Most file systems support multi-level directories
– naming hierarchies (/, /usr, /usr/local, /usr/local/bin, …)
• Most file systems support the notion of current
directory
– absolute names: fully-qualified starting from root of FS
bash$ cd /usr/local
– relative names: specified with respect to current directory
bash$ cd /usr/local (absolute)
bash$ cd bin (relative, equivalent to cd /usr/local/bin)
Экзаменационный билет № 27
1. Scheduling :Round Robin Scheduling (RR)
2. Paging : a working set, a thrashing and what are strategies to eliminate it?
3. Protection & File System Implementation
