Chapter 9 Flashcards
Operating System Support
Define
Purpose of Operating System
To mask the details of the hardware from the programmer and provide the programmer with a convenient interface for using the system
List
Services OS provides
Program creation
Program execution
Access to I/O devices
Controlled access to files
System access
Error detection and response
Accounting
List
Key interfaces in a typical computer system
Instruction set architecture (ISA)
Application binary interface (ABI)
Application programming interface (API)
Define
Instruction set architecture
Defines the machine language instructions that a computer can follow.
Boundary between hardware and software.
Define
Application binary interface
Defines a standard for binary portability across programs.
Defines the system call interface to the operating system and the hardware resources and services available in a system through the user ISA
Define
Application programming interface
Gives a program access to the hardware resources and services available in a system through the user ISA supplemented with high-level language (HLL) library calls.
Using an API enables applicatoin software to be ported easily to other systems that support the same API
Describe
How the OS is unusual as a control mechanism
It functions as ordinary computer software - is a program executed by the processor.
OS frequently relinquishes control and must depend on the processor to allow it to regain control.
List
Types of Operating systems
Interactive system
Batch system
Define
Interactive system
OS type
The user/programmer interacts directly with the computer to request the execution of a job or to perform a transaction.
User may, depending on the nature of the application, communicate with the computer during the execution of the job
Define
Batch system
OS type
Opposite of interactive. The user’s program is batched together with programs from other users and submitted by a computer operator. After the program is completed results are printed out for the user.
Describe
Batch OS from view of processor
Processor executes instructions from the portion of main memory containing the monitor. These instructions are in the job control language (JCL). The monitor handles setup and scheduling
monitor = batch OS
List
Desirable hardware features
Memory protection
Privileged instructions
Timer
Interrupts
Define
Memory protection
User program must not alter the memory area containing the monitor.
The process hardware should detect an error and transfer control to the monitor
The monitor aborts the job, prints an error message, and loads the next job
Define
Privledged instructions
Can only be executed by the monitor
If the processor encounters such an instruction while executing a user program, and error interrupt occurs.
I/O instructions are privileged so the monitor retains control of all I/O devices
Define
Batch multiprogramming vs Time Sharing
BM: maximizes processor use. JCL commands provided with the job.
Time Share: minimizes response time. Commands entered at the terminal.
Define
Long-term scheduling
The decision to add to the pool of processes to be executed.
Determines which programs are submitted for processing.
Once submitted, a job becomes a process for the short term scheduler.
In some systems a newly created process begins in a swapped-out condition, in which case it is added to a queue for the medium-term scheduler.
Define
Medium-term scheduling
The decision to add to the number of processes that are partially or fully in mm.
Part of swapping function.
Swapping-in decision is based on the need to manage the degree of multiprogramming.
Swapping-in decision will consider the memory requirements of the swapped-out processes
Define
Short-term scheduling
The decision as to which available process will be executed by the processor
AKA dispatcher
Executes frequently and makes the fine-grained decision of which job to execute next
Define
I/O scheduling
The decision as to which process’s pending I/O request shall be handled by an available I/O device
Define
Advantages and disadvantages of Demand Paging
Each page of a process is brought in only when it is needed
Adv: More processes can be maintained in memory. Time is saved because unused pages are not swapped in and out of memory
Dis: When one page is brought in, another must be replaced. If a page is thrown out before used, OS must get again. Thrashing
Define
Segmentation
Usually visible to the programmer.
Provided as a convenience for organizing programs and data and as a means for associating privilege and protection attributes with instructions and data.
Allows the programmer to view memory as consisting of multiple address spaces or segments.
List
Advantages of segmentation
- Simplifies handling of growing data structures
- Allows programs to be altered and recompiled independently without requiring that an entire set of programs be re-linked and re-loaded
- Lends itself to sharing among processes
- Lends itself to protection
Describe
Intel x86 and Memory Mangement
for referring on test, understand more than memorize
Includes hardware for both segmentation and paging.
Unsegmented unpaged memory - virtual address same as physical address. Useful in low-complexity, high-performance controller applications.
Unsegmented paged memory - memory is viewed as a paged linear address space. Protection and management of memory is done via paging. Favored by some OSs
Segmented unpaged memory - Memory is viewed as a collection of logical address spaces. Affords protection down to level of single byte. Guarantees that the translation table needed is on-chip when the segment is in memory. Results in predictable access times.
Segmented paged memory - Segmentation is used to define logical memory partitions subject to access control, and paging is used to manage the allocation of memory within the partitions. Operating systems such as UNIX System V favor this view
Describe
Segmentation bit details
Each virtual address consists of a 16-bit segment reference (2 bits deal with protection mech, 14 specify seg) and a 32-bit offset.
Unsegmented virtual memory is 2^32 = 4Gbytes.
Segmented virtual memory is 2^46 = 64Tbytes.
Physical address space employs a 32-bit address for a maximum of 4Gbytes.
Virtual address space is divided into two parts: global and local.