- Software layer on top of hardware that manages all parts of the system.
- Controls all computer resources.
- Provides base upon which application programs can be written.
- Extends basic hardware with added functionality.
- Provides high-level abstractions.
- Easier to program with.
- Common core for all applications.
- Hides hardware and implementation details.
- More portable code.
- Responsible for allocating resources to users and processes.
- Must ensure:
- No starvation (process is not able to acquire desired resource to progress its execution)
- Allocation of resources according to some policy.
- System is overall efficient.
- Portion of operating system running in privileged mode.
- Usually resident in memory while computer is running.
- Contains fundamental functionality:
- Whatever is required to implement other services.
- Whatever is required to provide security.
- Contains most-frequently used functions.
- Applications should not be able to interfere or bypass the OS.
- OS can enforced the "extended machine".
- OS can enforce resource allocation policies.
- OS can prevent applications from interfering with each other.
- OS runs in Kernel Mode while application programs run in User Mode.
- OS interacts via load and store instructions to all memory, CPU and device registers.
- Applications interact with themselves and via functions call to library procedures.
- Applications can interact with OS via a system call to request a service. E.g. accessing a hard disk drive.
Systems libraries are libraries of support functions (procedures, subroutines).
- Subset of library functions are system calls
strcmp(), memcpy()
are pure library functions.- Only manipulate memory within the application or perform computations.
open(), close(), read(), write()
are system calls.- Cross user-kernel boundary.
- Implementation focused on passing request to OS and returning result to application.
- Some Embedded OSs have no privileged component.
- E.g. PalmOS, Mac OS 9, RTEMS.
- These OSs can implement standard OS functionality, but cannot enforce it.
- All software runs together.
- No isolation.
- One fault potentially brings down entire system.