Operating Systems Flashcards
Operating system is an intermediary between
user of a computer and the computer hardware
Functions of Operating Systems
-Oversee (seyretmek) operation of computer
-Store and retrieve (okumak) files
-Schedule programs for execution
-Coordinate the execution of programs
++Uses the computer hardware in an efficient manner
OS works 2 basic way
OS an extended machine (resource allocator)
-Hides messy details which must be performed
-Presents user with a virtual machine, easier to use
-Manages all resources
-Decides between conflicting reuests for efficient and fair resource use
OS a resource manager (control program)
-Each program gets time with the resource
-Each program gets space on the resource
-Controls execution of programs to prevent errors and improper use of computer
Four components of computer system
computer hardware<operating system<system and application programs<users
Hardware
provides basic computing resources
-CPU, memory, I/O devices
Operating System
Controls use of hardware among various applications and users
Application programs
Defines the ways in which the system resources are used to solve the computing problems of the users
Users
People, machines, other computers
Software tree
Software
Application and System
System is utility and Operating system
Operating system is kernel and user interface
Operating system components
Kernel and User interface
Kernel
performs basic required functions
-file manager
-device drivers
-memory manager
-schedular and dispatcher
difference between schedular and dispatcher
schedular: işlemleri seçer sürece ekler veya süreçten kaldırır
dispatcher: zaman aralıklarının dağılımını ayarlar.seçilen işlemler alıp çalıştırır. bir zaman aralığına son vermek için bölücü sinyal yollar
user interface
communicates with users
-Text based (shell)
-Graphical user interface GUI
Componenets of kernel
**File manager
-Directory (folder) a user created a bundle of files and subfiles
-Directory path a sequence of directories within directories
**Memory manager
-Allocates space in memory
-May create a illusion and look like it has more memory than it actually does (virtual memory)by playing a shell game
Getting is started (…)
(bootstrapping)
Bootloader
Bilgisayar açılınca çalışır, hafızaya operating sistemi alır
Program in ROM (examole of firmware)
-Run by the CPU when power is turned on
-Transfers operating system from mass storage to main memory
-Executes jump to operating system
Process and process state
Process süreç
Process state Mevcut durum
-Program counter
-General purpose registers
-Related portion of main memory
Semaphore
A control flag
Critical region
Tek bir süreçle çalıştırılması gereken bir grup komut
Mutual exclusion
requirement for proper implementation of a critical region
Deadlock
Processes block each other from continuing
Conditions required for deadlock
1-Competition for non-sharable resources
2-Resources requested on a partial basis
3-An allocated resource can not be forcibly retrieved
Filozofların akşam yemeği problemi
-Tamamen rastgele davranışlarla çözüm beklenir, garantisi yoktur (Random solution)
-Bir garson sırasıyla biri alacak biri almayacak biçimde dağıtır ve deadlock/starvation sorunları çözülür (Conductor solution)
-Bir kişi alcak bir kişi almaycak şeklinde davranırlar. (Monitor solution)
-Bir garson 5. filozof hariç diğerlerinin isteklerini yerine getirecektir.
-4 değerinde bir semaforla herhangi 4 filozofun yemek yemesi durdurulup diğer filozofun kesin olarak yemek yemesi sağlanır. Yemek bitince smafor değeri 1 azaltılır
-Her filozofa ilk olarak düşük numaralı chopstick aldırılıp deadlock önlenir.
-Her chopsticke semaphore konur. Müsaitlik durumuna göre chopstickleri alan filozoflardan yalnızca bir chopstick alması durumunda elindekini bırakıp sırasını tekrar beklemesi sağlanır.
Evolution of shared computing
Batch processing
Interactive processing
-requires real-timeprocessing
Timesharing/Multitasking
-Implemented by multiprogramming
Multiprocessor machines