Rabu, 23 Februari 2011

Browse » Home » , » sitem operasi (Bambang Iskarno)

sitem operasi (Bambang Iskarno)

Definisi Sistem Operasi

• Dari sudut pandang user
– Sistem Operasi sebagai alat untuk mempermudah
penggunaan Komputer
– Sistem Operasi sebagai alat untuk memaksimalkan
penggunaan sumber daya komputer (dalam lingkungan
multi-user)
• Dari sudut pandang sistem
– Sistem Operasi sebagai alat yang menempatkan sumber
daya secara efisien (
Resource Allocator
)
– Sistem Operasi sebagai alat yang mangatur eksekusi
aplikasi dan operasi dari alat I/O (
Control Program
)
– Sistem Operasi sebagai sebuah program yang selalu
berjalan setiap saat pada komputer (
Kernel
)


Layanan SO
Layanan SO
• Menyediakan layanan kepada user:
–
User interface
– hampir semua SO ada GUI-nya
•Varies between
Command-Line (CLI)
,
Graphics User
Interface (GUI), Batch
–
Program execution
– SO harus bisa meload program
ke memory dan mengeksekusinya, menghentikan
eksekusi program, baik normal maupun tidak normal
(abnormal exit)
–
I/O operations
- Program yang sedang berjalan butuh
I/O, baik mengakses file ataupun I/O device
–
File-system manipulation
- Programs butuh read dan
write baik file atau directories, create dan delete, search
file/dir, list file information, dan permission
management.


Layanan SO
Layanan SO
–
Communications
– proses harus
berkomunikasi antar proses dalam komputer
yang sama atau antar komputer dalam
jaringan
• Menggunakan shared memory atau menggunakan
message passing
–
Error detection
– harus mampu menangani
error
• Dalam terjadi pada CPU, memory hardware, dalam
I/O devices, dan dalam user program
• Untuk setiap error, OS harus menanganinya dengan
aksi yang sesuai, benar, dan konsisten
• Harus adanya fasilitas debugging


Layanan SO
Layanan SO
–
Resource allocation –
ketika multiple
users atau multiple jobs berjalan bersama-
sama (concurent), resources harus
dialokasikan
–
Accounting –
menentukan berapa banyak
dan berapa lama users menggunakan
sumber daya sistem
–
Protection and security
•
Protection
menyakinkan hak akses yang
diperbolehkan
•
Security
sistem, baik program atau I/O dari
pihak luar menggunakan autentikasi.


Sejarah SO
Sejarah SO
• Generasi ke-0 (1940)
– Tabung hampa; blm ada sistem operasi; plug board
• Generasi ke-1 (1950)
– Komponen utama transistor; sistem batch; punch card
• Generasi ke-2 (1960)
– Komponen utama IC; konsep: multi programming, multi
processing, spooling, real time
• Generasi ke-3 (1970)
– VLSI (very larga scalable integrated circuit)
– General purpose
• Genrasi ke-4 (1970 – now)
– PC; sistem operasi jaringan; cloud computing; GUI
friendly


Command Line Interpreter
Command Line Interpreter
• Sistem Operasi menunggu instruksi dari
pengguna (
command driven
).
– Sometimes commands built-in, sometimes just
names of programs
• If the latter, adding new features doesn’t require
shell modification
• CLI: Program yang membaca instruksi dan
mengartikan control statements
(keinginan user) umumnya disebut:
– control-card interpreter
– command-line interpreter
– UNIX shell.


User Operating System Interface
-
GUI
User Operating System Interface
-
GUI
• User-friendly
desktop
metaphor interface
– Menggunakan mouse, keyboard, and monitor
–Icons
merepresentasikan files, programs, actions, dll
– Menggunakan directory = folder
– Invented at
Xerox PARC
• SO sekarang menggunakan antara CLI dan GUI
interfaces
– Microsoft Windows is GUI with CLI “command” shell
– Apple Mac OS X as “Aqua” GUI interface with UNIX
kernel underneath and shells available
– Solaris is CLI with optional GUI interfaces (Java
Desktop, KDE)


Sistem Calls
Sistem Calls
• System calls menyediakan interface antara
proses (program yang sedang dijalankan) dan
sistem operasi.
• Biasanya dibuat menggunakan bahasa tingkat
tinggi (C or C++)
• Diakses menggunakan
Application Program
Interface (API)
daripada pemanggilan langsung
• 3 API yang umum adalah:
– Win32 API for Windows,
– POSIX API for POSIX-based systems (including virtually
all versions of UNIX, Linux, and Mac OS X),
– Java API for the Java virtual machine (JVM)



Example of System Calls
Example of System Calls
• System call sequence to
copy
the contents of
one file to another file

Example of Standard API
Example of Standard API
•Consider the
ReadFile()
function in the
• Win32 API—a function for reading from a file
• A description of the parameters passed to ReadFile()
– HANDLE file—the file to be read
– LPVOID buffer—a buffer where the data will be read into and written
from
– DWORD bytesToRead—the number of bytes to be read into the buffer
– LPDWORD bytesRead—the number of bytes read during the last read
– LPOVERLAPPED ovl—indicates if overlapped I/O is being used


System Call implementation
System Call implementation
• 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
• Managed by
run-time support library
(set
of functions built into libraries included with
compiler)

API
–
System Call
–
OS Relationship
API
–
System Call
–
OS Relationship

Standard C Library Example
Standard C Library Example
• C program invoking printf() library call,
which calls write() system call


System Calls
System Calls
• Tiga metode umum yang digunakan dalam
memberikan parameter kepada sistem
operasi
–Melalui
registers
• In some cases, may be more parameters than
registers
– Menyimpan parameter dalam
block
atau
tabel
pada memori
dan
alamat block
tsb
diberikan sebagai parameter dalam
register
• This approach taken by Linux and Solaris
– Menyimpan parameter (push) ke dalam
stack
(oleh program), dan melakukan pop off pada
stack (oleh sistem operasi)

Parameter Passing via Table
Parameter Passing via Table


Jenis System Calls
–
System
Jenis System Calls
–
System
Program
Program
• Process Control
• Manajemen file
• Manajemen Device
• Information Maintenance
• Komunikasi
• Proteksi
• Biasanya digunakan pada
system
program


Process Control
Process Control
• Selesai, abort
•Load, eksekusi
• Membuat dan men-terminate proses
• Mengambil dan men-set  process
attributes
• Wait for time
• Wait event, signal event
• Allocate and free memory

0 comments:

Posting Komentar

Prev Prev Prev
 
© Copyright 2012 | All Right Reserved | Didukung Oleh : Blogger.com