Week 2 on OS Flashcards
-provide an environment for execution of programs and services to programs and users.
operating systems
(operating system services)
-almost all operating systems have this…
-it varies between: command-line (CLI), Graphics User Interface (GUI), touch-screen, batch.
user interface
(operating system services)
-the system must be able to load a program into memory and to run that program, end execution, either normally or abnormally (indicating error).
program execution
(operating system services)
-a running porgram may require I/O, which may involve a file or an I/O device.
I/O Operations
(operating system services)
-the file system is of particular interest. Porgrams need to read and write files and directories, create and delete them, search them, list file information, permission management.
file-system manipulation
(operating system services)
-processes may exchange information, on the same computer or between computers over a network
-may be via shared memory or through message passing (packets moved by the OS).
communications
(operating system services)
-OS needs to be constantly aware of possible errors.
-may occur in the CPU and memory hardware, in I/O devices in user program
-for each type of error, OS should take the appropriate action to ensure correct and consistent computing.
error detection
(operating system services)
-when multiple users or multiple jobs running concurrently, resources must be allocated to each of them.
-many types of resources- CPU cycles, main memory, file storage, I/O devices.
resoruce allocation
(operating system services)
-to keep track of which users how much and what kinds of computer resources.
logging
(operating system services)
-the owners of information stored in a multiuser or networked computer system may want to control use of that information, concurrent processes should not interfere with each other
protection and security
(operating system services | protection and security)
-involves ensuring that all access to system resources is controlled.
protection
(operating system services | protection and security)
-_of the system from outsiders required user authentication, extends to defending external I/O devices from invalid access attempts.
security
-allows direct command entry
-sometimes implemented in kernel, sometimes by systems program.
-sometimes multiple flavors implemented -shells
-primarily fetches a command from user and executes it.
-sometimes commands built-in, sometimes just names of programs.
–if the latter, adding new features doesn’t require shell modification.
command line interpreter
(user operating system interface)
-usually mouse, keyboard, and monitor
-icons represent files, programs actions, etc.
-various mouse buttons over objects in the interface cause various actions (poivide information, options, execute function, open directory known as a folder).
user-friendly desktop (metaphor interface)
-mouse not possible or not desires
-actions and selection based on gestures
-virtual keyboard for text entry.
-voice commands.
touchscreen interfaces
-programming interface to the services provided by the OS
-typically written in a high-level language (C or C++).
-a number is associated with each of these
-mostly accessed by programs via a high-level Application Programming Interface (API) rather than direct system call use.
-three most common APIs are Windows, POSIX API for POSIX-based systems (including virtually all versions of UNIX, Linux and Mac OS), and Java API for the Java virtual machine (JVM).
system calls
-to copy the contents of one file to another file
system call sequence
a program that uses this function must include the unistd.h header file, as this file defined the ssize_t and size_t data types.
read ()
(parameters passed to read () | write)
-the file descriptor to be read
int fd
(parameters passed to read () | write)
-a buffer into which the data will be read
void *buf
(parameters passed to read () | write)
-the maximum number of bytes to be read into the buffer.
size_t count
-maintains a table indexed according to these numbers
-invokes the intended system call in OS kernel and returns status of the system call and any return values.
system call interface
-need know nothing about how the system call is implemented,
-just needs to obey API and understand what OS will do as a result call
-most details of OS interface hidden from programmer by API.
caller