Download as pdf or txt
Download as pdf or txt
You are on page 1of 35

Sistem Operasi

Materi
Dalam mata kuliah ini mahasiswa akan
mempelajari pokok-pokok bahasan sebagai
berikut:
• Konsep Sistem Operasi
• Manajemen Proses
• Manajemen Memori
• Manajemen I/O
• Manajemen Disk
• Manajemen Berkas
2
Pustaka
• Pangera, A.A. 2010. “Sistem Operasi”. Andi Offset.
• Kusnadi. 2008. “Sistem Operasi”. Andi Offset.
• Tanenbaum, A.S. Bos, H. 2015. “Modern Operating
Systems”. Fourth Edition. Pearson Education, Inc.
• Silberschatz, A. Galvin, P.B. Gagne, G. 2013. “Operating
System Concepts”. Ninth Edition. John Wiley & Sons,
Inc.
• Stallings, W. 2012. “Operating Systems Internals and
Design Principles”. Seventh Edition. Pearson Education,
Inc.
3
Berbagi Materi
1. Log in ke stikomapps.stikom.edu
2. Buka email stikom Anda

3. Masuk ke sicyca.stikom.edu
4. Pilih "Akademik" - "Kartu Rencana Studi"
5. Klik Site Brilian untuk mata kuliah Sistem Operasi

6. Masuk ke menu "FORUM"


7. Klik "Apply for Membership"

8. Setelah saya approve, silakan unduh materi di menu "COURSE"


dan lihat update nilai tugas di menu "SCORE LIST" 4
Operating System
• A modern computer consists of one or more processors,
some main memory, disks, printers, a keyboard, a mouse,
a display, network interfaces, and various other
input/output devices.
• If every application programmer had to understand how
all these things work in detail, no code would ever get
written.
• Furthermore, computers are equipped with an operating
system, whose job is to provide user programs with a
better, simpler, cleaner, model of the computer and to
handle managing all the resources just mentioned.
5
Operating System

6
Operating System
• The operating system runs in kernel mode and has
complete access to all the hardware and can execute any
instruction the machine is capable of executing.
• The rest of the software runs in user mode, in which only
a subset of the machine instructions is available.
• The user interface program, shell (when it is text based)
or GUI (when it uses icons), is actually not part of the
operating system and the lowest level of user-mode
software. It allows the user to start other programs, such
as a Web browser, email reader, or music player.

7
Operating System
• An important distinction between the operating system
and normal (usermode) software is that if a user does not
like a particular email reader, he is free to get a different
one or write his own if he so chooses;
• He is not free to write his own clock interrupt handler,
which is part of the operating system and is protected by
hardware against attempts by users to modify it.
• This distinction, however, is sometimes blurred in
embedded systems (which may not have kernel mode). In
such systems, it is difficult to draw a clear boundary.

8
Operating System
• In particular, operating systems are huge, complex, and long-
lived. The source code of the heart of an operating system like
Linux or Windows is on the order of five million lines of code
or more.
• To conceive of what this means, think of printing out five
million lines in book form, with 50 lines per page and 1000
pages per volume. It would take 100 volumes to list an
operating system of this size.
• And this is only for the part that runs in the kernel. When
essential shared libraries are included, Windows is well over
70 million lines of code. And this excludes basic application
software (things like Windows Explorer, Windows Media
9
Player, and so on).
An Extended Machine
• The architecture of most computers at the machine-
language level is primitive and awkward to program,
especially for input/output.
• Often, however, the hardware designers do not realize (or
care) how much trouble they are causing for the software.
• Consider modern SATA (Serial ATA) hard disks used on
most computers. An early version of the interface to the
disk ran over 450 pages.
• Clearly, no sane programmer would want to deal with this
disk at the hardware level.
10
An Extended Machine
• For this reason, all operating systems provide yet
another layer of abstraction for using disks: files.
• Using this abstraction, programs can create, write,
and read files, without having to deal with the
messy details of how the hardware actually works.
• It is much easier to deal with photos, emails,
songs, and Web pages than with the details of
SATA (or other) disks.
• Operating systems turn ugly hardware into
beautiful abstractions. 11
An Extended Machine

12
A Resource Manager
• In the bottom-up view, the job of the operating
system is to provide for an orderly and controlled
allocation of the processors, memories, and I/O
devices among the various programs wanting
them.
• Modern operating systems allow multiple
programs to be in memory and run at the same
time.

13
A Resource Manager
• Imagine what would happen if three programs
running on some computer all tried to print their
output simultaneously on the same printer.
• The operating system can bring order to the
potential chaos by buffering all the output
destined for the printer on the disk, oblivious to
the fact that the output is not really going to the
printer (yet).

14
A Resource Manager
• When a computer (or network) has more than one
user, the users might interfere with one another.
• The operating system's primary task is to keep
track of which programs are using which resource,
to grant resource requests, to account for usage,
and to mediate conflicting requests from different
programs and users.

15
Computer System
1. Prosesor
2. Memori Utama
Perangkat Keras
3. Sistem Bus
(Hardware)
4. Modul I/O
5. Peranti I/O

1. Firmware
Sistem Perangkat Lunak
2. Sistem Operasi
Komputer (Software)
3. Program Aplikasi

1. Pemrogram Sistem
Pengguna
2. Pemrogram Aplikasi
(Brainware)
3. Pengguna Aplikasi

16
Computer Hardware

17
Prosesor
• Prosesor adalah tempat eksekusi kode instruksi
program.
• Prosesor terdiri atas Control Unit, Arithmetic
Logic Unit, dan Register.
• CU bertugas mengatur eksekusi dan
mengendalikan seluruh komponen komputer
lainnya.
• ALU bertugas mengeksekusi operasi aritmatika
dan logika.
18
Register Pengguna
• Register pengguna terdiri atas register data dan
register alamat.
• Register data digunakan untuk menyimpan data
yang dibaca dari memori ataupun data yang akan
diproses di ALU.
• Register alamat digunakan untuk menyimpan
alamat memori dari data ataupun kode instruksi
program yang akan diakses oleh prosesor.

19
Register Status dan Kontrol
• Digunakan untuk mengontrol eksekusi kode
instruksi program.
• Register Program Counter (PC) menyimpan
alamat memori dari kode instruksi yang
sedang/akan dieksekusi.
• Register Instruksi (IR) menyimpan kode instruksi
yang sedang/akan dieksekusi.
• Register Status (FR) menyimpan sejumlah status
hasil eksekusi kode instruksi yang sedang
berlangsung. 20
Prosesor

21
Siklus Eksekusi

22
Siklus Eksekusi
• Prosesor mengambil kode instruksi (fetch),
kemudian dieksekusi (execute).
• Jika interupsi aktif (enabled), maka prosesor akan
melakukan proses interupsi (interrupt).
• Jika interupsi tidak aktif (disabled), maka prosesor
akan mengambil instruksi selanjutnya (fetch).
• Jika instruksi yang dijalankan adalah HALT, maka
prosesor akan menghentikan siklus eksekusinya
(akhir eksekusi suatu program).
23
Software Interrupt
• Interupsi perangkat lunak diakibatkan oleh kode
instruksi atau efek dari perangkat lunak.
• Contohnya program meminta sistem untuk
mencetak hasil keluaran ke printer, terjadi kondisi
pembagian dengan bilangan nol (division by zero),
hasil operasi melebihi presisi tipe data penyimpan
(arithmetic overflow).

24
Hardware Interrupt
• Interupsi diakibatkan oleh aksi pada perangkat
keras.
• Interupsi memiliki dua kategori.
• Maskable Interrupt yaitu interupsi yang disela.
Misalnya penekanan keyboard atau mouse.
• Non-Maskable Interrupt yaitu interupsi yang tidak
dapat disela. Misalnya kegagalan penyuplai
tenaga (power failure).

25
Cara Kerja Interupsi

26
Sistem Bus
• Pada operasi pembacaan memori ke register,
ketiga saluran bus akan aktif.
• Bus kendali digunakan untuk menginformasikan
jenis operasinya adalah pembacaan.
• Bus alamat untuk menginformasikan alamat
memori yang hendak diakses.
• Bus data digunakan untuk mengirimkan data dari
alamat memori tersebut ke register yang telah
ditentukan dalam kode instruksi.
27
Firmware
• Perangkat lunak yang disertakan pada perangkat
keras dari vendornya.
• Berupa instruksi untuk inisiasi dan pengendalian
operasi perangkat keras yang bersangkutan.
• Misalnya BIOS (Basic Input Output System) pada
motherboard, berisi instruksi untuk berkomunikasi
dan melakukan inisiasi kerja dari prosesor,
memori, dan subsistem I/O lainnya yang
terintegrasi dalam motherboard tersebut.
28
Sistem Operasi
• Berfungsi untuk mengelola seluruh komponen dan
sumber daya komputer, fisik maupun nonfisik
agar dapat digunakan secara optimal.
• Bertanggung jawab untuk menyediakan
antarmuka bagi pengguna maupun program
aplikasi.

29
Program Aplikasi
• Aplikasi pengguna dikembangkan untuk
menyelesaikan suatu permasalahan yang sifatnya
khusus. Misalnya Ms Excel, Ms Word, WinAmp.
• Aplikasi utilitas dikembangkan untuk membantu
pengelolaan penggunaan sumber daya komputer.
Misalnya WinZip, defragmenter, antivirus.

30
Brainware
• Pemrogram sistem merancang suatu sistem.

• Pemrogram aplikasi membuat aplikasi untuk


menyelesaikan suatu permasalahan khusus dengan
bantuan komputer.

• Pengguna aplikasi menggunakan komputer secara


langsung.

31
Latihan

32
Latihan

33
Latihan

34
Terima Kasih

You might also like