Podcast
Questions and Answers
Operating system services are designed to be helpful to both the user and the system itself.
Operating system services are designed to be helpful to both the user and the system itself.
True (A)
The command-line interface (CLI) is exclusively implemented within the operating system kernel.
The command-line interface (CLI) is exclusively implemented within the operating system kernel.
False (B)
In a GUI, icons strictly represent executable programs and nothing else.
In a GUI, icons strictly represent executable programs and nothing else.
False (B)
System calls are typically accessed directly by programmers for efficiency.
System calls are typically accessed directly by programmers for efficiency.
The Win32 API is exclusively used by the Windows operating system.
The Win32 API is exclusively used by the Windows operating system.
The system call interface maintains a table that is indexed by arbitrary strings.
The system call interface maintains a table that is indexed by arbitrary strings.
When passing parameters to system calls, using the stack or a block in memory limits the size and number of parameters that can be passed.
When passing parameters to system calls, using the stack or a block in memory limits the size and number of parameters that can be passed.
File management is a type of system call.
File management is a type of system call.
System programs are primarily used by the operating system itself, not by end-users.
System programs are primarily used by the operating system itself, not by end-users.
The design and implementation goals of an operating system are easily solvable with a single approach.
The design and implementation goals of an operating system are easily solvable with a single approach.
Separating policy (what to do) from mechanism (how to do it) is a key principle in OS design, allowing for flexibility.
Separating policy (what to do) from mechanism (how to do it) is a key principle in OS design, allowing for flexibility.
Resource allocation ensures each process waits indefinitely for resources, thus preventing deadlocks.
Resource allocation ensures each process waits indefinitely for resources, thus preventing deadlocks.
In the layered approach to operating system design, each layer can only use the operations and services of the layer directly below it.
In the layered approach to operating system design, each layer can only use the operations and services of the layer directly below it.
In the context of operating systems, 'accounting' refers to the process of allocating CPU cycles to different processes.
In the context of operating systems, 'accounting' refers to the process of allocating CPU cycles to different processes.
The primary goal of 'protection' in operating systems is to defend against external security threats.
The primary goal of 'protection' in operating systems is to defend against external security threats.
In a microkernel architecture, most operating system services are implemented in user space rather than kernel space.
In a microkernel architecture, most operating system services are implemented in user space rather than kernel space.
In the layered approach, the bottom layer (layer 0) is the kernel.
In the layered approach, the bottom layer (layer 0) is the kernel.
MS-DOS’s design included a well-defined separation of interfaces and levels of functionality, which is why it's often used as a model for modern systems.
MS-DOS’s design included a well-defined separation of interfaces and levels of functionality, which is why it's often used as a model for modern systems.
UNIX consists of only two parts: the system programs and the hardware.
UNIX consists of only two parts: the system programs and the hardware.
In the context of operating systems, monolithic systems strictly prohibit any form of modularity or component separation.
In the context of operating systems, monolithic systems strictly prohibit any form of modularity or component separation.
System programs can serve as interfaces to system calls.
System programs can serve as interfaces to system calls.
The term 'shell' in operating systems refers exclusively to the physical casing that encloses the computer's internal components.
The term 'shell' in operating systems refers exclusively to the physical casing that encloses the computer's internal components.
In a GUI, actions like opening a directory are triggered exclusively by single-clicks, ensuring simplicity and ease of use.
In a GUI, actions like opening a directory are triggered exclusively by single-clicks, ensuring simplicity and ease of use.
If a system is to be protected and secure only the most important links need protection.
If a system is to be protected and secure only the most important links need protection.
The Java API is used exclusively for Windows operating systems.
The Java API is used exclusively for Windows operating systems.
The caller needs detailed knowledge of the implementations of system calls.
The caller needs detailed knowledge of the implementations of system calls.
In a microkernel operating system, adding a new feature typically requires modifying the kernel directly.
In a microkernel operating system, adding a new feature typically requires modifying the kernel directly.
System calls are exclusively invoked by the operating system to manage hardware resources.
System calls are exclusively invoked by the operating system to manage hardware resources.
System programs can be divided into file manipulation and application programs.
System programs can be divided into file manipulation and application programs.
User goals for operating systems always take precedence over system goals.
User goals for operating systems always take precedence over system goals.
Modules in operating systems are distinct from layers in that modules are more flexible.
Modules in operating systems are distinct from layers in that modules are more flexible.
Application programs are typically part of the kernel.
Application programs are typically part of the kernel.
A primary advantage of a microkernel system structure is increased security and reliability.
A primary advantage of a microkernel system structure is increased security and reliability.
In a layered operating system, higher layers depend on lower layers.
In a layered operating system, higher layers depend on lower layers.
In Solaris, only loadable system calls are part of modular approach.
In Solaris, only loadable system calls are part of modular approach.
Flashcards
Operating System Services
Operating System Services
Set of functions helpful to the user, like user interface, program execution, I/O operations, and file management.
Command-Line Interface (CLI)
Command-Line Interface (CLI)
Allows direct command entry, often implemented in the kernel or by systems programs, and comes in multiple flavors called shells.
Graphical User Interface (GUI)
Graphical User Interface (GUI)
User-friendly interface using a desktop metaphor, typically involving a mouse, keyboard, and monitor with icons representing files and actions.
System Calls
System Calls
Signup and view all the flashcards
Application Program Interface (API)
Application Program Interface (API)
Signup and view all the flashcards
System call sequence
System call sequence
Signup and view all the flashcards
ReadFile() function
ReadFile() function
Signup and view all the flashcards
System-call interface
System-call interface
Signup and view all the flashcards
System Call Parameter Passing
System Call Parameter Passing
Signup and view all the flashcards
Types of System Calls
Types of System Calls
Signup and view all the flashcards
System Programs
System Programs
Signup and view all the flashcards
Functions of system programs
Functions of system programs
Signup and view all the flashcards
Goals of OS design
Goals of OS design
Signup and view all the flashcards
Policy vs Mechanism
Policy vs Mechanism
Signup and view all the flashcards
Modern operating system
Modern operating system
Signup and view all the flashcards
MS-DOS
MS-DOS
Signup and view all the flashcards
Layered Approach
Layered Approach
Signup and view all the flashcards
Microkernel System Structure
Microkernel System Structure
Signup and view all the flashcards
Kernel modules
Kernel modules
Signup and view all the flashcards
Study Notes
Operating System Structures
- Chapter focuses on operating system services, user interfaces, system calls, system programs, OS design, OS structure, virtual machines, OS generation, and system boot
Operating System Services
- Operating systems provide services to aid users
- Services include user interface, program execution, I/O operations, and file-system manipulation
- Services ensure efficient operation via resource allocation, accounting, and protection/security
User Interface (UI)
- Almost all operating systems provide a user interface
- User interfaces vary: Command-Line Interface (CLI), Graphics User Interface (GUI), and Batch interfaces
Program Execution
- Systems load and run programs in memory
- Systems must end execution, either normally or by indicating an error
I/O Operations
- A running program may require I/O, which involves a file or an I/O device
File-System Manipulation
- Programs need to read and write files and directories
- Programs need to create, delete, search, list file information, and provide permission management
Communication
- Processes on the same or different computers can exchange information over a network using shared memory or message passing
- Packets are moved by the OS
Error Detection
- The OS is constantly aware of possible errors in CPU and memory hardware, I/O devices, and user programs
- The OS takes appropriate action to ensure correct and consistent computing
- Debugging facilities enhance the user's and programmer's abilities
Resource Allocation
- Resources must be allocated when multiple users or jobs run concurrently
- Examples include CPU cycles, main memory, and file storage, which may have special allocation code
Accounting
- Keeping track of which users use how much and what kinds of computer resources
Protection and Security
- Information owners control use of that information
- Concurrent processes should not interfere with each other
- Protection ensures controlled access to system resources
- Security defends against external attacks and requires user authentication
- Protection and security measures should be throughout the system
User Operating System Interface - CLI
- CLI allows direct command entry
- CLIs are sometimes implemented in the kernel or by systems program
- Sometimes multiple flavors implemented – shells
- CLI Primarily fetches commands and executes them
- Commands may be built-in, or names of programs
- Adding new features doesn't require shell modification
User Operating System Interface - GUI
- A user-friendly desktop metaphor interface, usually including a mouse, keyboard, and monitor
- Icons represent files, programs, actions, etc
- Mouse actions over objects invoke functions, open directories (known as a folder), etc
- Invented at Xerox PARC
- Many systems now include both CLI and GUI interfaces
- Microsoft Windows has a GUI with a CLI "command" shell
- Apple Mac OS X has "Aqua" GUI with UNIX kernel and shells
- Solaris is CLI with optional GUI interfaces (Java Desktop, KDE)
System Calls
- Programming interface to the services provided by the OS
- Typically written in a high-level language (C or C++)
- Accessed by programs via an Application Program Interface (API) instead of direct system calls
- Common APIs: Win32 API for Windows, POSIX API for UNIX, Linux, Mac OS X, and Java API for JVM`
System Call Implementation
- A number is associated with each system call
- The system-call interface maintains a table indexed by these numbers
- The system call interface invokes the intended system call in the OS kernel
- The caller needs to obey the API and understand what the OS will do as a result of the call
- The majority of the OS interface details are hidden from the programmer by the API, managed by the run-time support library
System Call Parameter Passing
- More information is required than simply the system call identity
- The exact information varies according to OS and call
- Three general methods to pass parameters to the OS include:
- Passing parameters in registers
- Storing parameters in a block/table in memory, passing the address of the block as a register parameter
- Parameters placed/pushed onto the stack by the program, and popped off the stack by the OS
- Block and stack methods do not limit the number or length of parameters being passed
Types of System Calls
- Process control
- File management
- Device management
- Information maintenance
- Communications
System Programs
- They provide a convenient environment for program development/execution, and can be divided into:
- File manipulation
- Status information
- File modification
- Programming language support
- Program loading and execution
- Communications
- Application programs
System Program functions
- File management create, delete, copy, rename, print, dump, list, and generally manipulate files and directories
- Status information ask the system for info, such as date, time, amount of memory, disk space, number of users
- File modification use text editors to create and modify files
- Programming language support - Compilers, assemblers,debuggers and interpreters sometimes provided.
- Program loading and execution- Absolute loaders, relocatable loaders, linkage editors, and overlay-loaders, debugging systems for higher-level and machine language
- Communications - electronic mail messages, log in remotely, transfer files from one machine to another.
Operating System Design and Implementation
- It starts by defining goals and specifications
- It is affected by hardware choice, type of system
- Good Design separates Policy (what) from Mechanism (how) for flexibility
Operating-System Structure
- Complex systems should be partitioned for proper functionality
- Partition into small components rather than have one monolithic system
- Modules should be a well-defined portion of the system
Simple Structure
- MS-DOS – written to provide the most functionality in the least space
- Not divided into modules
- has some structure, its interfaces and levels of functionality are not well separated
UNIX
- Limited by hardware functionality
- Consists of 2 separable parts: systems programs, and the kernel
- The kernel consists of everything below the system-call interface and above the physical hardware
Layered Approach
- The OS is divided into a number of layers (levels)
- Each is built on top of lower layers with the bottom layer (0) being hardware and the highest (N) being the user interface
- Layers use functions/services of only lower-level layers, and uses modularity
Microkernel System Structure
- Moves as much from the kernel into "user" space
- Communication takes place between user modules using message passing
- Easier to extend a microkernel and port the OS to new architectures, and more reliable/secure
- Negative is Performance overhead of user space to kernel space communication
Modules
- Most modern OS implement kernel modules
- Uses object-oriented approach with separate core components
- Components talk to the others over known interfaces and are loadable as needed within the kernel
- Similar to layers but with more flexible
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.