Chapter 8
Chapter 8
Chapter 8
System Management
Evaluating an Operating System In real-life OS, components don't work in isolation. Each component depends on other components. Most OS designed to work with certain piece of hardware, category of processors, or specific groups of users. Evolved over time to operate multiple systems. (for multi-user computer but not for a small research center) Still favor some users & computing environments. (was written for programmer but not for business offices operator. E.g. DOS and UNIX command) To evaluate OS, must understand design goals, history, how it communicates with users, how resources managed, & what trade-offs made to achieve goals.
The Operating Systems Components Performance of any resource depends on performance of others. Any improvement in system made after analysis of systems resources, requirements, managers, & users.
Key is to consider performance of entire system & not just individual components.
Memory Management Schemes If increase memory or change to another memory allocation scheme must consider actual operating environment in which system resides. Trade-off between memory use & CPU overhead.
Example
CPU running student programs average run for 100 ms. But the system design for relocating the memory partition for speed up the throughput, it take 125 ms to move a partition.
File Management Secondary storage allocation schemes help user organize and access files on system. File organization (contiguous, non-contiguous). Location of a volumes directory (main memory, disk). Device on which files are stored. Different schemes offer different flexibility, but trade-off for increased file flexibility is increased CPU overhead.
Processor Management Issues Trade-off: better use of CPU versus increased overhead, slower response time, & decreased throughput. System could reach saturation point if CPU is fully utilized but is allowed to accept additional jobsresult in higher overhead & less time to run programs. Under heavy loads, CPU time required to manage I/O queues (which under normal circumstances doesnt require much time) could dramatically increase time required to run jobs. With long queues forming at channels, control units, & I/O devices, CPU could be idle waiting for processes to finish their I/O.
Ways To Improve I/O Device Utilization Blocking reduces number of physical I/O requests, but CPU must block & later deblock records (overhead). Buffering helps CPU match slower speed of I/O, but requires memory space for buffers which reduces level of processing. Rescheduling requests helps optimize I/O times, but is overhead function. Speed of CPU & I/O device weighed against time to execute reordering. Trade-offs: each of these options also increases CPU overhead & uses additional memory space.
Example Assuming the system requires 1000 instructions to reorder I/O requests. The CPU takes 30 ms for reordering the requests. The disk Drive A the access speed is 35 ms for each track. Question Let assume that the system consisting of the CPU access Track 1, Track9, Track1 and thenTrack9, and that the arm is already located at Track1. If without reordering, then Drive A requires 105 ms (35 ms + 35 ms + 35 ms = 105 ms)
If reordering, than we assume CPU takes 30 ms, then Drive A requires 65 ms (30 ms + 35 ms) Track 1, Track1, Track9 and thenTrack9, and that the arm is already located at Track1. Then the arm can perform both access on Track1 before traveling the Track9 for other two access
Assuming the system requires 1000 instructions to reorder I/O requests. The CPU takes 30 ms for reordering the requests. The disk Drive B the access speed is 5 ms for each track. Let assume that the system consisting of the CPU access Track 1, Track9, Track1 and thenTrack9, and that the arm is already located at Track1. If without reordering, then Drive B requires 15 ms (5 ms + 5 ms + 5 ms = 15 ms)
If reordering, than we assume CPU takes 30 ms, then Drive A requires 35 ms (30 ms + 5 ms) Track 1, Track1, Track9 and thenTrack9, and that the arm is already located at Track1. Then the arm can perform both access on Track1 before traveling the Track9 for other two access
Measuring System Performance Total system performance -- the efficiency with which a computer system meets its goals. Not easy to measure system efficiency because affected by: user programs, OS programs, & hardware units. (e.g. the page replacement algorithms) System performance can be very subjective & difficult to quantify. Even when performance is quantifiable (e.g., number of disk accesses per minute), it is relative. Based on interactions of 3 components & workload being handled by system.
Measurement Tools Throughput. Capacity. Response time. Turnaround time. Resource utilization. Availability. Reliability.
Measures of performance cant be taken in isolation from workload being handled by system.
Throughput & Capacity Measures Throughput -- indicates productivity of system as whole. Measured under steady-state conditions. Gives the number of jobs processed per day or the number of on-line transactions handled per hour. Also measures volume of work handled by computer system unit. maximum throughput level. Resource becomes saturated & processes in system arent being passed along. When main memory over-committed & level of multiprogramming has peaked. Thrashing results from saturated disk drive
Response or Turnaround Time Measure Response time -- interval required to process users request from when user presses key to send message until system indicates receipt of message. Important to on-line interactive users. Turnaround time -- time from submission of job until its output is returned to user in batch jobs. Measure depends on workload handled by system at request time & on job/request type submitted. To accurately measure system predictability, response time & turnaround time must include their average & variance.
Resource Utilization & Availability Measures Resource utilization -- measure of how much each unit is contributing to overall operation. Given as a percentage of time that resource is actually in use. Helps determine if balance among units of system or if system is I/O-bound or CPU-bound. Availability -- indicates likelihood that resource will be ready when user needs it. Unit will be operational & not out of service a user needs it. Mean time between failures (MTBF). Mean time to repair (MTTR). Mean time between failures (MTBF) -- average time that a unit is operational before it breaks down. Mean time to repair (MTTR) -- average time needed to fix a failed unit and put it back in service. Availability (A) = MTBF . MTBF + MTTR
Reliability Measures probability that unit will not fail during a given time period and its a function of MTBF. Feedback Loops To prevent processor from spending more time doing overhead than executing jobs, OS continuously monitors system & feed info to Job Scheduler -- feedback loop. Scheduler allow more jobs to enter the system or prevent new jobs from entering until some congestion relieved. Negative feedback loop mechanism monitors system &, when it becomes too congested, signals appropriate manager to slow down arrival rate of processes. Positive feedback loop mechanism monitors system, & when system becomes underutilized, causes arrival rate to increase. Used in paged virtual memory systems.
Thrashing
CPU Utilization
Degree of Multiprogramming
Monitoring Hardware monitors are more expensive but have minimum impact on system because theyre outside of it & attached electronically. E.g., hard-wired counters, clocks, and comparative elements. Software monitors are relatively inexpensive but because they become part of system they can distort results of analysis. Tools developed for each specific system; difficult to move. System measurements include other hardware units & OS, compilers, & other system software. Measurements are made in a variety of ways. Benchmarks, simulation models.
Accounting Most computer system resources are paid for by users. With single user -- easy to calculate cost of system. In a multi-user environment, costs distributed among users based on how much each uses systems resources. OS sets up user accounts, assigns passwords, identifies which resources available to each user, & defines quotas for available resources (e.g., disk space or max. CPU time per job). To calculate cost of whole system, accounting program must collect info on each active user.
Pricing Policies Total amount of time spent between job submission and completion Connect time -- in interactive environments this is the time from log-in to log-out. CPU time is time spent by the processor executing job. Main memory usage in units of time, bytes of storage, or bytes of storage multiplied by units of time. Secondary storage used during program execution can be given in units of time or space, or both. Secondary storage used during the billing period is usually given in terms of number of disk tracks allocated.
Use of system software includes utility packages, compilers, and/or databases. Number of I/O operations -- usually grouped by device class: line printer, terminal, and disks. Time spent waiting for I/O completion. Number of input records read -- usually grouped by type of input device. Number of output records printed -- usually grouped by type of output device. Number of page faults -- reported in paging systems.
Pricing Incentives Convince users to distribute their workload to system managers advantage. Encourage users to access more plentiful and cheap resources rather than those that are scarce and expensive.
Billing Information Some systems only give info on resource use. Other systems also calculate price of most costly items (e.g., CPU utilization, disk storage use, supplies) at end of every job. Advantage of maintaining billing records on-line -- status of each user checked before users job is allowed to enter READY queue. Disadvantage is overhead. Memory space is used & CPU processing is increased. Can defer accounting program until off-hours, when system is lightly loaded.
System Security System has conflicting needs: to share resources while protecting them. In early days, system was physically guarded & only authorized users were allowed in vicinity. With advent of data communication, networking, personal computers, telecommunications software, web sites, and e-mail, computer security much more difficult. When networks connected to Internet, vulnerability & need for information security increased exponentially.
LAN connected
(without Internet)
medium
medium
low
high
Techniques to Protect Hardware & Software Passwords -- unusual combination of characters & numbers that is memorable, changed often. Guard against intruders who use default passwords, backdoor passwords, dictionary terms, or social engineering. Smart cardcredit card-sized calculator that requires something user has with something user knows. Making backups & performing other archiving techniques. Layered backup schedule used to back up entire system weekly & daily backup only files changed during that day. Store copies of complete system backups in safe offsite location. Help restore systems damaged by viruses or disasters (e.g., fires, malfunctions, hackers).
Written policies & procedures & regular user training are essential elements of system management. Frequent password changes. Reliable backup procedures. Guidelines for loading new software. Compliance with software licenses. Network safeguards. Guidelines for monitoring network activity. Rules for terminal access.
CPU
Round Robin
Process P1 P2 P3 P4 Burst Time 53 20 68 24
P2
42 44
P3
64 66
P4
86
34
Best-Fit Algorithm
5 KB
5 KB
P1 (1 KB)
5 KB
First-Fit Algorithm