
OperatingSystemsChapter 2Operating System Structures
Operating Systems Chapter 2 Operating System Structures 1

Objectives·Operating System Services- UserOperatingSystemInterface-SystemCallsOperatingSystemStructureOperatingSystemDesignand ImplementationMisC:Debugging, Generation & System Boot2
2 Objectives • Operating System Services – User Operating System Interface – System Calls • Operating System Structure • Operating System Design and Implementation • MISC: Debugging, Generation & System Boot

Operating System ServicesServices Overview, User Interface3
Operating System Services Services Overview, User Interface 3

OperatingSystemServices Operating systems provide-anenvironmentforexecutionofprogramsand- services to programs and usersServices may differ from one OS to anotherWhat are the common classes?-Convenience of the user- Efficiency of the system4
4 Operating System Services • Operating systems provide – an environment for execution of programs and – services to programs and users • Services may differ from one OS to another • What are the common classes? – Convenience of the user – Efficiency of the system

Overview of Operating System ServicesuserandothersystemprogramsGUIbatchcommand lineuserinterfacessystemcalls1/Ofileprogramresourcecommunicationaccountingallocationexecutionoperationssystemsprotectionerroranddetectionsecurityservicesoperatingsystemhardware5
5 Overview of Operating System Services

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