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

An operating system provides different kinds of services to which of the following?

  • Users
  • Programs
  • Hardware only
  • Both users and programs (correct)

A command line interface (CLI) is the only type of user interface available in modern operating systems.

False (B)

What is a primary function of an operating system regarding program execution?

To load a program into memory and run it.

A running program may require ______, which may involve a file or an I/O device.

<p>I/O operations</p> Signup and view all the answers

Which service is provided by the operating system relating to file system manipulation?

<p>All of the above (D)</p> Signup and view all the answers

Processes in execution never need to communicate with each other; they run independently.

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

What is the purpose of error detection in an operating system?

<p>To be constantly aware of possible errors and take appropriate action.</p> Signup and view all the answers

When multiple users or jobs run concurrently, the operating system handles ______ of resources to each of them.

<p>allocation</p> Signup and view all the answers

Match the following operating system services with their descriptions:

<p>Accounting = Keeping track of resource usage by users Protection = Controlling access to system resources Security = Defending against external attacks</p> Signup and view all the answers

What is the primary function of the 'command interpreter' in the command line interface (CLI)?

<p>To allow direct command entry (D)</p> Signup and view all the answers

In a GUI, icons typically represent files, programs, and actions.

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

What is the role of 'shells' in relation to the command-line interface?

<p>Shells are different flavors implemented in the CLI.</p> Signup and view all the answers

A ______ is a user-friendly metaphor interface, utilizing elements such as mouse, keyboard, and monitor.

<p>desktop</p> Signup and view all the answers

System calls are primarily accessed by programs through which means?

<p>Application Program Interface (API) (B)</p> Signup and view all the answers

System calls provide a direct interface to the services offered by the operating system.

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

What is the purpose of context switching between user mode and kernel mode?

<p>To allow secure access to privileged operations.</p> Signup and view all the answers

When a program requests a service managed by the operating system's kernel, it uses ______.

<p>system calls</p> Signup and view all the answers

What is the role of the system-call interface?

<p>To maintain a table indexed according to system call numbers (A)</p> Signup and view all the answers

The caller must know the implementation details of a specific system call.

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

How are system call parameters typically passed in Linux and Solaris OS?

<p>Parameters are stored in block or table in the memory, and address of block passed as parameter in a register</p> Signup and view all the answers

In system call parameter passing, parameters can be placed, or 'pushed', on the ______ by the program.

<p>stack</p> Signup and view all the answers

Match the following types of system calls with their descriptions:

<p>Process Control = Managing the execution of processes File Management = Creating, deleting, and manipulating files Device Management = Requesting, reading from, and writing to devices</p> Signup and view all the answers

Which of the following is NOT considered a type of system call?

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

Every process in a system is created by another process, except for the very first process.

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

In the context of process creation, what is the process that creates a new process called?

<p>Parent process</p> Signup and view all the answers

System calls for deleting a file needs only the file's ______ as a parameter..

<p>name</p> Signup and view all the answers

Which of the following is managed by the kernel?

<p>All of the above (D)</p> Signup and view all the answers

System programs, not system calls, define most user's view of the operations

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

What is the role of the policy/mechanism separation in OS design?

<p>To allow maximum flexibility if policy decisions are to be changed later</p> Signup and view all the answers

The MS-DOS was designed to provide maximum functionality with minimal ______.

<p>space Usage</p> Signup and view all the answers

Match the following operating system structures with their descriptions:

<p>Monolithic Kernel = A structure where most OS functions are packed into the kernel Layered Approach = Organization of an OS into distinct layers Microkernel = Structure where many OS services are implemented in user space</p> Signup and view all the answers

What is one major advantage of the microkernel architecture?

<p>Easier to extend the kernel (C)</p> Signup and view all the answers

Operating systems can only be built using a monolithic kernel.

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

What is the main benefit of a Solaris modular approach?

<p>Flexibility achieved through object-oriented programming to create modular kernel</p> Signup and view all the answers

A ______ is required when a company need to run separate operating systems on the same computer.

<p>virtual Machine</p> Signup and view all the answers

Match the applications with the virtual machine:

<p>Paravirtualization = Guest must be modified to run on paravirtualized hardware Full virtualization = The body of OS is untouched, OS thinks it is bare-metal</p> Signup and view all the answers

Which of the following represents the correct order, when it comes to boot the system?

<p>locates the kernel, bootstrap program starts it, loads it into memory (A)</p> Signup and view all the answers

Hardware itself knows how to locate and load the kernel

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

In the process of finding bug in the software, what is the role of debugging?

<p>fixing errors</p> Signup and view all the answers

Operating systems generates ______ files containing error information

<p>log</p> Signup and view all the answers

Flashcards

Operating System Services

Functions that are helpful to the user.

User Interface

Almost all operating systems have one.

User interface types

Varies between Command-Line (CLI), Graphics User Interface (GUI), Batch (Non-Interactive).

Program Execution

Loads a program into memory and executes it.

Signup and view all the flashcards

I/O Operations

Allows programs to interact with files and devices.

Signup and view all the flashcards

File-System Manipulation

Allows programs to read, write, create, delete, search, list files.

Signup and view all the flashcards

Communications

Allows processes to communicate with each other.

Signup and view all the flashcards

Error Detection

OS constantly monitors for errors in hardware and software.

Signup and view all the flashcards

Resource Allocation

The OS allocates resources to running processes.

Signup and view all the flashcards

Accounting

The OS tracks resource usage by users.

Signup and view all the flashcards

Protection

Control access to system resources.

Signup and view all the flashcards

Security

Protecting the system from external threats.

Signup and view all the flashcards

Command Line Interface (CLI)

Allows direct command entry to the computer.

Signup and view all the flashcards

Graphical User Interface (GUI)

Uses icons, menus, and a mouse for interaction.

Signup and view all the flashcards

System Calls

A programmatic way to request a service from the kernel.

Signup and view all the flashcards

Application Program Interface (API)

A high-level way to access system calls.

Signup and view all the flashcards

ReadFile()

Reads data from a file.

Signup and view all the flashcards

System Call Table

Interface to the system call in OS kernel

Signup and view all the flashcards

Passing parameters in registers

The Simplest way to pass parameters to the OS.

Signup and view all the flashcards

Parameter Passing via a Block

Pass the address of memory block to a register.

Signup and view all the flashcards

Process Control

Actions performed on system processes.

Signup and view all the flashcards

File Management

Creation, deletion, and manipulation of files.

Signup and view all the flashcards

Device management

Requesting, reading, and writing to devices.

Signup and view all the flashcards

Information Maintenance

Getting and setting system data, time, or attributes.

Signup and view all the flashcards

Communications

Creating and terminating communication connections.

Signup and view all the flashcards

Protection

Changing file ownership or permissions.

Signup and view all the flashcards

System Programs

Provide a convenient environment for program development and execution.

Signup and view all the flashcards

File management Programs

Create, delete, copy, rename, files and directories.

Signup and view all the flashcards

Status Information Programs

Provide OS info such as date, or available memory.

Signup and view all the flashcards

File modification Programs

Text editors to create and modify files.

Signup and view all the flashcards

Programming-language support

Compilers, assemblers, debuggers and interpreters.

Signup and view all the flashcards

Program loading and execution programs

Absolute loaders, relocatable loaders, linkage editors.

Signup and view all the flashcards

Communications programs

Mechanism for creating virtual connections.

Signup and view all the flashcards

Modules

A modular OS structure.

Signup and view all the flashcards

Microkernel

Moves much of the kernel into user space.

Signup and view all the flashcards

Virtual Machine

Runs in the user mode

Signup and view all the flashcards

Hypervisor

A component that sits on top of hardware.

Signup and view all the flashcards

Type 1 hypervisors

Runs directly on the host's hardware.

Signup and view all the flashcards

Type 2 hypervisors

Runs as a software layer on an OS

Signup and view all the flashcards

Debugging

Finding and fixing errors (bugs).

Signup and view all the flashcards

SYSGEN

Process to configure an OS for specific hardware.

Signup and view all the flashcards

Study Notes

Operating System Structures

  • Chapter two covers operating-system structures.
  • The chapter will also cover operating system services, user operating system interface, system calls, system programs
  • Also operating system design and implementation, operating system structures, virtual machines, operating system debugging and generation and system boot

Objectives

  • To describe OS services provided to users, processes, and other systems.
  • To discuss how to structure an operating system.
  • To explain OS installation, customization, and booting procedures.

Operating System Services

  • Functions helpful to the user are provided by one set of operating-system services.
  • Operating Systems supply different kinds of services to both users and programs.
  • Application programs that run within the operating system can execute freely within an environment.
  • The OS gives users services to run programs conveniently.

User Interface

  • Almost all operating systems include a user interface (UI).
  • The UI can vary between Command-Line (CLI), Graphics User Interface (GUI), and Batch (Non-Interactive).

Program Execution

  • The OS must be able to load a program into memory and to run that program.
  • Ending execution of programs ends either normally or abnormally (indicating an error).

I/O Operations

  • A running program might require I/O, involving either a file or an I/O device.
  • A user cannot directly control I/Os, the OS controls them.

File-System Manipulation

  • Working with a file system is pivotal.
  • Programs are required to read, write, create, and delete files and directories.
  • Also need to search and list file information, including managing permissions aka access restrictions.

Communications

  • Take place between processes, the program that performs the processes in execution.
  • Processes might need to communicate and synchronize their execution effectively.
  • Processes can communicate within the same computer or over a network.

Error Detection

  • An OS must always be aware of possible errors in the CPU, memory hardware, I/O devices, and user programs.
  • For each error type, the OS needs to respond appropriately to ensure consistent computing.
  • Debugging facilities can greatly enhance the user's and programmer's abilities to efficiently use the systems.

Resource Allocation

  • When multiple users/jobs are running concurrently; resources need to be allocated to each of them.
  • Certain resources such as CPU cycles, main memory, and file storage may require specialized allocation code.
  • Others like I/O devices could use general request and release code.
  • Processes shouldn't have to perpetually wait for unavailable resources, nor exclusively hold resources without releasing.

Accounting

  • Accounting tracks user usage, including the type and amount of computer resources used.

Protection and Security

  • Protection manages all access to system resources.
  • Concurrent processes should never interfere with each other
  • Information owners in multi-user/networked systems have a degree of control over their data.
  • Security secures the OS, requiring user authentication and defense against invalid I/O access attempts from outsiders.
  • To maintain system security, precautions must be implemented throughout the entire system.
  • Any invalid access attempts must be recorded so the user can improve the system.

Operating System Interface - CLI

  • Command Line Interface (CLI) or command interpreter allows direct command entry.
  • The CLI is sometimes implemented in the kernel or by systems programs.
  • Multiple CLI flavors can be implemented as "shells" for each flavor fetch commands and executes them.
  • Some commands are built-in; others are just program names.
  • New features with shell modification aren't required for the latter.

Operating System Interface - GUI

  • User-friendly desktop metaphor interface.
  • Usually uses a mouse, keyboard, and monitor.
  • Icons represent files, programs, and actions.
  • Mouse buttons pressed over interface objects cause varied actions like option displays, function executions, and directory openings.
  • Xerox PARC invented the GUI.

Mixed Interfaces

  • Many systems now offer both CLI and GUI.
  • Microsoft Windows is a GUI utilizing a CLI "command" shell.
  • Apple Mac OS X features an "Aqua" GUI interface with a UNIX kernel and available shells, allowing flexibility
  • Solaris offers CLI with optional GUI interfaces, such as Java Desktop and KDE.

System Calls

  • System calls are the programming interface to the services the OS provides.
  • Also perform Context Switching: User Mode <-> Kernel Mode
  • It is how a computer program requests a service from the kernel.
  • System calls are commonly written in high-level languages (C or C++).
  • Programs mostly use a high-level Application Program Interface (API) instead of calling system calls directly.
  • Win32 API for Windows, POSIX API for POSIX-based systems (UNIX, Linux, and Mac OS X), and Java API for the Java virtual machine (JVM) include the three most common APIs.
  • APIs rather than systems calls should be used.

Example of Standard API - Win32

  • The sample function for the Win32 API is ReadFile().
  • API parameters passed to ReadFile() are a HANDLE file (file to be read).
  • Also, LPVOID buffer (buffer to read/write data), DWORD bytesToRead (bytes in buffer).
  • LPDWORD bytesRead is the number of bytes read during last read.
  • LPOVERLAPPED ovl — shows that, the overlapped I/O is in use

System Call Implementation

  • System calls have a number associated with each.
  • The System-call interface uses a table indexed according to these numbers.
  • The system call interface invokes the correct system call in the OS kernel and provides any return values or status of calls.
  • Callers need to only understand the purposes of results, not execution.
  • The API manages a runtime support library and hides the OS interface.

Copying Files

  • System calls can be sequenced to complete tasks, like copying the content of one file to another
  • Get the input filename and output filename by prompting the system to display it on screen and accepting input
  • Open and read files while handling errors, then proceed to close them

Standard C Library Example

  • Invoking the printf() library call in a C program subsequently triggers the write() system call.
  • The standard C library operates in user mode which then uses write () to run write() system call which then transits instructions back

System Call Parameter Passing

  • More data is required than identifying the desired system call, and so are passed by the OS.
  • Passing the parameters in registers is the simplest method, however, there may be cases where parameters exceed available registers.
  • Storing parameters in a memory block or table before passing the block's address as register parameter is one method that Linux and Solaris uses
  • Parameters can get placed (pushed) onto program stack and allow Operating system to pop them off it.
  • Parameter length are not limited by block and stack methods in parameter passing

COURSE LEARNING OUTCOMES

  • Explain the logical progression of OS development.
  • Explain the necessary components and structures of an OS
  • Install and customize an OS and write simple shell scripts.
  • Also, evaluate various process scheduling and inter-process communication methods.
  • Provide an explanation of file-system concepts and operations.
  • Kinds of system calls

Types of System Calls

  • Process control system calls.
  • System calls for file and device management.
  • System calls handle the maintenance of information and communications.
  • System calls for protection.

Process Control

  • Within a system, every current process emerges from another, except the very first.
  • New processes originate from a parent process which, designates new releases as the child process.
  • Each individual process in the system has a unique process ID, so there are system calls to support this.

File Management System Calls

  • Systems support the creation and deletion of files.
  • Certain system calls are need to create files.
  • Once created files may then be opened, read, rewritten. repositioned and closed, with all of which to corresponding system calls.
  • Files have several attributes, including the file name, size, and the owner.
  • System calls are also used to configure a files atributes.

Device Management

  • Various systems have connected devices like printers, keyboards and hard disks.
  • To request and to read / write a device, there system calls are required.
  • To release the device after current operations, system calls are required.
  • Lastly system calls to mount and unmount devices are required.

Information Maintenance

  • Specific system calls exist to change or set the time and date.
  • More calls set system data, processes, files or device attributes.

Communications System Calls

  • System calls exist to create a connection and to delete the connection to remote machines.

Protection

  • Calls are made to manipulate user permissions.
  • This includes changing user/ group access, and changing the access permissions of files themselves.

System programs

  • Provide a convenient environment for executing programs and dividing them, such as in a system call
  • Manage files, status, and modifications; support programming languages;.
  • Also support program loading, execution, and communication.
  • System programs, not actual system calls largely define most user's experience
  • The system gives a convenient environment for program development and execution.
  • Some of these are simply user interfaces to system calls, while others are considerably more complex.

File Management System Programs

  • Create/ delete files and manipulate their data.

Status Information

  • Ask the system for info - date, time, amount of available memory, disk space, number of users
  • These programs format and print the output to the terminal or other output devices.
  • Some systems implement a registry used to store and retrieve configuration information

File modifications System Programs

  • Text and special search commands to create and transform text files.
  • Provide support for programming languages, compilers, and debuggers
  • Load programs and debug at a high level of the machine code

Communications Support

  • Allows access from other screens, provides web pages, send eletronic mail and transfer files.

Operating System Design and Implementation

  • Design and Implementation of OS not "solvable", but approaches have proven successful
  • Internal structure of different Operating Systems can vary widely
  • Goals and specifications are defined and affected by hardware and system
  • System goals focuses on if it is efficient, not error free, reliable and flexible.

Separation

  • What will be done? That is the policy of the systems
  • How do you preform the policy? That would be the mechanism
  • Principle to what mechanisms do determine something and separate from flexible policy

Simple Structure

  • DOS has the goal to has the most functions with minimal space usage.
  • It's open so direct access device drivers.
  • BIOS support applications to have a hardware independent output.

MS-DOS Layer Structure

  • The simple structure DOS, was first founded august 12, not well organized
  • No division on memory which ends up having program issues crash entire OS

Layered Approach

  • Is based on multiple layer, that is easy to build on.
  • The 0 layer is always hardware whilst N is user
  • Layer are selected for how services are used.

UNIX System Structure

  • Simple structure with lots of packing as a Monolithic, is too large
  • Implementations require a too complex approach

UNIX

  • Is limited to the hardware to have operating structure from two different parts
  • Everything below is a system call, with hardware as a cpu or file

Microkernel System Structure

  • Has "user" level spaces
  • Communication is message passed
  • More reliable and porteble plus extentable benefits a microkernel
  • Though the performance may be lower to connect through the kernel

Modular System Structure

  • Object Oriented approach as the kernel as most operating systems, is each loadable.
  • Layers can be flexible.

Solaris OS

  • The best OS for usage is on oriented objects for modular kernels
  • On can be added at at start or runtime on runtime
  • Has microkernel and other functions

Virtual Machine Cont

  • Multiple processor to connect and communicate.

Virtual Machines

  • Virtual Machine itself, and the kernel mode itself must be all on VM's own
  • Having more user and kernal functions have have both modes run in the user modes

Virtual Machine Disadvantages

  • Less efficient hardware access from it is running the host operating system to the machine and having to connect then to the kernel.
  • It can be infected by process of the host of what's happening and cause the process isolation to have bugs.

VM advantages

  • Can use different environments
  • The ISA servers as Hardware
  • Crash affects won't damage hardware.
  • If there as virus it will only be temporary then will shut off the guest.
  • Monitor security and quarantine issues during the analysis.

Why VMs?

  • Its separates the system at single time but the system can be efficient of companys goals.
  • VMs offer a solution to run separate operating systems on the same computer.

Hypervisor

  • The hypervisor runs above the hardware the VM uses.
  • Manage the system physical hardware and supports guest VMs.
  • Bare metal, or a hosted type of OS.

Virtualization

  • Untouched body of OS, hypervisor manages and processes with emulation
  • Linux OS can runs on a Windows program

Para Virtualization

  • Provides a guest with an identical system from it was from a system to hardware
  • So when Solaris 10 operates can runs applications from other sources.

Type-1 Hypervisor

  • In which this runs bare metal to the application it can run.

Virtual machine Architecture

  • That has Linux for it's access to run on those machines

System Debugging

  • It can generate error log flies or capture memory
  • Optimizaion to tune has crash dumps
  • Debugging is twice as hard , debug it to not do it again.
  • With tools as DTrace can capture data to send out to those probes.

System Generation

  • The systems is configures to compute by SYSGEN.
  • The OS must have CPU amount and desired sizes
  • System is to run on all class variety of machines with the proper variety with peripheral configurations

System Boot

  • OS has made a new hardware as a hardware.
  • Locates and restarts of kernel with small peices of code.
  • Program the memory

Firmware vs OS

  • Resides to operate on different levels.

Memory Intizalation

  • CPU can be resetted to have Intilaziation with high speeds operating.

Main instructions

  • To have a CPU and ROM with hardwire

Running steps

  • Starts the shell and OS with certain commands like loading the Bootstrap.
  • Runs and has its commands to restart again.

Boot Block

  • It is a two step process is fixed and loads a loader start up firmware to execute

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

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