Podcast
Questions and Answers
An operating system provides different kinds of services to which of the following?
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.
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?
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.
A running program may require ______, which may involve a file or an I/O device.
Which service is provided by the operating system relating to file system manipulation?
Which service is provided by the operating system relating to file system manipulation?
Processes in execution never need to communicate with each other; they run independently.
Processes in execution never need to communicate with each other; they run independently.
What is the purpose of error detection in an operating system?
What is the purpose of error detection in an operating system?
When multiple users or jobs run concurrently, the operating system handles ______ of resources to each of them.
When multiple users or jobs run concurrently, the operating system handles ______ of resources to each of them.
Match the following operating system services with their descriptions:
Match the following operating system services with their descriptions:
What is the primary function of the 'command interpreter' in the command line interface (CLI)?
What is the primary function of the 'command interpreter' in the command line interface (CLI)?
In a GUI, icons typically represent files, programs, and actions.
In a GUI, icons typically represent files, programs, and actions.
What is the role of 'shells' in relation to the command-line interface?
What is the role of 'shells' in relation to the command-line interface?
A ______ is a user-friendly metaphor interface, utilizing elements such as mouse, keyboard, and monitor.
A ______ is a user-friendly metaphor interface, utilizing elements such as mouse, keyboard, and monitor.
System calls are primarily accessed by programs through which means?
System calls are primarily accessed by programs through which means?
System calls provide a direct interface to the services offered by the operating system.
System calls provide a direct interface to the services offered by the operating system.
What is the purpose of context switching between user mode and kernel mode?
What is the purpose of context switching between user mode and kernel mode?
When a program requests a service managed by the operating system's kernel, it uses ______.
When a program requests a service managed by the operating system's kernel, it uses ______.
What is the role of the system-call interface?
What is the role of the system-call interface?
The caller must know the implementation details of a specific system call.
The caller must know the implementation details of a specific system call.
How are system call parameters typically passed in Linux and Solaris OS?
How are system call parameters typically passed in Linux and Solaris OS?
In system call parameter passing, parameters can be placed, or 'pushed', on the ______ by the program.
In system call parameter passing, parameters can be placed, or 'pushed', on the ______ by the program.
Match the following types of system calls with their descriptions:
Match the following types of system calls with their descriptions:
Which of the following is NOT considered a type of system call?
Which of the following is NOT considered a type of system call?
Every process in a system is created by another process, except for the very first process.
Every process in a system is created by another process, except for the very first process.
In the context of process creation, what is the process that creates a new process called?
In the context of process creation, what is the process that creates a new process called?
System calls for deleting a file needs only the file's ______ as a parameter..
System calls for deleting a file needs only the file's ______ as a parameter..
Which of the following is managed by the kernel?
Which of the following is managed by the kernel?
System programs, not system calls, define most user's view of the operations
System programs, not system calls, define most user's view of the operations
What is the role of the policy/mechanism separation in OS design?
What is the role of the policy/mechanism separation in OS design?
The MS-DOS was designed to provide maximum functionality with minimal ______.
The MS-DOS was designed to provide maximum functionality with minimal ______.
Match the following operating system structures with their descriptions:
Match the following operating system structures with their descriptions:
What is one major advantage of the microkernel architecture?
What is one major advantage of the microkernel architecture?
Operating systems can only be built using a monolithic kernel.
Operating systems can only be built using a monolithic kernel.
What is the main benefit of a Solaris modular approach?
What is the main benefit of a Solaris modular approach?
A ______ is required when a company need to run separate operating systems on the same computer.
A ______ is required when a company need to run separate operating systems on the same computer.
Match the applications with the virtual machine:
Match the applications with the virtual machine:
Which of the following represents the correct order, when it comes to boot the system?
Which of the following represents the correct order, when it comes to boot the system?
Hardware itself knows how to locate and load the kernel
Hardware itself knows how to locate and load the kernel
In the process of finding bug in the software, what is the role of debugging?
In the process of finding bug in the software, what is the role of debugging?
Operating systems generates ______ files containing error information
Operating systems generates ______ files containing error information
Flashcards
Operating System Services
Operating System Services
Functions that are helpful to the user.
User Interface
User Interface
Almost all operating systems have one.
User interface types
User interface types
Varies between Command-Line (CLI), Graphics User Interface (GUI), Batch (Non-Interactive).
Program Execution
Program Execution
Signup and view all the flashcards
I/O Operations
I/O Operations
Signup and view all the flashcards
File-System Manipulation
File-System Manipulation
Signup and view all the flashcards
Communications
Communications
Signup and view all the flashcards
Error Detection
Error Detection
Signup and view all the flashcards
Resource Allocation
Resource Allocation
Signup and view all the flashcards
Accounting
Accounting
Signup and view all the flashcards
Protection
Protection
Signup and view all the flashcards
Security
Security
Signup and view all the flashcards
Command Line Interface (CLI)
Command Line Interface (CLI)
Signup and view all the flashcards
Graphical User Interface (GUI)
Graphical User Interface (GUI)
Signup and view all the flashcards
System Calls
System Calls
Signup and view all the flashcards
Application Program Interface (API)
Application Program Interface (API)
Signup and view all the flashcards
ReadFile()
ReadFile()
Signup and view all the flashcards
System Call Table
System Call Table
Signup and view all the flashcards
Passing parameters in registers
Passing parameters in registers
Signup and view all the flashcards
Parameter Passing via a Block
Parameter Passing via a Block
Signup and view all the flashcards
Process Control
Process Control
Signup and view all the flashcards
File Management
File Management
Signup and view all the flashcards
Device management
Device management
Signup and view all the flashcards
Information Maintenance
Information Maintenance
Signup and view all the flashcards
Communications
Communications
Signup and view all the flashcards
Protection
Protection
Signup and view all the flashcards
System Programs
System Programs
Signup and view all the flashcards
File management Programs
File management Programs
Signup and view all the flashcards
Status Information Programs
Status Information Programs
Signup and view all the flashcards
File modification Programs
File modification Programs
Signup and view all the flashcards
Programming-language support
Programming-language support
Signup and view all the flashcards
Program loading and execution programs
Program loading and execution programs
Signup and view all the flashcards
Communications programs
Communications programs
Signup and view all the flashcards
Modules
Modules
Signup and view all the flashcards
Microkernel
Microkernel
Signup and view all the flashcards
Virtual Machine
Virtual Machine
Signup and view all the flashcards
Hypervisor
Hypervisor
Signup and view all the flashcards
Type 1 hypervisors
Type 1 hypervisors
Signup and view all the flashcards
Type 2 hypervisors
Type 2 hypervisors
Signup and view all the flashcards
Debugging
Debugging
Signup and view all the flashcards
SYSGEN
SYSGEN
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 thewrite()
system call. - The
standard C library
operates inuser mode
which then useswrite ()
to runwrite()
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.