Podcast
Questions and Answers
Which of the following is NOT a primary service provided by an operating system?
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?
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?
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?
In the context of operating systems, what does 'resource management' primarily involve?
Why do operating systems need to provide 'protection and security' services?
Why do operating systems need to provide 'protection and security' services?
Which action is performed by the OS Kernel?
Which action is performed by the OS Kernel?
Why is it important that user processes not be given direct access to the kernel code?
Why is it important that user processes not be given direct access to the kernel code?
What is the role of 'system calls' in an operating system?
What is the role of 'system calls' in an operating system?
What is the primary function of an Application Programming Interface (API) in the context of system calls?
What is the primary function of an Application Programming Interface (API) in the context of system calls?
Why are APIs often preferred over direct system calls in application development?
Why are APIs often preferred over direct system calls in application development?
What is the role of the 'trap' instruction in the execution of a system call?
What is the role of the 'trap' instruction in the execution of a system call?
Which type of system call is responsible for creating or terminating a process?
Which type of system call is responsible for creating or terminating a process?
Which type of system call would be used to read, write, and reposition a file?
Which type of system call would be used to read, write, and reposition a file?
What is the key distinction between 'mechanism' and 'policy' in operating system design?
What is the key distinction between 'mechanism' and 'policy' in operating system design?
What is a significant advantage of implementing an operating system in a higher-level language like C or C++?
What is a significant advantage of implementing an operating system in a higher-level language like C or C++?
Why was MS-DOS limited to the Intel family of CPUs?
Why was MS-DOS limited to the Intel family of CPUs?
What is a primary characteristic of a monolithic operating system structure?
What is a primary characteristic of a monolithic operating system structure?
What is a major difficulty with using a layered approach in operating system design?
What is a major difficulty with using a layered approach in operating system design?
What distinguishes kernel modules from a monolithic kernel structure?
What distinguishes kernel modules from a monolithic kernel structure?
What is the best description of a Virtual Machine?
What is the best description of a Virtual Machine?
Which of the following choices are services provided by the operating system? (Select all that apply)
Which of the following choices are services provided by the operating system? (Select all that apply)
Which of the following user interfaces take several forms? (Select all that apply)
Which of the following user interfaces take several forms? (Select all that apply)
Which option refers to the action of loading a program into memory to run?
Which option refers to the action of loading a program into memory to run?
What is required for processes that need to exchange information?
What is required for processes that need to exchange information?
True or False: Processes only execute on different computer systems.
True or False: Processes only execute on different computer systems.
Which choice describes what communication may be implemented via?
Which choice describes what communication may be implemented via?
Which option is NOT typically something the OS needs to be detecting and correcting errors for?
Which option is NOT typically something the OS needs to be detecting and correcting errors for?
What is the term for keeping track of which program use how much & what kind of resources?
What is the term for keeping track of which program use how much & what kind of resources?
What is the purpose of 'System Calls'?
What is the purpose of 'System Calls'?
True or False: Calls are function within assembly language only.
True or False: Calls are function within assembly language only.
Which choice is NOT a Type Of System Call?
Which choice is NOT a Type Of System Call?
Which functionality does the File management type of system call provide?
Which functionality does the File management type of system call provide?
Which choice is contained in the category of Device management system calls?
Which choice is contained in the category of Device management system calls?
Which options is true about Information maintenance?
Which options is true about Information maintenance?
Which option is true about Communications?
Which option is true about Communications?
What is the first problem to consider when designing the Operating System?
What is the first problem to consider when designing the Operating System?
What is the goal of the designer/engineer?
What is the goal of the designer/engineer?
What is the typical goal of the user?
What is the typical goal of the user?
What does 'Mechanism' determine?
What does 'Mechanism' determine?
What does 'Policy' determine?
What does 'Policy' determine?
What occurs during 'System boot'?
What occurs during 'System boot'?
Flashcards
Operating System Services
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
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
Program Execution
Services related to starting, running, and stopping programs.
I/O Operations
I/O Operations
Signup and view all the flashcards
File System Manipulation
File System Manipulation
Signup and view all the flashcards
Communication
Communication
Signup and view all the flashcards
Error Detection and Handling
Error Detection and Handling
Signup and view all the flashcards
Resource Management
Resource Management
Signup and view all the flashcards
Accounting/Logging
Accounting/Logging
Signup and view all the flashcards
Protection & Security
Protection & Security
Signup and view all the flashcards
OS Kernel
OS Kernel
Signup and view all the flashcards
System Calls
System Calls
Signup and view all the flashcards
Kernel protection
Kernel protection
Signup and view all the flashcards
Application Programming Interface (API)
Application Programming Interface (API)
Signup and view all the flashcards
Run-Time Environment (RTE)
Run-Time Environment (RTE)
Signup and view all the flashcards
System Call Execution
System Call Execution
Signup and view all the flashcards
Semantics of System Call Execution
Semantics of System Call Execution
Signup and view all the flashcards
Types of System Calls
Types of System Calls
Signup and view all the flashcards
Mechanism
Mechanism
Signup and view all the flashcards
Policy
Policy
Signup and view all the flashcards
Implementation of an OS
Implementation of an OS
Signup and view all the flashcards
monolithic Structures
monolithic Structures
Signup and view all the flashcards
Layered Approach
Layered Approach
Signup and view all the flashcards
OS Structure: Modules
OS Structure: Modules
Signup and view all the flashcards
Virtual Machine (VM)
Virtual Machine (VM)
Signup and view all the flashcards
IMPLEMENTAION OF VM
IMPLEMENTAION OF VM
Signup and view all the flashcards
Operating system generation
Operating system generation
Signup and view all the flashcards
System Boot
System Boot
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.