Operating System Services

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Which of the following is NOT a primary service provided by an operating system?

  • I/O Operations
  • File System Manipulation
  • Instruction set architecture definition (correct)
  • User Interface

What is the purpose of 'program execution' as an Operating System service?

  • To detect errors in a program's syntax.
  • To provide and manage the execution of programs, including loading into memory. (correct)
  • To manage user interactions through a GUI.
  • To translate source code into object code.

Why is it essential for an operating system to provide error detection and handling services?

  • To provide a command-line interface for advanced users.
  • To maintain system stability and reliability by detecting and correcting errors across different components. (correct)
  • To ensure programs execute faster.
  • To improve the efficiency of file system manipulation.

In the context of operating systems, what does 'resource management' primarily involve?

<p>Allocating resources to multiple processes running concurrently. (D)</p> Signup and view all the answers

Why do operating systems need to provide 'protection and security' services?

<p>To control access to information in network or multi-user systems and protect against external threats. (A)</p> Signup and view all the answers

Which action is performed by the OS Kernel?

<p>Manage hardware resources (A)</p> Signup and view all the answers

Why is it important that user processes not be given direct access to the kernel code?

<p>To ensure system stability and prevent unauthorized or harmful operations. (D)</p> Signup and view all the answers

What is the role of 'system calls' in an operating system?

<p>To serve as an interface for user applications to request services from the kernel. (D)</p> Signup and view all the answers

What is the primary function of an Application Programming Interface (API) in the context of system calls?

<p>To provide a set of functions that programmers can use, which in turn call the actual system calls. (A)</p> Signup and view all the answers

Why are APIs often preferred over direct system calls in application development?

<p>APIs provide a more abstract and portable interface, reducing complexity for programmers. (A)</p> Signup and view all the answers

What is the role of the 'trap' instruction in the execution of a system call?

<p>To change the mode of execution from user mode to kernel mode. (B)</p> Signup and view all the answers

Which type of system call is responsible for creating or terminating a process?

<p>Process Control (D)</p> Signup and view all the answers

Which type of system call would be used to read, write, and reposition a file?

<p>File Management (D)</p> Signup and view all the answers

What is the key distinction between 'mechanism' and 'policy' in operating system design?

<p>Mechanism determines how to do something; policy determines what will be done. (B)</p> Signup and view all the answers

What is a significant advantage of implementing an operating system in a higher-level language like C or C++?

<p>It is easier to port to new hardware platforms. (D)</p> Signup and view all the answers

Why was MS-DOS limited to the Intel family of CPUs?

<p>It was written in Intel 8088 assembly language. (D)</p> Signup and view all the answers

What is a primary characteristic of a monolithic operating system structure?

<p>Most functionality is combined in one level, making it difficult to enhance or modify without affecting other areas. (B)</p> Signup and view all the answers

What is a major difficulty with using a layered approach in operating system design?

<p>Careful definition of layers is required, because a layer can only use layers below it, potentially leading to inefficiency. (D)</p> Signup and view all the answers

What distinguishes kernel modules from a monolithic kernel structure?

<p>Each core component is separate and loadable as needed, offering greater flexibility. (C)</p> Signup and view all the answers

What is the best description of a Virtual Machine?

<p>A virtual environment which operates as a virtual computer system with its own CPU, memory, and storage. (C)</p> Signup and view all the answers

Which of the following choices are services provided by the operating system? (Select all that apply)

<p>Resource management (A), File system manipulation (B), Error detection and handling (C)</p> Signup and view all the answers

Which of the following user interfaces take several forms? (Select all that apply)

<p>Touch-Screen interface (A), Graphical user interface (GUI) (B), Command-line interface (CLI) (C)</p> Signup and view all the answers

Which option refers to the action of loading a program into memory to run?

<p>Program execution (D)</p> Signup and view all the answers

What is required for processes that need to exchange information?

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

True or False: Processes only execute on different computer systems.

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

Which choice describes what communication may be implemented via?

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

Which option is NOT typically something the OS needs to be detecting and correcting errors for?

<p>Mouse Color (C)</p> Signup and view all the answers

What is the term for keeping track of which program use how much & what kind of resources?

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

What is the purpose of 'System Calls'?

<p>Provide interface to the services (D)</p> Signup and view all the answers

True or False: Calls are function within assembly language only.

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

Which choice is NOT a Type Of System Call?

<p>Mouse Aesthetics (C)</p> Signup and view all the answers

Which functionality does the File management type of system call provide?

<p>create file, delete file (A)</p> Signup and view all the answers

Which choice is contained in the category of Device management system calls?

<p>request device, release device (A)</p> Signup and view all the answers

Which options is true about Information maintenance?

<p>get time or date, set time or date (C)</p> Signup and view all the answers

Which option is true about Communications?

<p>create, delete communication connection (B)</p> Signup and view all the answers

What is the first problem to consider when designing the Operating System?

<p>Defining Goals and specification (D)</p> Signup and view all the answers

What is the goal of the designer/engineer?

<p>Easy to design, implement, maintain, operate (D)</p> Signup and view all the answers

What is the typical goal of the user?

<p>Convenient to use (C)</p> Signup and view all the answers

What does 'Mechanism' determine?

<p>How to do something (D)</p> Signup and view all the answers

What does 'Policy' determine?

<p>What will be done? (A)</p> Signup and view all the answers

What occurs during 'System boot'?

<p>The procedure of starting a computer by loading the kernel (A)</p> Signup and view all the answers

Flashcards

Operating System Services

Services provided by the OS to programs, including user interface, program execution, I/O operations, file system manipulation, communications, and error detection.

User Interface

A way for users to interact with the operating system, including graphical user interfaces (GUI), touch-screen interfaces, and command-line interfaces (CLI).

Program Execution

Services related to starting, running, and stopping programs.

I/O Operations

Handling input and output operations, such as reading from and writing to files or devices.

Signup and view all the flashcards

File System Manipulation

Managing files and directories, including reading, writing, creating, deleting, and searching.

Signup and view all the flashcards

Communication

Enabling communication between processes, whether on the same computer or different computers.

Signup and view all the flashcards

Error Detection and Handling

Detecting and correcting errors that occur during system operation.

Signup and view all the flashcards

Resource Management

Methods for managing resources, such as CPU time, memory, and file storage, efficiently.

Signup and view all the flashcards

Accounting/Logging

Tracking resource usage by programs and user actions.

Signup and view all the flashcards

Protection & Security

Protecting information and resources from unauthorized access and ensuring system security.

Signup and view all the flashcards

OS Kernel

A core component of the OS that interacts directly with the hardware. Real work is done here.

Signup and view all the flashcards

System Calls

Requests made by user processes for accessing system resources, handled by the kernel.

Signup and view all the flashcards

Kernel protection

User processes should not have direct(open) access to the kernel code. Any request to resources must be handled by kernel.

Signup and view all the flashcards

Application Programming Interface (API)

A set of specific functions used by programmers to access OS services, more portable than system calls.

Signup and view all the flashcards

Run-Time Environment (RTE)

Provides an interface serving as a link to system calls, intercepting function calls in the API.

Signup and view all the flashcards

System Call Execution

The user program calls a library function, parameters are put at a known place. Trap instruction changes the mode from user to kernel.

Signup and view all the flashcards

Semantics of System Call Execution

Kernel indexes dispatch table. Returns the parameter or error at a CPU register. Then goes back to library function

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

Mechanism

How to do something (the technical process).

Signup and view all the flashcards

Policy

What will be done (the decision).

Signup and view all the flashcards

Implementation of an OS

Assembly language and higher-level languages(C, C++).

Signup and view all the flashcards

monolithic Structures

Two separable parts--kernel and the system programs. Combined functionality in one level, is difficult to enhance changes.

Signup and view all the flashcards

Layered Approach

Broken up into layers, uses functions/services of lower layers. Modularity, simpler and easier debugging.

Signup and view all the flashcards

OS Structure: Modules

Implements kernel modules, object-oriented approach, core component separate. Talks to others using interfaces.

Signup and view all the flashcards

Virtual Machine (VM)

A computer system, with its own CPU, memory, network interface and storage on physical hardware.

Signup and view all the flashcards

IMPLEMENTAION OF VM

Software on kernel mode, while VM runs on user mode. Contains user kernel mode, physical user mode.

Signup and view all the flashcards

Operating system generation

Configured/generated for computer site. Generates CPU type, memeory availablitilty options for OS desired

Signup and view all the flashcards

System Boot

The process of starting a computer by loading the kernel.

Signup and view all the flashcards

Study Notes

Operating System Services

  • Operating System (OS) services are designed for users and user programs.
  • These services include user interface, program execution, I/O operations, file system manipulation, communications, and error detection and handling.

User Interface

  • The User interface takes several forms including:
    • Graphical User Interface (GUI)
    • Touch-Screen Interface
    • Command-Line Interface (CLI)

Program Execution

  • The OS provides execution of programs
  • It involves loading a program into memory to run
  • Programs must be able to end their execution.

I/O Operations

  • A running program may require I/O such as a file or I/O device
  • Users can't directly control I/O, so the OS provides the means to do so.

File System Manipulation

  • Programs can read, write, create, delete, and search through files and directories.
  • The OS provides permission management for these tasks based on file ownership.

Communication

  • Processes need to exchange information
  • Processes do this together whether they are on the same computer, or a different computer system.
  • This can be implemented via shared memory to read and write sections of memory.
  • It can also be accomplised by message passing: where packets of information are moved between processes.

Error Detection

  • The OS constantly detects and corrects errors.
  • Error can come from:
    • Error
    • CPU
    • Memory
    • I/O
    • Program

Resource Management

  • Multiple processes can run concurrently and they each need resources
  • Resources include:
    • CPU cycle
    • main memory
    • file storage

Accounting/Logging

  • Keeping track of what programs are using what kind and how much of resources.

Protection and Security

  • Information stored in network or multi user system, want to control use of information.
  • Protection involves secure access to resources, and ensures concurrently running processes should not interfere with each other or the OS itself.
  • Security provides protection from outsiders.

OS Kernel

  • The OS Kernel comprises users, applications, operating system API, operating system kernel, and computer hardware.
  • The real work gets done in the kernel.

User vs Kernel Mode

  • The modes are user process and kernel process
  • User mode executes user applications
  • Kernel mode exectutes system operations to carry out user processes

System Calls

  • These prevent user processes from gaining open access to the kernel code.
  • A system call is triggered by any user or application request that involves access to any system resource, and they must be handled by the kernel code.
  • System calls provide an interface to the services.
  • These calls are functions within C and C++ and also use assembly language instructions for certain low-level tasks.

Application Programming Interface (API)

  • An API is a set of specific functions with parameters that are passed to each function, and the return values to programers.
  • Commonly used in Windows API, POSIX API, and Java API
  • The benefits of using an API over the actual system calls are:
    • Portability (can compile/run on any system supporting the same API)
    • System calls can be more detailed and are difficult to work with.

Run-Time Environment (RTE)

  • RTE provides an interface that serves as a link to system calls. Includes:
    • A system-call interface, which intercepts function calls in the API and invokes the necessary system calls.
    • A number is associated with each system call and the interface maintains a table indexed according to that number.
    • The interface invokes system calls in the OS and returns.

Standard C Library Example

  • In C programming, the printf() is invoke
  • Is invkedd by library call which calls write() system call

System Call Execution

  • The following steps occur during execution:
    • A user program calls a library function.
    • The library routine puts appropriate parameters in a known location (registers, stack, or memory table).
    • A "trap" instruction changes the mode from user to kernel.
    • Control goes to the operating system.
    • The OS determines the system call to be carried out.

Semantics of System Call Execution

  • Involves these steps:
    • The kernel indexes the dispatch table, which contains pointers to service routines for system calls.
    • Service routine gets executed and returns a parameter or error code in a register.
    • Control is given back to user program.
    • Library function executes the instruction following the trap.

Types of System Calls

  • System calss are divided by:
    • Process control
    • File management
    • Device management
    • Information maintenance
    • Communications

Process Control

  • create process, terminate process
  • load, execute
  • get process attributes, set process attributes
  • wait event, signal event
  • allocate and free memory

File Management

  • create file, delete file
  • open, close
  • read, write, reposition
  • get file attributes, set file attributes

Device Management

  • request device, release device
  • read, write, reposition
  • get device attributes, set device attributes
  • logically attach or detach devices

Information Maintenance

  • get time or date, set time or date
  • get system data, set system data
  • get process, file, or device attributes
  • set process, file, or device attributes

Communications

  • create, delete communication connection
  • send, receive messages
  • transfer status information
  • attach or detach remote devices

Operating system design

  • Design goals involve defining goals and specifications, including choice of hardware and types of systems.
  • Key requirements are user goals vs systems goals.
    • User wants the system to be convenient, easy to use, reliable, safe, and fast.
    • Engineer wants the system to be easy to design, implement, maintain, operate, flexible, and efficient.

Mechanism and Policy

  • Mechanism determines how to do something.
  • Policy determines what will be done.
  • One important idea is separating policy from mechanism.

Implementation of Operating System

  • A system must be implemented after being designed.
  • Traditionally, OS were written in assembly language.
  • OS are now commonoly written in higher-level langues, such as C and C++.
  • The advantages of high level languages are the code is compact, the code can be written faster, easier to understand, debug, and is easier to port.
  • A disadvange would be that certain languates (like MS DOS written) are specific to processor familys (like Intel 8088 assembly language, Consequently, it is available on only the Intel family of CPUs.)

Structure of OS

  • The structural components invlove:
    • Simple structure
    • Monolithic Structures
    • Layered Approach

Simple Structures

  • MS-DOS is an example of simple layer structure
  • MS-DOS was written to be the simplest funtion, that was not divided into modules
  • Although MS-DOS has some structure, its interfaces and levels of functionality aren't well separated
  • Other DOS OS dont have well defined structures
  • Due to this fails in application program, the whole system crashes

Monolithic Structures

  • UNIX consists of two separable parts: the kernel and the system programs.
  • The kernel is everything below the system call interface and above the physical hardware.
  • The UNIX structure can make it difficult to improve because an enormous combination of functionality at one level in UNIX can cause changes in one section to adversely affect other areas.

Layered Approach

  • The OS is broken up into layers
  • The bottom is harware, and the atop (Layer N) is the user interface
  • Each layer consists of data structures, and routines to service the layer above it
  • All together comprise the kernel
  • This approach has modularity, using functions from lower layers, simplifies debugging and system verification.
  • Major difficulty: carefully defining the layers, because a layer can only use the layers below it.

OS Structure: Modules

  • Most modern operating systems implement kernel modules
  • Uses object-oriented approach
  • Each core component is separate
  • Components interact through known interfaces
  • Each is loadable as needed
  • An Example is Solaris

Virtual Machine

  • A virtual machine (VM) is a virtual environment which functions as a virtual computer system; with its own CPU, memory, network interface, and storage; created on a physical hardware system.
  • VMs are isolated from the rest of the system, and multiple VMs can exist on a single piece of hardware, such as a server.
  • A VM is a simulated image of application software and operating system, which is executed on a host computer or a server.
  • A virtual machine software runs on kernel mode
  • Virtual machine itself runs on user mode

Operating System Generation and System Boot

  • Operating systems are designed to run on various machines and sites with a variety of peripheral configurations.
  • The system must be configured or generated for each specific computer site using system generation (SYSGEN).
  • SYSGEN Program determines the CPU to be used, memory available, available devices, and operating-system options desired.

System Boot

  • System boot is the process of starting a computer by loading the kernel.
  • A piece of code known as the bootstrap program or bootstrap loader locates the kernel.
  • This is usually stored as read-only memory (ROM), because the RAM is in an unknown state at system startup, and ROM doesn't need initialization and is immune to computer viruses.

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 Services
18 questions
Operating System Services
45 questions

Operating System Services

EruditeVorticism1110 avatar
EruditeVorticism1110
Operating System Services
38 questions

Operating System Services

PrincipledMajesty6507 avatar
PrincipledMajesty6507
Use Quizgecko on...
Browser
Browser