Anda di halaman 1dari 27

Sistem Operasi

Pertemuan 3

By Danang Aditya
Operating System Services

 Berdasarkan penjelasan pertemuan sebelumnya Sistem Operasi menyediakan


lingkungan untuk eksekusi program, dan “services” bagi program maupun user
 Sebuah OS yang lengkap menyediakan services sebagai berikut :
 User Interface : GUI, CLI(Command Line Interface),Batch
 Eksekusi Program
 Operasi I/O
 Manipulasi File system
Cont’d

 Komunikasi
 Deteksi Error
 Alokasi Sumber daya
 Accounting
 Protection & Security
 Proteksi = Memastikan semua akses terhadap system resource tetap terkendali
 Security = User authentication, mencegah perangkat I/O eksternal melakukan akses yang
tidak semestinya
Operating System Services View
User Operating System Interface

 Secara mendasar cara user berinteraksi dengan sebuah Sistem Operasi terdiri dari :
 CLI (Command Line Interfaces)
 Memerlukan Command Interpreter, yang bisa saja diimplementasikan dalam kernel, atau
merupakan program terpisah -> Windows & UNIX
 Command Interpreter -> Shells
 Perintah yang dijalankan bisa saja built in dalam kernel, ataupun berupa pemanggilan
program, dimana memungkinkan penambahan perintah
 GUI (Graphical User Interface)
 Menggunakan Mouse, Keyboard, dan Monitor
 Icons mewakili File, Program, dll
 Penekanan tombol mouse yang berbeda pada object interface memungkinkan action
tertentu
Contoh Shell Interpreter
Touchscreen Interface

Perangkat Touchscreen membutuhkan


interface yang berbeda
• Tidak ada perangkat Mouse
• Pengendalian menggunakan gesture
• Virtual Keyboard untuk memasukkan teks
• Voice Command
System Calls

 Programming Interface untuk servis – servis yang disediakan oleh OS


 Biasanya ditulis dengan High Level Language (C/C++)
 Biasanya diakses melalui Application Programming Interface (API) daripada
memanggil System Calls secara langsung
 Tiga macam API yang umum diantaranya Win32API (Windows), POSIX API
(Linux, UNIX, Mac OSX)
Contoh Pemanggilan System Calls
Contoh Standard API
Implementasi System Call

 Setiap kali terjadi pemanggilan System Call, maka akan diberikan nomor
khusus sesuai dengan setiap pemanggilan System Call
 System Call Interface akan memanggil System Call OS, setelah dijalankan
akan mengembalikan status ataupun nilai
 Pemanggil tidak perlu mengetahui bagaimana system call diimplementasikan
 Hanya perlu mematuhi bagaimana API bekerja, dan apa yang akan dikembalikan
oleh OS akibat pemanggilan System Call
 Detail dari OS interface tersembunyi dari programmer oleh API
API – System Call – OS Relationship
System Calls Type

 Process control
 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
Cont’d

 File management
 create file, delete file
 open, close file
 read, write, reposition
 get and set file attributes
 Device management
 request device, release device
 read, write, reposition
 get device attributes, set device attributes
 logically attach or detach devices
Cont’d

 Information maintenance
 get time or date, set time or date
 get system data, set system data
 get and set process, file, or device attributes
 Communications
 create, delete communication connection
 send, receive messages if message passing model to host name or process name
 From client to server
 Shared-memory model create and gain access to memory regions
 transfer status information
 attach and detach remote devices
Cont’d

 Protection
 Control access to resources
 Get and set permissions
 Allow and deny user access
Contoh Standard C Library
Operating System Structure

 Berdasarkan beberapa OS yang telah beredar struktur OS yang digunakan bias


sangat bervariasi
 Simple Structure (MS-DOS)
 More Complex (UNIX)
 Layered
 MicroKernel
 dll
Simple Structure (MS-DOS)

 MS DOS dibuat dan ditulis untuk


memenuhi sebesar mungkin
fungsionalitas dalam space sekecil
mungkin
 Tidak terbagi menjadi modul-
modul
 Meskipun memiliki struktur, tetapi
antarmuka dan fungsionalitas
setiap level tidak terpisah dengan
jelas
More Complex (UNIX)

 Pada saaat dikembangkan system


UNIX ini mengalami kendala
keterbatasan kemampuan
hardware
 Terdiri dari
 System Program
 Kernel yang sangat kaya dan gemuk
 Monolithic Layer
Layered

 Merupakan konsep Multi Layer


dimana
 Setiap layer hanya bisa
memerintahkan layer di bawahnya
 Komunikasi antar layer hingga
mencapai Layer terakhir yaitu
hardware
 Memiliki Kelemahan utama
 Proses Design yang rumit
 Overhead eksekusi perintah yang
besar
Microkernel (Mach)
 Dikembangkan pada tahun 1980 an
Application
Program
File
System
Device
Driver
user
mode
 Di Universitas Carnegie Mellon
 Bertujuan menyederhanakan
messages messages
Kernel menjadi Microkernel yang
bersifat modular, dan
Interprocess memory CPU kernel
Communication managment scheduling mode memindahkan service kedalam user
space
microkernel
 Fungsi utama dari microkernel
hardware sendiri yaitu menyediakan sarana
komunikasi antara user program
dengan service
Modular

 Banyak dari OS Modern saat ini memanfaatkan konsep Loadable kernel


module
 Memanfaatkan pendekatan konsep Object Oriented
 Setiap komponen terpisah
 Satu sama lain berkomunikasi melalui suatu interface
 Dan setiap modul dapat di load sewaktu2 ketika dibutuhkan oleh kernel

 Sehingga lebih Fleksibel dan diterapkan dalam OS Linux, Solaris, dll


Pendekatan Solaris Modular
Hybrid Structure (MacOSX)
graphical user interface
Aqua

application environments and services

Java Cocoa Quicktime BSD

kernel environment
BSD

Mach

I/O kit kernel extensions


The End
Any Question??
Tugas

 Cari Informasi dan jelaskan struktur OS Android dan iOS


 Buat dalam bentuk Makalah
 Dikumpulkan Minggu depan

Anda mungkin juga menyukai