Download Chapter 2: System Structures

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Mobile operating system wikipedia , lookup

Security-focused operating system wikipedia , lookup

MTS system architecture wikipedia , lookup

Acorn MOS wikipedia , lookup

Library (computing) wikipedia , lookup

DNIX wikipedia , lookup

Copland (operating system) wikipedia , lookup

Plan 9 from Bell Labs wikipedia , lookup

Distributed operating system wikipedia , lookup

Booting wikipedia , lookup

Windows NT startup process wikipedia , lookup

OS 2200 wikipedia , lookup

RSTS/E wikipedia , lookup

Process management (computing) wikipedia , lookup

Burroughs MCP wikipedia , lookup

Spring (operating system) wikipedia , lookup

Paging wikipedia , lookup

CP/M wikipedia , lookup

Unix security wikipedia , lookup

VS/9 wikipedia , lookup

Transcript
Chapter 2: System Structures
Operating System Concepts – 9th Edition
Silberschatz, Galvin and Gagne ©2013
Operating System Services
n
Operating systems provide an environment for execution of programs and
services to programs and users
n
One set of operating-system services provides functions that are helpful to the
user:
l
User interface - Almost all operating systems have a user interface (UI).
4
Varies between Command-Line (CLI), Graphics User Interface (GUI),
Batch
l
Program execution - The system must be able to load a program into
memory and to run that program, end execution, either normally or
abnormally (indicating error)
l
I/O operations - A running program may require I/O, which may involve a
file or an I/O device
l
File-system manipulation - The file system is of particular interest.
Programs need to read and write files and directories, create and delete
them, search them, list file Information, permission management.
Operating System Concepts – 9th Edition
2.*
Silberschatz, Galvin and Gagne ©2013
Operating System Services (Cont.)
l
Communications – Processes may exchange information, on the
same computer or between computers over a network
4
l
Communications may be via shared memory or through
message passing (packets moved by the OS)
Error detection – OS needs to be constantly aware of possible
errors
4
May occur in the CPU and memory hardware, in I/O devices, in
user program
4
For each type of error, OS should take the appropriate action to
ensure correct and consistent computing
4
Debugging facilities can greatly enhance the user’s and
programmer’s abilities to efficiently use the system
Operating System Concepts – 9th Edition
2.*
Silberschatz, Galvin and Gagne ©2013
Operating System Services (Cont.)
n
Another set of OS functions exists for ensuring the efficient operation of the
system itself via resource sharing
l
Resource allocation - When multiple users or multiple jobs running
concurrently, resources must be allocated to each of them
4 Many types of resources - Some (such as CPU cycles, main memory,
and file storage) may have special allocation code, others (such as I/O
devices) may have general request and release code
l
Accounting - To keep track of which users use how much and what kinds
of computer resources
l
Protection and security - The owners of information stored in a multiuser
or networked computer system may want to control use of that
information, concurrent processes should not interfere with each other
4 Protection involves ensuring that all access to system resources is
controlled
4 Security of the system from outsiders requires user authentication,
extends to defending external I/O devices from invalid access
attempts
4 If a system is to be protected and secure, precautions must be
instituted throughout it. A chain is only as strong as its weakest link.
Operating System Concepts – 9th Edition
2.*
Silberschatz, Galvin and Gagne ©2013
Types of System Calls
n
Process control
l
end, abort
l
load, execute
l
create process, terminate process
l
get process attributes, set process attributes
l
wait for time
l
wait event, signal event
l
allocate and free memory
l
Dump memory if error
l
Debugger for determining bugs, single step execution
l
Locks for managing access to shared data between processes
Operating System Concepts – 9th Edition
2.*
Silberschatz, Galvin and Gagne ©2013
Types of System Calls
n
n
File management
l
create file, delete file
l
open, close file
l
read, write, reposition
l
get and set file attributes
Device management
l
request device, release device
l
read, write, reposition
l
get device attributes, set device attributes
l
logically attach or detach devices
Operating System Concepts – 9th Edition
2.*
Silberschatz, Galvin and Gagne ©2013
Types of System Calls (Cont.)
n
n
Information maintenance
l
get time or date, set time or date
l
get system data, set system data
l
get and set process, file, or device attributes
Communications
l
create, delete communication connection
l
send, receive messages if message passing model to host name or
process name
4
From client to server
l
Shared-memory model create and gain access to memory regions
l
transfer status information
l
attach and detach remote devices
Operating System Concepts – 9th Edition
2.*
Silberschatz, Galvin and Gagne ©2013
Types of System Calls (Cont.)
n
Protection
l
Control access to resources
l
Get and set permissions
l
Allow and deny user access
Operating System Concepts – 9th Edition
2.*
Silberschatz, Galvin and Gagne ©2013
System Programs
n
n
System programs provide a convenient environment for program
development and execution. They can be divided into:
l
File manipulation
l
Status information sometimes stored in a File modification
l
Programming language support
l
Program loading and execution
l
Communications
l
Background services
l
Application programs
Most users’ view of the operation system is defined by system
programs, not the actual system calls
Operating System Concepts – 9th Edition
2.*
Silberschatz, Galvin and Gagne ©2013
System Programs
n
Provide a convenient environment for program development and
execution
l Some of them are simply user interfaces to system calls; others
are considerably more complex
n
File management - Create, delete, copy, rename, print, dump, list,
and generally manipulate files and directories
n
Status information
l Some ask the system for info - date, time, amount of available
memory, disk space, number of users
l Others provide detailed performance, logging, and debugging
information
l Typically, these programs format and print the output to the
terminal or other output devices
l Some systems implement a registry - used to store and retrieve
configuration information
Operating System Concepts – 9th Edition
2.*
Silberschatz, Galvin and Gagne ©2013
System Programs (Cont.)
n
File modification
l Text editors to create and modify files
l Special commands to search contents of files or perform
transformations of the text
n
Programming-language support - Compilers, assemblers,
debuggers and interpreters sometimes provided
n
Program loading and execution- Absolute loaders, relocatable
loaders, linkage editors, and overlay-loaders, debugging systems for
higher-level and machine language
n
Communications - Provide the mechanism for creating virtual
connections among processes, users, and computer systems
l Allow users to send messages to one another’s screens, browse
web pages, send electronic-mail messages, log in remotely,
transfer files from one machine to another
Operating System Concepts – 9th Edition
2.*
Silberschatz, Galvin and Gagne ©2013
System Programs (Cont.)
n
Background Services
l Launch at boot time
4 Some for system startup, then terminate
4 Some from system boot to shutdown
l Provide facilities like disk checking, process scheduling, error
logging, printing
l Run in user context not kernel context
l Known as services, subsystems, daemons
n
Application programs
l Don’t pertain to system
l Run by users
l Not typically considered part of OS
l Launched by command line, mouse click, finger poke
Operating System Concepts – 9th Edition
2.*
Silberschatz, Galvin and Gagne ©2013
System Boot
n
When power initialized on system, execution starts at a fixed
memory location
l
n
Firmware ROM used to hold initial boot code
Operating system must be made available to hardware so hardware
can start it
l
Small piece of code – bootstrap loader, stored in ROM or
EEPROM locates the kernel, loads it into memory, and starts it
l
Sometimes two-step process where boot block at fixed location
loaded by ROM code, which loads bootstrap loader from disk
n
Common bootstrap loader, GRUB, allows selection of kernel from
multiple disks, versions, kernel options
n
Kernel loads and system is then running
Operating System Concepts – 9th Edition
2.*
Silberschatz, Galvin and Gagne ©2013