Sistemet Operative Shërbimet e Sistemit Operativ: Lënda
Sistemet Operative Shërbimet e Sistemit Operativ: Lënda
Prishtinë, 2023
1
Operating System Services
2
Operating System Services (cont.)
▪ One set of OS services provides functions that are helpful to the user:
User interface - almost all OSes have a User Interface (UI):
- Command-Line Interface/Interpreter (CLI);
- Graphics User Interface (GUI);
- Touch-screens;
▪ One set of OS services provides functions that are helpful to the user:
File-system manipulation - programs need to read and write files and
directories, create and delete them, search them, list file Information,
permission management.
Communications – processes may exchange information, on the same
computer or between computers over a network.
▪ Communications may be via shared memory or through message
passing.
Logging - To keep track of which users use how much and what kinds of
computer resources.
Protection and security - the owners of information stored in a
multiuser or networked computer system may want to control use of
that information.
→ Protection involves ensuring that all access to system resources is
controlled.
→ Security of the system from outsiders requires user authentication,
extends to defending external I/O devices from invalid access attempts.
5
A view of Operating System Services
6
User and Operating System Interface -> CLI
program.
Shells.
Primarily fetches a command from user and executes it.
7
Bourne Shell Command Interpreter
8
Graphical User Interface (GUI)
GNOME).
9
Touchscreen Interfaces
▪ Voice commands.
10
System Calls
▪ There are various situations where you must require system calls in the
OS. Following of the situations are:
➢ It is must require when a file system wants to create or delete a file.
➢ If you want to read or write a file.
➢ Network connections require the system calls to sending and receiving
data packets.
➢ If you want to access hardware devices, including a printer, scanner, etc.
➢ To create and manage new processes.
12
Example of System Calls
▪ System call sequence to copy the contents of one file to another file:
13
System Call Implementation
numbers.
▪ The system call interface invokes the intended system call in OS kernel
and returns status of the system call and any return values.
▪ The caller 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:
14
API - System Call - OS Relationship
iii. Parameters placed, or pushed, onto the stack by the program and
popped off the stack by the OS.
16
Parameter passing via Table
17
Types of System Calls
Process control
▪ Process control is the system call that is used to direct the processes.
Create process, terminate process, end, abort, load, execute.
Get process attributes, set process attributes.
Wait for time, wait event, signal event.
Allocate and free memory.
Dump memory if error.
Debugger for determining bugs, single step execution.
Locks for managing access to shared data between processes.
18
Types of System Calls (cont.)
File management
▪ File management is a system call that is used to handle the files.
create file, delete file, open, close file.
Device management
▪ Device management is a system call that is used to deal with devices.
request device, release device.
19
Types of System Calls (cont.)
Information maintenance
▪ Information maintenance is a system call that is used to maintain
information.
get time or date, set time or date
Communications
▪ Communication is a system call that is used for communication.
create, delete communication connection
20
Types of System Calls (cont.)
▪ Protection
Control access to resources
21
Examples of Windows and Unix system calls
22
System Services
Status information
Communications
Background services
23
System Services (cont.)
▪ File management - Create, delete, copy, rename, print, dump, list, and
generally manipulate files and directories.
▪ Status information
Some ask the system for info - date, time, amount of available
24
System Services (cont.)
▪ File modification
Text editors to create and modify files.
25
System Services (cont.)
▪ Background Services
Launch at boot time:
▪ Some for system startup, then terminate.
▪ Some from system boot to shutdown.
Provide facilities like disk checking, process scheduling, error
logging, printing.
Run in user context not kernel context.
Known as services, subsystems, daemons.
26
Application Programs
▪ Along with system programs, most OSes are supplied with programs that
are useful in solving common problems or performing common
operations:
→ Application programs.
27
Linkers and Loaders
28
Why Applications are Operating-System Specific ?
29
Pyetje dhe Diskutime ?
30