program that acts as an intermediary between a user of a computer and the computer hardware.
softwareresponsibleforthemanagementandcoordinationactivities and and the sharing of the resources of the computer.
use the computer hardware in an efficient manner.
its job is to coordinate the execution of all other software, mainly user applications.
OperatingSystem
user
application
operatingsystem
hardware
the computer system
HARDWARE
provides basiccomputingresources
the computer system
OPERATINGSYSTEM
controlsand coordinates use of hardware among various applicationsandusers.
the computer system
APPLICATION PROGRAMS
define the ways in which the system resources are used to solve the computing problems of the users. (word processors, compilers, web browsers, database system, video games)
the computer system
USERS
people, machines, other computers
computersystem
made up of various components. the components can be hardware or software
CPU
electronic circuit responsible for executing the instructions of a computer program
registers
high speed storage areas in the CPU. all data must be stored in a register before it can be processed
ALU
allowsarithmetic(add, subtract, etc) and logic(and or not) operations to be carried out
controlunit
provides the timing and control signals required by other computer components
buses
data is transmitted from one part of a computer to another, connecting all major components to the CPU and memory
vonneumannarchitecture
all temporarycomputer design are based in this
components of a modern OS
USERINTERFACE
storage management
device management
memory management
file management
process management
process management
the os must ensure that each running application (process) is treated fairly in terms of processor time allocated in a multi-tasking environment
storage management
must be managed by the operating system, and is the lowest
memorymanagement
can neither run into the memory space of another process nor be run into by another process.
must be used properly so that each process can run most effectively
device management
managing input and output is largely a matter of managing queues and buffers
filemanagement
method for storing and organizing computer files and the data they contain to make it easy to find and access them.
userinterface
set of commands or menus through which a user communicates with a program
"shell"
command driven or graphical user
OS Service: program execution
able to load a program into memory and to run that program, end execution, either normally or abnormally(indicating error)
OS Service: resourceallocation
when multiple users or multiple jobs running concurrently, resources must be allocated to each of them
OS Service: i/o manipulation
running program may require i/o, which may involve a file an i/o device
OS Service: communication
process may exchange information
OS Service: errordetection
needs to be constantly aware of possible errors
OS Service: accounting
to keep track of which users use how much and what kinds of computer resources
OS Service: protection & security
protection - ensuring that all access to system resources is controlled
security - outsiders requires user authentication
system calls
• program to request service from the operating system
way for programs to interact with the operating system
services provided by system calls
-process creation and management
-main memory management
-file access, directory and file system management
-device handling(i/o)
-protection
-networking
types of system calls: process control
end & abort
load & execute
create process & terminate process
wait & signed event
allocate and free memory
types of system calls: filemanagement
create
open
close
delete
read file
types of system calls: device management
device manipulation like reading from device buffers, writing into device buffers
types of system calls: informationmaintenance
handles information and its transfer between the OS and the user program
types of system calls: communication
specially used for interprocess communications
kernel
primary interface between the hardware and the processes of a computer.
it is named kernel because it operates inside the OS, just like seed inside a hard shell
wait()
process needs to wait for another process to complete its execution
fork()
to create processes that are a copy of themselves
exec()
run when an executable file in the context of an already running process that replaces the older executable file
kill()
used by the OS to send a terminationsignal to a process that urges the process to exit