Академический Документы
Профессиональный Документы
Культура Документы
Authors:
Abraham Silberschatz, Peter Baer Galvin, Greg Gagne:
Title
Operating System Concepts
Publisher
8th Edition, Wiley India
Unit - 1
Chapter 1: Introduction
What is an Operating System?
• Operating system
• Controls and coordinates use of hardware among various applications and users
• Users
• People, machines, other computers
Four Components of a Computer System
What Operating Systems Do?
•User View:
• Users want convenience, ease of use, they don’t care about resource utilization
• But shared computer such as mainframe or minicomputer must keep all users
happy. Other users are accessing the same computer through other terminals.
Theses users share resources and may exchange information.
• Handheld computers are resource poor, optimized for usability and battery life.
System View
• From the computer’s point of view, the operating system is the program most
closely associated with the hardware.
• The OS acts as a manager of these resources. It decides how much and when
to allocate these resources.
• OS is a resource allocator
• Manages all resources
• Decides between conflicting requests for efficient and fair resource use
• OS is a control program
• Controls execution of programs to prevent errors and improper use of the computer
• The one program running at all times on the computer” is the kernel.
Everything else is either a system program (ships with the operating system)
or an application program.
Computer System Organization
•Discussion about:
Solid
state
devices
Cache memory
Important principle, performed at many levels in a computer
(in hardware, operating system, software)
• The controller starts the transfer of data from the device to its
local buffer.
• Once the transfer of data is completed, the device controller
informs the device driver via an interrupt that it has finished its
operations.
• The device driver in turn returns the control to the OS, possibly
returning the data or a pointer to the data (in case of read).
• This method is a overhead and hence DMA is used for large data
transfer.
Direct Memory Access Structure (DMA)
• Multiprocessor system:
• Multiprocessors systems growing in use and importance
• Also known as parallel systems, tightly-coupled systems
• Advantages include:
1. Increased throughput : expected to get more work done
2. Economy of scale : cheaper than multiple single processor system
3. Increased reliability – graceful degradation or fault tolerance
• Two types:
1. Asymmetric Multiprocessing ( one master and other processors slaves)
2. Symmetric Multiprocessing ( all are of same capacity)
Symmetric Multiprocessing Architecture
A Dual-Core Design
• OS activities
• Free-space management
• Storage allocation
• Disk scheduling
• Traditional computer
• Office environment
• PCs connected to a network, terminals attached to mainframe or
minicomputers providing batch and timesharing
• Home networks
• Used to be single system, then modems
• Now firewalled, networked
Computing Environments (Cont.)
Client-Server Computing
Dumb terminals supplanted by smart PCs
Many systems now servers, responding to requests generated
by clients
Compute-server provides an interface to client to request
services (i.e., database)
File-server provides interface for clients to store and
retrieve files
Peer-to-Peer Computing
• Another model of distributed system
• Accounting - To keep track of which users use how much and what
kinds of computer resources
• Some of them are simply user interfaces to system calls. Others are
considerably more complex
• Example includes OS, Compiler, loader, linker ….
• File management
- Create, delete, copy, rename, print, dump, list, and generally
manipulate files and directories
• Status information
• Some ask the system for info - date, time, amount of available
memory, disk space, number of users
• Others provide detailed performance, logging, and debugging
information
• Typically, these programs format and print the output to the
terminal or other output devices
• Some systems implement a registry - used to store and retrieve
configuration information
System Programs (cont’d)
• File modification
• Text editors to create and modify files
• Special commands to search contents of files or perform transformations of the
text
1. Simple structure
2. Layered approach
3. Microkernels
4. Modules
Operating System Structure
1. Simple Structure
Many commercial OS do not have well defined structures.
Frequently such system started as small and simple.
Example : MS -DOS
• MS-DOS – written to provide the most functionality in the least space
• Not divided into modules
• It was basically written by looking into Intel 8088
Microprocessor
• Application program are able to access the basic I/O routines
to write directly to the display and disk drives.
• Such a freedom leaves MS-DOS vulnerable to errant
programs.
2. Layered Approach
• Benefits of microkernel:
• Easier to extend a operating system
• All the new services are added to user space
• More reliable (less code is running in kernel mode)
• More secure, since very less part is running as kernel mode
• Detriments:
• Performance overhead of user space to kernel space
communication
4. Modules
• Current methodology for operating system design
involves using object oriented programming
technique to create a modular kernel.
• CPU scheduling and virtual memory techniques creates the illusion that a
process has its own processor and its own memory.
• Virtual machine concept extends the above concept for the entire hardware.
• The class loader, loads the compiled .class files from both java
program and the Java API for execution by the Java interpreter.
• After the class is loaded the verifier checks for the validity of the java
program and later it is interpreted.
The Java Virtual Machine
Operating-System Debugging – Failure analysis
• If process fails, most operating system write error information to a log file.
• The OS can also take a core dump,- a capture of memory of the process.
• The core image is stored in the memory for later analysis.
• Running programs and core dumps can be probed by debugger tool.
D-Trace
• D-Trace tool in Solaris, FreeBSD, Mac OS X allows live instrumentation on
production systems.
• Probes fire when code is executed, capturing state data and sending it to
consumers of those probes
System Boot
• The procedure of starting a computer by loading the kernel
is known as booting the system.
• On most computer, a small piece of code known as
bootstrap program or bootstrap loader locates the kernel
loads it into memory and starts its execution.
• In some systems it is two step process in which a simple
bootstrap loader fetches a more complex boot program from
disk which in turn loads the kernel.
• Firmware using EPROM or ROM is used to hold the initial
boot code.
End of Chapter 2