Operating System Structures

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

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.

False (B)

In a GUI, icons strictly represent executable programs and nothing else.

False (B)

System calls are typically accessed directly by programmers for efficiency.

<p>False (B)</p>
Signup and view all the answers

The Win32 API is exclusively used by the Windows operating system.

<p>True (A)</p>
Signup and view all the answers

The system call interface maintains a table that is indexed by arbitrary strings.

<p>False (B)</p>
Signup and view all the answers

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.

<p>False (B)</p>
Signup and view all the answers

File management is a type of system call.

<p>True (A)</p>
Signup and view all the answers

System programs are primarily used by the operating system itself, not by end-users.

<p>False (B)</p>
Signup and view all the answers

The design and implementation goals of an operating system are easily solvable with a single approach.

<p>False (B)</p>
Signup and view all the answers

Separating policy (what to do) from mechanism (how to do it) is a key principle in OS design, allowing for flexibility.

<p>True (A)</p>
Signup and view all the answers

Resource allocation ensures each process waits indefinitely for resources, thus preventing deadlocks.

<p>False (B)</p>
Signup and view all the answers

In the layered approach to operating system design, each layer can only use the operations and services of the layer directly below it.

<p>True (A)</p>
Signup and view all the answers

In the context of operating systems, 'accounting' refers to the process of allocating CPU cycles to different processes.

<p>False (B)</p>
Signup and view all the answers

The primary goal of 'protection' in operating systems is to defend against external security threats.

<p>False (B)</p>
Signup and view all the answers

In a microkernel architecture, most operating system services are implemented in user space rather than kernel space.

<p>True (A)</p>
Signup and view all the answers

In the layered approach, the bottom layer (layer 0) is the kernel.

<p>False (B)</p>
Signup and view all the answers

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.

<p>False (B)</p>
Signup and view all the answers

UNIX consists of only two parts: the system programs and the hardware.

<p>False (B)</p>
Signup and view all the answers

In the context of operating systems, monolithic systems strictly prohibit any form of modularity or component separation.

<p>True (A)</p>
Signup and view all the answers

System programs can serve as interfaces to system calls.

<p>True (A)</p>
Signup and view all the answers

The term 'shell' in operating systems refers exclusively to the physical casing that encloses the computer's internal components.

<p>False (B)</p>
Signup and view all the answers

In a GUI, actions like opening a directory are triggered exclusively by single-clicks, ensuring simplicity and ease of use.

<p>False (B)</p>
Signup and view all the answers

If a system is to be protected and secure only the most important links need protection.

<p>False (B)</p>
Signup and view all the answers

The Java API is used exclusively for Windows operating systems.

<p>False (B)</p>
Signup and view all the answers

The caller needs detailed knowledge of the implementations of system calls.

<p>False (B)</p>
Signup and view all the answers

In a microkernel operating system, adding a new feature typically requires modifying the kernel directly.

<p>False (B)</p>
Signup and view all the answers

System calls are exclusively invoked by the operating system to manage hardware resources.

<p>False (B)</p>
Signup and view all the answers

System programs can be divided into file manipulation and application programs.

<p>True (A)</p>
Signup and view all the answers

User goals for operating systems always take precedence over system goals.

<p>False (B)</p>
Signup and view all the answers

Modules in operating systems are distinct from layers in that modules are more flexible.

<p>True (A)</p>
Signup and view all the answers

Application programs are typically part of the kernel.

<p>False (B)</p>
Signup and view all the answers

A primary advantage of a microkernel system structure is increased security and reliability.

<p>True (A)</p>
Signup and view all the answers

In a layered operating system, higher layers depend on lower layers.

<p>True (A)</p>
Signup and view all the answers

In Solaris, only loadable system calls are part of modular approach.

<p>False (B)</p>
Signup and view all the answers

Flashcards

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)

Allows direct command entry, often implemented in the kernel or by systems programs, and comes in multiple flavors called shells.

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

Programming interface to OS services, typically written in high-level languages and accessed through APIs.

Signup and view all the flashcards

Application Program Interface (API)

A high-level programming interface used to access system calls, such as Win32 API, POSIX API, and Java API.

Signup and view all the flashcards

System call sequence

Essential for copying file contents, acquiring input/output, reading data, and managing termination processes.

Signup and view all the flashcards

ReadFile() function

A function in the Win32 API used for reading from a file using parameters like HANDLE file, LPVOID buffer, and DWORD bytesToRead.

Signup and view all the flashcards

System-call interface

A table indexed with numbers that invokes intended system calls in the OS kernel and returns status.

Signup and view all the flashcards

System Call Parameter Passing

Passing parameters in registers, in a block, or onto the stack by the program for use by the OS.

Signup and view all the flashcards

Types of System Calls

Process control, file management, device management, information maintenance, and communications.

Signup and view all the flashcards

System Programs

Provide an environment for program development and execution, including file manipulation, status information, and program loading.

Signup and view all the flashcards

Functions of system programs

File management, status information, file modification, programming language support, and communications.

Signup and view all the flashcards

Goals of OS design

The OS should be convenient, easy to learn, reliable, safe, and fast, as well as easy to design, implement, and maintain.

Signup and view all the flashcards

Policy vs Mechanism

What will be done vs. How to do it

Signup and view all the flashcards

Modern operating system

Partitioning tasks into small components rather than having one monolithic system.

Signup and view all the flashcards

MS-DOS

Written to provide the most functionality in the least space and is not divided into modules with interfaces and levels of functionality that are not well separated

Signup and view all the flashcards

Layered Approach

The OS is divided into layers, built on top of lower layers. The bottom layer is the hardware; the highest is the user interface.

Signup and view all the flashcards

Microkernel System Structure

Moves as much from the kernel into user space, with communication between user modules using message passing.

Signup and view all the flashcards

Kernel modules

Each core component is separate, uses object-oriented approach, talks to the others over known interfaces and is loadable as needed within the kernel.

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.

Quiz Team

Related Documents

Operating-System Structures PDF

More Like This

Operating System System Calls Quiz
11 questions
Operating System Concepts Quiz
40 questions
Operating System Services and System Calls
46 questions
Use Quizgecko on...
Browser
Browser