Operating System - Lesson 2
Information Maintenance
Many system calls exist simply for the purpose of transferring information between the user program and the operating system.
Communication
Message-passing model Shared-memory model
Program loading and execution
Once a program is assembled or compiled, it must be loaded into memory to be executed. The system may provide absolute loaders, relocatable loaders, linkage editors, and overlay loaders.
Types of System Calls
Process Control File Management Device Management Information Maintenance Communication Protection
File-system manipulation
Programs need to read and write files and directories. some operating systems include permissions management to allow or deny access to files or directories based on file ownership.
Graphical User Interface
Rather than entering commands directly via a command-line interface, users employ a mouse-based window-and-menu system characterized by a desktop metaphor.
One set of operating-system functions is for ensuring the efficient operation of the system itself.
Resource Allocation Logging Protection and Security
File modification
Several text editors may be available to create and modify the content of files stored on disk or other storage devices.
Status information
Some programs simply ask the system for the date, time, amount of available memory or disk space, number of users, or similar status information. Some systems also support a registry, which is used to store and retrieve configuration information.
User Interface
The interface is a window system with a mouse that serves as a pointing device to direct I/O, choose from menus, and make selections and a keyboard to enter text. Graphical User Interface (GUI) is used here.
Error Detection
The operating system needs to be detecting and correcting errors constantly. the operating system should take the appropriate action to ensure correct and consistent computing.
Program Execution
The system must be able to load a program into memory and to run that program. The program must be able to end its execution, either normally or abnormally.
File management
These programs create, delete, copy, rename, print, list, and generally access and manipulate files and directories.
Communications
These programs provide the mechanism for creating virtual connections among processes, users, and computer systems. They allow users to send messages to one another's screens, to browse web pages, to send e-mail messages, to log in remotely, or transfer files from one machine to another.
Logging
This record keeping may be used for accounting (so that users can be billed) or simply accumulating usage statistics. Usage statistics may be a valuable tool for system administrators who wish to reconfigure the system to improve computing services.
One set of operating system services provides functions that are helpful to the user.
User Interface Command-Line Interface (CLI) Program Execution I/O Operations File-system manipulation Communication Error Detection
Resource Allocation
When there are multiple processes running at the same time, resources must be allocated to each of them. The operating system manages many different types of resources. Some may have special allocation code, whereas others may have much more general request and release code.
debugger
a system program designed to aid the programmer in finding and correcting errors, or bugs-to determine the cause of the problem.
Background services
all general-purpose systems have methods for launching certain system-program processes at boot time. Some of these processes terminate after completing their tasks, while others continue to run until the system is halted.
System Services
also known as system utilities it provide a convenient environment for program development and execution.
application programmer designing a program using an API
can expect the program to compile and run on any system that supports the same API.
File Management
either system call requires the name of the file and perhaps some of the file's attributes. Needing the same sets of operations (e.g., open(), delete(), write()) for directories if the directory structure for organizing files in the file system exists.
Run-time Environment
full suite of software needed to execute applications written in a given programming language, including its compilers or interpreters as well as other software, such as libraries and loaders.
System-Call Interface
intercepts function calls in the API and invokes the necessary system calls within the operating system
Protection and Security
involves ensuring that all access to system resources is controlled. Security of the system from outsiders is also important. Such security starts with requiring each user to authenticate himself or herself to the system, usually by means of a password, to gain access to system resources.
Command Interpreters
is to get and execute the next user-specified command. Most Operating systems, including Linux, UNIX, and Windows, treat the command interpreter as a special program that is running when a process is initiated or when a user first logs on.
simplest approach to pass parameters to the operating system
is to pass the parameters in registers.
Communication
may be implemented via shared memory, in which two or more processes read and write to a shared section of memory, or message passing, in which packets of information in predefined formats are moved between processes by the operating system.
Shared-memory model
processes such as shared_memory_create() and shared_memory_attach() system calls to create and gain access to regions of memory owned by other processes.
System Calls
provide an interface to the services made available by an operating system. These calls are generally available as functions written in C and C++. more detailed and more difficult to work with than the API available to an application programmer.
RTE
provides System-Call Interface that serves as the link to system calls made available by the operating system.
Protection
provides a mechanism for controlling access to the resources provided by a computer system.
Operating System
provides an environment for the execution of programs.
time profile
requires either a tracing facility or regular timer interrupts.
Application Programming Interface (API)
specifies a set of functions that are available to an application programmer, including the parameters that are passed to each function and the return values the programmer can expect.
Message-passing model
the communicating process exchange messages with one another to transfer information.
CreateProcess()
used to create new process,
Touch-Screen Interface
users interact by making gestures on the touch screen
Command-Line Interface (CLI)
which uses text commands and a method for entering them is also another option.
Programming-language support
Compilers, assemblers, debuggers, and interpreters for common programming languages (such as C, C++, Java, and Python) are often provided with the operating system or available as separate download
User and Operating-System Interface
Command Interpreters Graphical User Interface Touch-Screen Interface
User interfaces to system calls.
File management Status information File modification Programming-language support Program loading and execution Communications Background services
Device Management
A process may need several resources to execute-main memory, disk drives, access to files, and so on.
I/O Operations
A running program may require I/O, which may involve a file or an I/O device.
Process Control
A running program needs to be able to halt its execution either normally.