Bab 1: Pendahuluan.

Slides:



Advertisements
Presentasi serupa
SISTEM OPERASI (SO) PENdAHULUAN PERTEMUAN 1 PENGANTAR mata KULIAH.
Advertisements

Kelompok 10 I/O Sistem Operasi
Struktur Sistem Komputer
Sistem Terdistribusi 07 – OS Client Server Oleh : Muh. Ary Azali.
“Struktur Sistem Komputer”
Manajemen proses Manajemen Proses.
Pokok Bahasan Pokok Bahasan: Deskripsi dan Kontrol Proses
Manajemen Proses.
Pertemuan 2 Klasifikasi Sistem Operasi dan Review Hardware
Pertemuan 3 Arsitektur Komputer II
INPUT / OUTPUT.
Organisai dan arsitektur komputer
Computer System Structure
Struktur Sistem Operasi
Operating Systems Concept (Konsep Sistem Operasi) Minggu 14 Universitas Multimedia Nusantara Serpong, Tangerang Dr. Ananda Kusuma
S TRUKTUR S ISTEM K OMPUTER Univeristas Ahmad Dahaln Pengantar Arsitektur Komputer E. Haodudin Nurkifli.
Komponen Dasar Sistem Komputer
Sistem Operasi “Overview”
PROCESS DAN THREADS Pengertian : Program Proses MonoProgramming
Proses Oleh : Wahyu Andhyka Kusuma
Pengantar Sistem Operasi
Struktur Sistem Komputer
1 Pertemuan 1 Introduction Matakuliah: sistem Operasi Tahun: 2010.
Slide 6 – Management Proses
1 Pertemuan 17 Input / Output Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5.
Pertemuan 04 Hirarki Memory
Struktur Sistem Komputer
Memory and Storage Chapter 24 Subject: Digital System Year: 2009.
1 Pertemuan 5 Komunikasi antar Proses / Interprocess Communication (IPC) Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5 OFFCLASS01.
Pertemuan 2 Klasifikasi Sistem Operasi dan Review Hardware
Bab 1: Pendahuluan 1.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Bab1: Pendahuluan Fungsi sistem operasi Organisasi Sistem Komputer.
Struktur Sistem Komputer
Struktur Sistem Komputer
I/O Device and I/O Module
SISTEM OPERASI (RANGKUMAN)
STRUKTUR SISTEM KOMPUTER
STRUKTUR SISTEM KOMPUTER
Struktur Sistem Komputer
BAB I                       Mata Kuliah  Sistem Terdistribusi _______________________ Sistem Operasi Terdistribusi Oleh : Laseri, S.Kom.
Tim Teaching Grant Mata Kuliah Sistem Operasi
Struktur Sistem Komputer
Komponen Dasar Sistem Operasi
Course Objective Definisi Sistem Operasi.
INTRODUCTION TO OPERATING SYSTEM
PROSES DAN MANAJEMEN PROSES (1)
Slide 6 – Management Proses
Hardware Hardware Merupakan komponen-komponen fisik peralatan yang membentuk suatu sistem komputer, serta peralatan-peralatan lain yang mendukung komputer.
Apakah Sistem Operasi? “Sebuah Program yang mengatur perangkat Keras Komputer” Interface manager Menjadikan interaksi manusia dengan komputer menjadi mudah.
Model Sistem Operasi 5/20/2018.
Rujukan Mata Kuliah Sistem Operasi #02.
Struktur Sistem Komputer
BAB 2: STRUKTUR SISTEM KOMPUTER
Sistem Operasi. Pendahuluan Sistem Operasi Arsitektur Sistem Komputer Hardware Operating System (OS) Programming Language (e.g. PASCAL) Application Programs.
Pengantar Teknologi Informasi Introduction to Computers and Networks
PART 3 PENGENALAN HARDWARE
Struktur Sistem Komputer
I/O Device and I/O Module
Struktur Sistem Komputer
Bab 1: Pendahuluan.
Struktur Sistem Komputer
SISTEM OPERASI Desi Ramayanti, S.Kom 11/16/2018
Pertemuan 2 Klasifikasi Sistem Operasi dan Review Hardware
I/O Device and I/O Module
Struktur Sistem Komputer
Jaringan Komputer.
Struktur Sistem Komputer
Struktur Sistem Komputer
Hardware Merupakan komponen-komponen fisik peralatan yang membentuk suatu sistem komputer, serta peralatan- peralatan lain yang mendukung komputer dalam.
Tim Teaching Grant Mata Kuliah Sistem Operasi
Struktur Sistem Komputer
Transcript presentasi:

Bab 1: Pendahuluan

Bab1: Pendahuluan Fungsi sistem operasi Organisasi Sistem Komputer Arsitektur Sistem Komputer Struktur sistem operasi Operasi pada sistem operasi Manajemen Proses Manajemen Memory Manajemen Penyimpanan Data (Storage) Proteksi dan Sekuritas Distributed Systems Special-Purpose Systems Computing Environments

Tujuan Bab ini bertugas memberikan penjelasan secara umum untuk tiap komponen-komponen sistem operasi Bab ini bertugas memberikan penjelasan tentang organisasi sistem komputer

Apa itu Operating System? Sebuah program yang bertugas sebagai interface antara user dengan hardware komputer Tujuan Operating system : Mengeksekusi program milik user dan memudahkan user untuk menyelesaikan masalah dengan mudah Membuat sistem komputer mudah untuk digunakan Menggunakan hardware komputer dengan efisien

Struktur Sistem Komputer Computer system dapat dibagi menjadi 4 komponen Hardware – sebagai resource untuk komputasi dasar CPU, memory, I/O devices Operating system Controls and coordinates use of hardware among various applications and users Program aplikasi – define the ways in which the system resources are used to solve the computing problems of the users Word processors, compilers, web browsers, database systems, video games User manusia, mesin, komputer lain

Empat Komponen Sistem Komputer

Definisi Operating System OS bertugas melakukan alokasi resource Melakukan manajemen resource Mengambil keputusan saat terjadi konflik request agar resource dapat digunakan secara fair dan efisien OS adalah control program Artinya, OS mengendalikan eksekusi program-program untuk mencegah error dan pemakaian komputer yang tidak bijak

Definisi Operating System (Cont.) Tidak ada definisi yang pasti mengenai sistem operasi Tiap sistem operasi bergantung pada pembuat sistem operasi tersebut Akibatnya, sistem operasi bervariasi Program yang terus beroperasi pada komputer disebut kernel . Sementara program-program lain adalah system program (yang membentuk sistem operasi, seperti : disk defragmenter, printing, melihat isi directory, dll ). Sisanya adalah program aplikasi. (game, word, dll) Kernel developers focus on interfaces, data structures, algorithms, and optimization for the core of the operating system. System programmers write daemons, utilities, and other tools for automating common or difficult tasks. Device drivers use the interfaces and data structures written by the kernel developers to implement device control and IO

Kernel Kernel adalah program yang bertugas mengatur input/output request dari aplikasi/user menuju resource dari komputer, yaitu : CPU, memory, I/O, atau devais lainnya dari komputer

Computer Startup Bootstrap program diload oleh komputer saat power on atau reboot Biasanya disimpan dalam ROM atau EEPROM, dan biasa disebut firmware Melakukan inisialisasi pada semua aspek sistem komputer Setelah itu mulai melakukan loading terhadap kernel sistem operasi dan mulai beroperasi Firmware berarti memory tetap ada walaup power off

Computer System Organization Computer-system operation Satu atau lebih CPUs, device controllers terkoneksi lewat bus untuk dapat mengakses shared memory Eksekusi instruksi CPU dan devais yang terus-menerus membutuhkan cycles memory

Operasi pada Sistem Komputer I/O devices dan CPU bekerja sama secara terus-menerus Tiap device controller adalah hardware yang bertugas untuk tiap tipe devais Tiap device controller memiliki local buffer. CPU memindahkan data dari/ke main memory dari/ke local buffers Device controller memberi tahu CPU bahwa tugasnya untuk mentransfer request ke local buffer telah selesai dengan menggunakan interrupt. I/O is from the device to local buffer of controller. The Device Controller receives the data from a connected device and stores it temporarily in some special purpose registers (i.e. local buffer) inside the controller. Then it communicates the data with a Device Driver . For each device controller there is an equivalent device driver which is the standard interface through which the device controller communicates with the Operating Systems through Interrupts. Device controller is a hardware whereas device driver is a software. The controller's job is to convert the serial bit stream to block bytes and perform any error correction necessary.

Device I/O address

Interrupts Operating systems dikendalikan oleh interrupt Interrupt adalah request layanan dari CPU Contoh interrupt : Mouse moved. Disk drive at sector/track position(old days). Keyboard key pressed. Printer out of paper. Video card wants memory access. Modem sending or receiving. USB scanner has data. Tiap interrupt ini membutuhkan penanganan yang berbeda, tergantung jenis dan asal interrupt.

Ketika interrupt diterima, CPU harus save the address of the interrupted instruction di register dan program counter disable (or queue) incoming interrupts while processing this one transfer control to the appropriate interrupt service routine this is usually done via an interrupt vector (table of addresses for interrupt service routines), stored in first ~100 memory locations after processing the interrupt, enable incoming interrupts restore interrupted instruction & resume processing

Interrupt Vector Table

Interrupt controller

Hardware & Software Interrupts Interrupt bisa dilakukan hardware lewat the system bus (e.g., segmentation fault) Interrupt bisa dilakukan software (e.g., system call for I/O, trap for division by zero)

Interrupt Timeline

I/O Structure After I/O starts, control returns to user program only upon I/O completion. Wait instruction idles the CPU until the next interrupt Wait loop (contention for memory access). At most one I/O request is outstanding at a time, no simultaneous I/O processing. After I/O starts, control returns to user program without waiting for I/O completion. System call – request to the operating system to allow user to wait for I/O completion. Device-status table contains entry for each I/O device indicating its type, address, and state. Operating system indexes into I/O device table to determine device status and to modify table entry to include interrupt.

Synchronous I/O Setelah I/O bekerja, user program memagang kontrol kembali hanya setelah I/O selesai I/O jenis ini dilakukan dengan melakukan instruksi tunggu (wait instruction) atau wait loop Hanya boleh satu request I/O dalam satu waktu, request yang lain harus menunggu Asynchronous I/O Setelah I/O bekerja, kontrol akan kembali ke user program tanpa harus menunggu proses I/O selesai Ada semacam tabel status device yang berisi entry untuk tiap device I/O menunjukkan tipe, address, dan state request OS melihat ke tabel ini untuk menentukan status devais dan menentukan entry

Scheduling I/O Scheduling I/O requests can greatly improve overall efficiency. Priorities can also play a part in request scheduling. The classic example is the scheduling of disk accesses, as discussed in detail in chapter 12. Buffering and caching can also help, and can allow for more flexible scheduling options. On systems with many devices, separate request queues are often kept for each device

Tabel Device-Status

Direct Memory Access Structure simple keyboard processing: user types character at keyboard keyboard controller sends interrupt to CPU CPU must complete current instruction, then save state control is transferred to interrupt service routine, which: stores char in a buffer & increments buffer pointer sets flag to notify OS that input is available (can be transferred to requesting program) must restore CPU state and resume processing For high-speed I/O devices, the combined overhead of the interrupts may be too costly Direct Memory Access: a device driver assigns a specific memory segment to the device controller device controller can transfer an entire block of data directly to/from main memory without CPU intervention. only one interrupt is generated per block, rather than the one interrupt per byte For example : a sound card may need to access data stored in the computer's RAM, but since it can process the data itself, it may use DMA to bypass the CPU. Video cards that support DMA can also access the system memory and process graphics without needing the CPU.

Storage Structure Main memory – only large storage media that the CPU can access directly. Secondary storage – extension of main memory that provides large nonvolatile storage capacity. Magnetic disks – rigid metal or glass platters covered with magnetic recording material Disk surface is logically divided into tracks, which are subdivided into sectors. The disk controller determines the logical interaction between the device and the computer.

Storage structure Memory is organized in a hierarchy tradeoffs: speed, cost, volatility primary memory fast, expensive, volatile data is stored in electronic circuitry only storage CPU can access directly Secondary memory slow, cheap, permanent data is stored magnetically or optically or "physically" can store massive amounts of inactive data, must be copied to primary memory to be accessed cpu secondary memory primary memory

Caching Caching – copying information into faster storage system; main memory can be viewed as a last cache for secondary storage. Important principle, performed at many levels in a computer (in hardware, operating system, software) Information in use copied from slower to faster storage temporarily Faster storage (cache) checked first to determine if information is there If it is, information used directly from the cache (fast) If not, data copied to cache and used there Cache smaller than storage being cached Cache management important design problem Cache size and replacement policy

Performance of Various Levels of Storage Movement between levels of storage hierarchy can be explicit or implicit

Migration of Integer A from Disk to Register Multitasking environments must be careful to use most recent value, not matter where it is stored in the storage hierarchy Multiprocessor environment must provide cache coherency in hardware such that all CPUs have the most recent value in their cache Distributed environment situation even more complex Several copies of a datum can exist Various solutions covered in Chapter 17 CPU

Operating System Structure Multiprogramming digunakan untuk meningkatkan efisiensi Single user CPU and I/O devices busy at all times Multiprogramming mengorganisasi jobs (code dan data) sehingga CPU memiliki job untuk dikerjakan Sejumlah jobs di simpan di memory Satu job dipilih dan dijalankan via job scheduling Jika harus menunggu (misal untuk I/O), OS mengerjakan job lainnya Timesharing (multitasking) adalah perpindahan CPU dari satu job ke job yang lain sehingga user bisa berpindah dari satu job ke job yang lain ketika CPU bekerja. Akibatnya tercipta interactive computing, karen user dapat berinteraksi dengan jobs. Response time harus < 1 second Each user has at least one program executing in memory process If several jobs ready to run at the same time  CPU scheduling If processes don’t fit in memory, swapping moves them in and out to run Virtual memory allows execution of processes not completely in memory

Memory Layout for Multiprogrammed System

Operating-System Operations Interrupt dilakukan oleh hardware Software error atau request menyebabkan terjadinya exception atau trap Division by zero, request for operating system service Other process problems include infinite loop, processes modifying each other or the operating system Dual-mode operation allows OS to protect itself and other system components User mode and kernel mode Mode bit provided by hardware Provides ability to distinguish when system is running user code or kernel code Some instructions designated as privileged, only executable in kernel mode System call changes mode to kernel, return from call resets it to user

Transisi dari Mode User ke Mode Kernel Timer to prevent infinite loop / process hogging resources Set interrupt after specific period Operating system decrements counter When counter zero generate an interrupt Set up before scheduling process to regain control or terminate program that exceeds allotted time Many years ago, when computers were as big as a room, users ran their applications with much difficulty and, sometimes, their applications crashed the computer. To avoid having applications that constantly crashed, newer OSs were designed with 2 different operative modes: Kernel Mode: the machine operates with critical data structure, direct hardware (IN/OUT or memory mapped), direct memory, IRQ, DMA, and so on. User Mode: users can run applications. System calls are like special functions that manage OS routines which live in Kernel Mode. A system call can be called when we: access an I/O device or a file (like read or write) need to access privileged information (like pid, changing scheduling policy or other information) need to change execution context (like forking or executing some other application) need to execute a particular command (like ''chdir'', ''kill", ''brk'', or ''signal'')

Process Management Proses adalah program yang berjalan. Proses merupakan bagian dari system. Jika program dapat dikatakan sebagai passive entity, process dikatakan sebagai active entity. Process membtuhkan resource untuk melakukan tugasnya (task) CPU, memory, I/O, files Initialization data Penghentian atau terminasi proses akan mengembalikan resource yang digunakan sebelumnya Proses dengan Single-threaded memiliki satu program counter yang menunjukkan lokasi instruksi berikutnya yang akan dikerjakan Process mengerjakan instruksi secara sekuensial , satu demi satu, hingga selesai Proses dengan multi-threaded memiliki satu program counter untuk tiap thread Sistem biasanya memiliki beberapa proses, beberapa user Beberapa operating sistem berjalan pada satu atau beberapa CPU. Concurrency by multiplexing the CPUs among the processes / threads

Satu thread Multiple thread, data sharing Multiple thread, one thread waiting

Process Management Activities Sistem operasi bertanggung jawab untuk aktivitas manajemen proses : Menciptakan dan menghapus proses user dan proses sistem Menghentikan sementara dan meneruskan processes Menyediakan mekanisme untuk process synchronization Menyediakan mekanisme untuk process communication Menyediakan mekanisme untuk penanganan deadlock Deadlock

Memory Management Semua data disimpan dalam memory sebelum dan sesudah processing Semua instruksi disimpan dalam memory sebelum dieksekusi Memory management bertugas menentukan isi di dalam memory agar : Mengoptimalkan utilisasi CPU dan memaksimalkan respon komputer terhadap user. Aktivitas yang dilakuka manajemen Memory Melakukan tracking bagian memory mana yang sedang dipakai dan oleh siapa Menentukan instruksi dan data mana yang keluar masuk memory Mengalokasikan dan dealokasi memory spacesesuai kebutuhan

Storage Management OS provides uniform, logical view of information storage Abstracts physical properties to logical storage unit - file Each medium is controlled by device (i.e., disk drive, tape drive) Varying properties include access speed, capacity, data-transfer rate, access method (sequential or random) File-System management Files usually organized into directories Access control on most systems to determine who can access what OS activities include Creating and deleting files and directories Primitives to manipulate files and dirs Mapping files onto secondary storage Backup files onto stable (non-volatile) storage media

Mass-Storage Management Usually disks used to store data that does not fit in main memory or data that must be kept for a “long” period of time. Proper management is of central importance Entire speed of computer operation hinges on disk subsystem and its algorithms OS activities Free-space management Storage allocation Disk scheduling Some storage need not be fast Tertiary storage includes optical storage, magnetic tape Still must be managed Varies between WORM (write-once, read-many-times) and RW (read-write)

I/O Subsystem Salah satu motivasi pemakaian OS adalah menghindarkan user dari interaksi algnsung dengan devais I/O subsystem bertanggung jawab untuk Manajemen memory dari I/O termasuk diantarangya buffering (penyimpanan dat sementara sebelum ditransfer), caching (menyimpan sebagian data untuk management of I/O including buffering (storing data temporarily while it is being transferred), caching (storing parts of data in faster storage for performance), spooling (the overlapping of output of one job with input of other jobs) General device-driver interface Drivers for specific hardware devices

Proteksi dan Security Proteksi – mekanisme untuk mengontrol akses proses atau user any mechanism for controlling access of processes or users to resources defined by the OS Security – defense of the system against internal and external attacks Huge range, including denial-of-service, worms, viruses, identity theft, theft of service Systems generally first distinguish among users, to determine who can do what User identities (user IDs, security IDs) include name and associated number, one per user User ID then associated with all files, processes of that user to determine access control Group identifier (group ID) allows set of users to be defined and controls managed, then also associated with each process, file Privilege escalation allows user to change to effective ID with more rights

Computing Environments Traditional computer Blurring over time Office environment PCs connected to a network, terminals attached to mainframe or minicomputers providing batch and timesharing Now portals allowing networked and remote systems access to same resources Home networks Used to be single system, then modems Now firewalled, networked

Computing Environments (Cont.) Client-Server Computing Dumb terminals supplanted by smart PCs Many systems now servers, responding to requests generated by clients Compute-server provides an interface to client to request services (i.e. database) File-server provides interface for clients to store and retrieve files

Peer-to-Peer Computing Another model of distributed system P2P does not distinguish clients and servers Instead all nodes are considered peers May each act as client, server or both Node must join P2P network Registers its service with central lookup service on network, or Broadcast request for service and respond to requests for service via discovery protocol Examples include Napster and Gnutella

Web-Based Computing Web has become ubiquitous PCs most prevalent devices More devices becoming networked to allow web access New category of devices to manage web traffic among similar servers: load balancers Use of operating systems like Windows 95, client-side, have evolved into Linux and Windows XP, which can be clients and servers

End of Chapter 1

Tugas Terangkan bagaimana linux booting Terangkan bagaimana komputer bekerja (CPU, Memory, bus, register, ALU, dll) Tugas ditulis tangan