OsServices for Helping Users· Program execution- Load a program into memory- Run the program-End execution·eithernormallyor· abnormally (indicating error)6
6 OS Services for Helping Users • Program execution – Load a program into memory – Run the program – End execution • either normally or • abnormally (indicating error)
OsServicesfor HelpingUsers 1/o operations - A running program may requireI/O, which may involve a file or an I/O device- Common I/Os: read, write, etc.- Special functions: recording CD/DVDNotes: Users usually cannot control I/O devicesdirectly, so OS provides a mean to do I/O- Mainly for efficiency and protection7
7 OS Services for Helping Users • I/O operations - A running program may require I/O, which may involve a file or an I/O device – Common I/Os: read, write, etc. – Special functions: recording CD/DVD • Notes: Users usually cannot control I/O devices directly, so OS provides a mean to do I/O – Mainly for efficiency and protection
Os Services for Helping Users File-system manipulation - The file system is ofparticular interest-Os provides a variety offile systemsMajorservices-readandwritefilesand directories-createanddeletefilesanddirectories search for a given file-list file Information- permission management: allow/deny access8
8 OS Services for Helping Users • File-system manipulation - The file system is of particular interest – OS provides a variety of file systems • Major services – read and write files and directories – create and delete files and directories – search for a given file – list file Information – permission management: allow/deny access
Os Services for Helping Users Communications:information exchange betweenprocesses-Processes onthe same computer-Processes between computers over a networkImplementations- Shared memory. Two or more processes read/write to a shared section of mem- Message passing.Packets ofinformationare moved betweenprocesses byOs9
9 OS Services for Helping Users • Communications: information exchange between processes – Processes on the same computer – Processes between computers over a network • Implementations – Shared memory • Two or more processes read/write to a shared section of mem. – Message passing • Packets of information are moved between processes by OS
Os Services for Helping Users Error detection - OS needs to be constantly awareof possibleerrors· Error types- CPU-memory hardware: memory error, power failure, etc.- I/O devices: parity error, connection failure, etc.- user program: arithmetic overflow, access illegal memError handling- Ensure correct and consistent computing- Halt the system, terminate an error-causing process etc10
10 OS Services for Helping Users • Error detection – OS needs to be constantly aware of possible errors • Error types – CPU – memory hardware: memory error, power failure, etc. – I/O devices: parity error, connection failure, etc. – user program: arithmetic overflow, access illegal mem. • Error handling – Ensure correct and consistent computing – Halt the system, terminate an error-causing process etc