Operacijski sustavi. Laboratorijska vježba 2. Petra Lončar, mag. ing. el., asistent FESB, 2016.

Size: px
Start display at page:

Download "Operacijski sustavi. Laboratorijska vježba 2. Petra Lončar, mag. ing. el., asistent FESB, 2016."

Transcription

1 Operacijski sustavi Laboratorijska vježba 2 Petra Lončar, mag. ing. el., asistent ploncar@fesb.hr FESB, 2016.

2 Linux procesi procesi su programi koji se izvršavaju i pritom zauzimaju sredstva sustava (spremnik, procesorsko vrijeme, uređaje) programi su izvršne datoteke, slijedovi instrukcija u spremniku poslovi koji se izvode na računalu oslanjanju se na uporabu i pretvorbu datoteka prilikom pokretanja sustav svakom procesu dodjeljuje njegov jedinstveni broj (PID eng. process identifier) sustav također uz svaki proces bilježi i broj procesa koji ga je pokrenuo (PPID eng. parent process identifier), kao i njegov radni direktorij popis pokrenutih ili aktivnih procesa ispisuje se naredbom ps (eng. process status)

3 Vrste procesa: 1. daemon proces koji postoji zbog specifične uloge (npr. apache deamon za http servis), pokreću se u pozadini i neaktivni su dok ih se ne pozove 2. parent proces koji kreira druge procese 3. child proces pokrenut od drugog, roditeljskog procesa koji ima oznaku PPID 4. orhpan aktivni proces čiji je roditeljski proces terminiran; takav proces preuzima init proces koji mu postaje roditeljski proces 5. zombie child proces koji se sa svojim izlaznim podacima ne vraća parent procesu i ostaje izgubljen u sustavu, može se izbrisati iz tablice procesa jedino restartom OS-a izlist stabla procesa može se dobiti korištenjem naredbe pstree

4 Parent & child procesi proces može pokrenuti drugi proces proces koji pokreće drugi proces naziva se roditelj, a procesi koje je pokrenuo su njegova djeca child procesi sadrže dodatak PPID koji ukazuje na njihove roditelje svi procesi u sustavu imaju svoj roditeljski proces kernel pri pokretanju OS-a stvara proces init s PID=1 proces init je roditelj svim ostalim procesima gašenje procesa roditelja gasi i njegove procese-djecu svaki proces ima svoj adresni prostor podijeljen u text, data, stack segmente

5 fork() sustavska funkcija koja stvara novi proces iz roditelja pozivajući novi proces pritom se kreira novi adresni prostor u koji se kopiraju text, data i stack parent procesa child proces ima pravo pristupa otvorenim datotekama prilikom izvršavanja programa u novom procesu ponovno se nailazi na funkciju fork() koja vraća vrijednost: - PID novog procesa, ako je fork() pozvan iz roditeljskog procesa - 0, ako je fork() pozvan iz child procesa svaki proces može izvršiti upit svog PID-a korištenjem funkcije getpid()

6 Primjer: #include <stdio.h> #include <unistd.h> int main( void ) { printf( "The PID of the parent process is: %d\n", (int)getpid() ); int pid = fork(); if ( pid == 0 ) { printf( "After the fork, the PID of the child is: %d\n", (int)getpid() ); } else { printf( "After the fork, the PID of the parent is: %d - fork() returned %d\n", (int)getpid(), pid ); } return 0; }

7 wait() - funkcija čeka da child proces pozvan funkcijom fork() završi s izvođenjem ako nije drugačije zadano, funkcija čeka završetak prvog pozvanog child procesa funkcija wait() u C jeziku može prihvatiti izlaznu vrijednost programa: int status; wait(&status); nakon završetka izvođenja child procesa, on će ostati u stanju zombie dok ga roditeljski proces ne uhvati wait() pozivom Dodatak prethodnom primjeru: #include <sys/wait.h> int child_status; else { printf( "After the fork, the PID of the parent is: %d - fork() returned %d\n", (int)getpid(), pid ); wait(&child_status); printf("child process is finished, status: %d\n", child_status); }

8 exec() funkcija omogućava child procesu pokretanje novog programa pozivom neke funkcije iz skupa exec() funkcija (execl, execlp, execle, execv, execvp, execvpe), memorijska slika child procesa zamjenjuje se novim programom funkcija execvp() pokreće find naredbu s argumentom. Primjer: #include <stdio.h> #include <unistd.h> int main( void ) { char *argv[3] = {"Command-line", ".", NULL}; int pid = fork(); if ( pid == 0 ) { execvp( "find", argv ); } wait(5); printf( "Finished executing the parent process - the child won't get here\n" ); return 0; }

9

10 Zadatak: Proučiti man/info poglavlja za fork, wait i waitpid Koja je uloga naredbe nice u Linux-u?

11 Nadzor procesa i poslova u ovu grupu aktivnosti ubrajamo: kreiranje procesa terminiranje procesa pokretanje u prednjem planu ili pozadini (foreground, background) suspendiranje procesa prebacivanje procesa iz prednjeg plana u pozadinu i obrnuto naredbe za popis procesa ps - dodatne opcije su: e za ispis svih procesa u sustavu f za ispis procesa s dodatnim podacima top - kontinuiran ispis procesa poredanih prema količini procesorskog vremena koji troše

12 pokretanjem procesa ljuska stvara posao (job) posao ima vlastiti identifikator (JID eng. job ID) job može biti u jednom od četiri stanja: foreground pretpostavljeno stanje, svaki posao se obavlja foreground ako nije drugačije navedeno background posao se odvija u pozadini (eng. background), ako se pokrene sa znakom '&' na kraju naredbene linije stopped posao se može zaustaviti na nekoliko načina i može se vratiti u foreground ili background stanje terminated posao je završen ako se ne može ponovno pokrenuti

13 izvršavanje naredbi u prednjem planu (foreground) - potrebno je da sustav završi s izvođenjem zadane naredbe kako bi se zadala sljedeća naredba - pojavljivanje prompta znak da je sustav završio s izvršavanjem prethodne naredbe izvršavanje naredbi u pozadini (background) - ljuska omogućava istovremeno pokretanje više naredbi - zadaje se znakom & na kraju linije s naredbom sintaksa: naredba & - nakon pokretanja naredbe s izvršavanjem u pozadini, ljuska ispisuje JID i PID procesa kao znak da će se izvođenje nastaviti u pozadini, a odmah nakon toga pojavljuje se prompt i moguće je nastaviti s radom Primjer: $ top & $ [1] 2687 $

14 kontrolni znak [Ctrl-Z] omogućava privremeno zaustavljanje posla koji se može ponovno pokrenuti u pozadini naredbom bg ili na terminalu naredbom fg zaustavljeni program ostaje u memoriji računala i čeka neku od naredbi za nastavak izvođenja: - nastavak izvođenja u pozadini (naredba bg) - nastavak izvođenja u prednjem planu (naredba fg) - naredba jobs ispisuje popis svih procesa koji se izvršavaju u pozadini background proces se može terminirati korištenjem kill naredbe: - korištenjem jobs <Enter> naredbom odrediti da li se proces izvršava - naredbom ps izolirati PID procesa (npr ) - proces terminirati naredbom (npr. kill 16565)

15 Zadatak: Pokrenuti goo program (vježba 1) u prednjem planu (foreground) Zaustaviti foreground program i nastaviti izvršavanje kao background Provjeriti korištenje CPU-a i memorije Pokrenuti još jedan goo proces u pozadini (background) Provjeriti korištenje memorije i CPU dvaju goo procesa Promotriti PID, PPID, job ID, duljinu izvođenja procesa Prekinuti izvođenje svih pokrenutih procesa

16 Filtri i preusmjeravanje svaki program na Linuxu ima definirane sljedeće ulaze i izlaze: stdin - standardni ulaz (eng. standard input) stdout - standardni izlaz (eng. standard output) stderr - standardni izlaz za greške (eng. standard error) svi ti ulazi i izlazi su vezani na terminal, ukoliko nisu preusmjereni uz pomoć specijalnih operatora predstavljeni su kao datoteke opisane opisnikom datoteke (eng. file descriptor) atribute datoteke sadržane u opisniku datoteke koristi operacijski sustav, a ne korisnički programi

17 Primjer: $ cat goo.c naredba cat prima podatke na ulazu, filtrira preuzete podatke te rezultat ispisuje na standardnom izlazu (zaslonu)

18 operator > se koristi za preusmjeravanje izlaza neke naredbe u datoteku Primjer: $ ls -l > info.txt operator < se koristi za preusmjeravanje sadržaja neke datoteke u neki program Primjer: - korištenje filtera sort za sortiranje sadržaja file-a info.txt $ sort < info.txt

19 operator >> se koristi za dodavanje sadržaja u datoteku Primjer: potrebno je u jednu datoteku dobiti ispis direktorija /bin i vjezba1 za svaki direktorij mora se posebno pozivati naredba ls $ ls -l /bin/ >> info.txt $ ls -l vjezba1 >> info.txt

20 Cjevovod eng. pipe povezuje izlaz i ulaz dva procesa (engl. interprocess communication) niz naredbi odvojen operatorom ulančavanje naredbi izlaz ili rezultat jedne naredbe prosljeđuje se drugoj kao ulaz brže i jednostavnije izvođenje složenih operacija sintaksa: naredba1 naredba2 Primjer: $ ls more $ ls -l /lib/ head -5 - korištenje filtera head za ispis prvih 5 linija sadržaja datoteke lib/ $ ls head -3 tail -1 - korištenja 2 cjevovoda te filtera head i tail za ispis 3. linije ispisa naredbe ls

CS240: Programming in C

CS240: Programming in C CS240: Programming in C Lecture 16: Process and Signals Cristina Nita-Rotaru Lecture 16/ Fall 2013 1 Processes in UNIX UNIX identifies processes via a unique Process ID Each process also knows its parent

More information

CSci 4061 Introduction to Operating Systems. Processes in C/Unix

CSci 4061 Introduction to Operating Systems. Processes in C/Unix CSci 4061 Introduction to Operating Systems Processes in C/Unix Process as Abstraction Talked about C programs a bit Program is a static entity Process is an abstraction of a running program provided by

More information

VRIJEDNOSTI ATRIBUTA

VRIJEDNOSTI ATRIBUTA VRIJEDNOSTI ATRIBUTA Svaki atribut (bilo da je primarni ključ, vanjski ključ ili običan atribut) može i ne mora imati ograničenja na svojim vrijednostima. Neka od ograničenja nad atributima: Null / Not

More information

CSC 1600 Unix Processes. Goals of This Lecture

CSC 1600 Unix Processes. Goals of This Lecture CSC 1600 Unix Processes q Processes Goals of This Lecture q Process vs. program q Context switching q Creating a new process q fork: process creates a new child process q wait: parent waits for child process

More information

Unix-Linux 2. Unix is supposed to leave room in the process table for a superuser process that could be used to kill errant processes.

Unix-Linux 2. Unix is supposed to leave room in the process table for a superuser process that could be used to kill errant processes. Unix-Linux 2 fork( ) system call is successful parent suspended child created fork( ) returns child pid to parent fork( ) returns zero value to child; zero is the pid of the swapper/scheduler process both

More information

PKI Applet Desktop Application Uputa za instalaciju programske potpore

PKI Applet Desktop Application Uputa za instalaciju programske potpore 1 SADRŽAJ 1. UVOD 3 2. PODRŽANI OPERATIVNI SUSTAVI 3 3. PROGRAMSKI PREDUVJETI ZA INSTALACIJU PROGRAMSKE POTPORE 3 4. INSTALACIJA PROGRAMSKE POTPORE 3 5. DEINSTALACIJA PROGRAMSKE POTPORE 6 2 1. Uvod PKI

More information

Sveučilište u Zagrebu PMF Matematički odsjek. Mreže računala. Vježbe 08. Zvonimir Bujanović Slaven Kožić Vinko Petričević

Sveučilište u Zagrebu PMF Matematički odsjek. Mreže računala. Vježbe 08. Zvonimir Bujanović Slaven Kožić Vinko Petričević Sveučilište u Zagrebu PMF Matematički odsjek Mreže računala Vježbe 08 Zvonimir Bujanović Slaven Kožić Vinko Petričević Uvod: (X)HTML i CSS Na ovim i idućim vježbama naučit ćemo osnove jezika za opisivanje

More information

Announcement (1) sys.skku.edu is now available

Announcement (1) sys.skku.edu is now available Processes Prof. Jin-Soo Kim( jinsookim@skku.edu) TA JinHong Kim( jinhong.kim@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Announcement (1) sys.skku.edu is now available

More information

Week 2 Intro to the Shell with Fork, Exec, Wait. Sarah Diesburg Operating Systems CS 3430

Week 2 Intro to the Shell with Fork, Exec, Wait. Sarah Diesburg Operating Systems CS 3430 Week 2 Intro to the Shell with Fork, Exec, Wait Sarah Diesburg Operating Systems CS 3430 1 Why is the Shell Important? Shells provide us with a way to interact with the core system Executes programs on

More information

System Programming. Process Control III

System Programming. Process Control III Content : by Dr. B. Boufama School of Computer Science University of Windsor Instructor: Dr. A. Habed adlane@cs.uwindsor.ca http://cs.uwindsor.ca/ adlane/60-256 Content Content 1 Differentiating a process:

More information

Operating systems and concurrency - B03

Operating systems and concurrency - B03 Operating systems and concurrency - B03 David Kendall Northumbria University David Kendall (Northumbria University) Operating systems and concurrency - B03 1 / 15 Introduction This lecture gives a more

More information

Operacijski sustavi. Laboratorijska vježba 3. Petra Lončar, mag. ing. el., asistent FESB, 2016.

Operacijski sustavi. Laboratorijska vježba 3. Petra Lončar, mag. ing. el., asistent FESB, 2016. Operacijski sustavi Laboratorijska vježba 3 Petra Lončar, mag. ing. el., asistent ploncar@fesb.hr FESB, 2016. Višedretvenost svaki proces ima svoj adresni prostor i jednu kontrolnu dretvu ideja višedretvenog

More information

Uputa za instaliranje programske potpore za operativni sustav WINDOWS

Uputa za instaliranje programske potpore za operativni sustav WINDOWS ZABA SignErgy Desktop aplikacija Uputa za instaliranje programske potpore za operativni sustav WINDOWS SADRŽAJ 1. UVOD 3 2. PODRŽANI OPERATIVNI SUSTAVI 3 3. PROGRAMSKI PREDUVJETI ZA INSTALACIJU PROGRAMSKE

More information

System Programming. Process Control II

System Programming. Process Control II Content : by Dr. B. Boufama School of Computer Science University of Windsor Instructor: Dr. A. Habed adlane@cs.uwindsor.ca http://cs.uwindsor.ca/ adlane/60-256 Content Content 1 Terminating a process

More information

PARALELNO PROGRAMIRANJE

PARALELNO PROGRAMIRANJE Predavanje 09 Odjel za matematiku 1 PARALELNO PROGRAMIRANJE POSIX threadovi za C++ Predavanje 09 Odjel za matematiku 2 Programske niti (thread) unutar procesa Danas ćemo se upoznati s POSIX thread bibliotekom

More information

518 Lecture Notes Week 3

518 Lecture Notes Week 3 518 Lecture Notes Week 3 (Sept. 15, 2014) 1/8 518 Lecture Notes Week 3 1 Topics Process management Process creation with fork() Overlaying an existing process with exec Notes on Lab 3 2 Process management

More information

Naredbe za kontrolu toka

Naredbe za kontrolu toka Naredbe za kontrolu toka Naredbe za kontrolu toka Nakon odslušanog bit ćete u stanju: objasniti semantiku naredbi za kontrolu postupaka navesti sintaksu naredbi if, if-else i case u programskom jeziku

More information

Programiranje Programski jezik C. Sadržaj. Datoteke. prof.dr.sc. Ivo Ipšić 2009/2010

Programiranje Programski jezik C. Sadržaj. Datoteke. prof.dr.sc. Ivo Ipšić 2009/2010 Programiranje Programski jezik C prof.dr.sc. Ivo Ipšić 2009/2010 Sadržaj Ulazno-izlazne funkcije Datoteke Formatirane datoteke Funkcije za rad s datotekama Primjeri Datoteke komunikacija između programa

More information

Programiranje III razred

Programiranje III razred Tehnička škola 9. maj Bačka Palanka Programiranje III razred Naredbe ciklusa for petlja Naredbe ciklusa Veoma često se ukazuje potreba za ponavljanjem nekih naredbi više puta tj. za ponavljanjem nekog

More information

CPSC 341 OS & Networks. Processes. Dr. Yingwu Zhu

CPSC 341 OS & Networks. Processes. Dr. Yingwu Zhu CPSC 341 OS & Networks Processes Dr. Yingwu Zhu Process Concept Process a program in execution What is not a process? -- program on a disk A process is an active object, but a program is just a file It

More information

Q & A (1) Where were string literals stored? Virtual Address. SSE2033: System Software Experiment 2 Spring 2016 Jin-Soo Kim

Q & A (1) Where were string literals stored? Virtual Address. SSE2033: System Software Experiment 2 Spring 2016 Jin-Soo Kim Processes Prof. Jin-Soo Kim(jinsookim@skku.edu) TA - Dong-Yun Lee (dylee@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Q & A (1) Where were string literals stored?

More information

Unix Processes. What is a Process?

Unix Processes. What is a Process? Unix Processes Process -- program in execution shell spawns a process for each command and terminates it when the command completes Many processes all multiplexed to a single processor (or a small number

More information

Processes. CS3026 Operating Systems Lecture 05

Processes. CS3026 Operating Systems Lecture 05 Processes CS3026 Operating Systems Lecture 05 Dispatcher Admit Ready Queue Dispatch Processor Release Timeout or Yield Event Occurs Blocked Queue Event Wait Implementation: Using one Ready and one Blocked

More information

VB komande. Programiranje 1

VB komande. Programiranje 1 VB komande Programiranje 1 Zadatak 1: Sastaviti program koji se sastoji iz jedne ListBox kontrole, jedne Textbox kontrole i dva komandna dugmeta. Klikom na prvo komandno dugme umeće se u ListBox sadržaj

More information

CS 201. Processes. Gerson Robboy Portland State University

CS 201. Processes. Gerson Robboy Portland State University CS 201 Processes Gerson Robboy Portland State University Review Definition: A process is an instance of a running program. One of the most fundamental concepts in computer science. Not the same as program

More information

Fall 2015 COMP Operating Systems. Lab #3

Fall 2015 COMP Operating Systems. Lab #3 Fall 2015 COMP 3511 Operating Systems Lab #3 Outline n Operating System Debugging, Generation and System Boot n Review Questions n Process Control n UNIX fork() and Examples on fork() n exec family: execute

More information

Operating Systems. Lecture 05

Operating Systems. Lecture 05 Operating Systems Lecture 05 http://web.uettaxila.edu.pk/cms/sp2013/seosbs/ February 25, 2013 Process Scheduling, System Calls Execution (Fork,Wait,Exit,Exec), Inter- Process Communication Schedulers Long

More information

CS240: Programming in C

CS240: Programming in C CS240: Programming in C Lecture 17: Processes, Pipes, and Signals Cristina Nita-Rotaru Lecture 17/ Fall 2013 1 Processes in UNIX UNIX identifies processes via a unique Process ID Each process also knows

More information

Processes. CSE 351 Autumn Instructor: Justin Hsia

Processes. CSE 351 Autumn Instructor: Justin Hsia Processes CSE 351 Autumn 2016 Instructor: Justin Hsia Teaching Assistants: Chris Ma Hunter Zahn John Kaltenbach Kevin Bi Sachin Mehta Suraj Bhat Thomas Neuman Waylon Huang Xi Liu Yufang Sun https://xkcd.com/627/

More information

Izrada VI laboratorijske vježbe

Izrada VI laboratorijske vježbe Izrada VI laboratorijske vježbe 1. Programirati proceduru koja se aktivira sa Standard palete alatki klikom na button Fajlovi. Prilikom startovanja procedure prikazuje se forma koja sadrži jedan list box

More information

Operating System Labs. Yuanbin Wu

Operating System Labs. Yuanbin Wu Operating System Labs Yuanbin Wu cs@ecnu Anouncement Project 1 due 21:00 Oct. 4th FTP In campus: direct connection Out of campus: VPN Windows: cmd \\222.204.249.4:5010 Linux: ftp 222.204.249.4 5010 Operating

More information

Processes. CSE 351 Autumn Instructor: Justin Hsia

Processes. CSE 351 Autumn Instructor: Justin Hsia Processes CSE 351 Autumn 2017 Instructor: Justin Hsia Teaching Assistants: Lucas Wotton Michael Zhang Parker DeWilde Ryan Wong Sam Gehman Sam Wolfson Savanna Yee Vinny Palaniappan http://xkcd.com/292/

More information

Uputa: Zabranjeno je koristiti bilo kakva pomagala. Rje²enja pi²ete desno od zadatka. Predajete samo ovaj list.

Uputa: Zabranjeno je koristiti bilo kakva pomagala. Rje²enja pi²ete desno od zadatka. Predajete samo ovaj list. Ime i prezime: Asistent: Predava : Programiranje (C) 1. kolokvij 14. 4. 2003. 1. 2. 3. 4. 5. 6. 7. Uputa: Zabranjeno je koristiti bilo kakva pomagala. Rje²enja pi²ete desno od zadatka. Predajete samo ovaj

More information

Processes. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Processes. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University Processes Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Processes An instance of a program in execution. One of the most profound ideas in computer

More information

Processes: Introduction. CS 241 February 13, 2012

Processes: Introduction. CS 241 February 13, 2012 Processes: Introduction CS 241 February 13, 2012 1 Announcements MP2 due tomorrow Deadline and contest cutoff 11:59 p.m. Fabulous prizes on Wednesday MP3 out Wednesday: Shell (1 week) Code from this lecture

More information

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 20

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 20 CS24: INTRODUCTION TO COMPUTING SYSTEMS Spring 2018 Lecture 20 LAST TIME: UNIX PROCESS MODEL Began covering the UNIX process model and API Information associated with each process: A PID (process ID) to

More information

UPUTSTVO ZA KORIŠĆENJE NOVOG SPINTER WEBMAIL-a

UPUTSTVO ZA KORIŠĆENJE NOVOG SPINTER WEBMAIL-a UPUTSTVO ZA KORIŠĆENJE NOVOG SPINTER WEBMAIL-a Webmail sistem ima podršku za SSL (HTTPS). Korištenjem ovog protokola sva komunikacija između Webmail sistema i vašeg Web čitača je kriptovana. Prilikom pristupa

More information

Učitati cio broj n i štampati njegovu recipročnu vrijednost. Ako je učitan broj 0, štampati 1/0.

Učitati cio broj n i štampati njegovu recipročnu vrijednost. Ako je učitan broj 0, štampati 1/0. Kontrolne naredbe Primjeri: Opšti oblik razgranate strukture (if sa ) if (uslov) Naredba 1 ili blok naredbi1 Naredba 2 ili blok naredbi2 Učitati broj x i štampati vrijednost double x, z; Scanner in=new

More information

Process Management! Goals of this Lecture!

Process Management! Goals of this Lecture! Process Management! 1 Goals of this Lecture! Help you learn about:" Creating new processes" Programmatically redirecting stdin, stdout, and stderr" (Appendix) communication between processes via pipes"

More information

UNIVERZITET U BEOGRADU ELEKTROTEHNIČKI FAKULTET

UNIVERZITET U BEOGRADU ELEKTROTEHNIČKI FAKULTET UNIVERZITET U BEOGRADU ELEKTROTEHNIČKI FAKULTET Katedra za elektroniku Računarska elektronika Grupa br. 11 Projekat br. 8 Studenti: Stefan Vukašinović 466/2013 Jelena Urošević 99/2013 Tekst projekta :

More information

PROCESS PROGRAMMING INTERFACE

PROCESS PROGRAMMING INTERFACE Reading Reference: Textbook 1 Chapter 3 Molay Reference Text: Chapter 8 PROCESS PROGRAMMING INTERFACE Tanzir Ahmed CSCE 313 FALL 2018 Theme of Today s Lecture Talk a bit about Unix Shell Introduce some

More information

Sberbank Business Online na Mozilla FireFox

Sberbank Business Online na Mozilla FireFox Sberbank Business Online na Mozilla FireFox Verzija 1.6 Srpanj 2016. Sberbank d.d. Stranica 1 SADRŽAJ 1 INSTALACIJA... 2 2 POKRETANJE MOZILLE FIREFOX... 3 2.1 IMPORT SECURITY MODULA... 4 2.2 AUTOMATSKI

More information

CSS CSS. selector { property: value; } 3/20/2018. CSS: Cascading Style Sheets

CSS CSS. selector { property: value; } 3/20/2018. CSS: Cascading Style Sheets CSS CSS CSS: Cascading Style Sheets - Opisuje izgled (appearance) i raspored (layout) stranice - Sastoji se od CSS pravila, koji defini[u skup stilova selector { property: value; 1 Font face: font-family

More information

Reading Assignment 4. n Chapter 4 Threads, due 2/7. 1/31/13 CSE325 - Processes 1

Reading Assignment 4. n Chapter 4 Threads, due 2/7. 1/31/13 CSE325 - Processes 1 Reading Assignment 4 Chapter 4 Threads, due 2/7 1/31/13 CSE325 - Processes 1 What s Next? 1. Process Concept 2. Process Manager Responsibilities 3. Operations on Processes 4. Process Scheduling 5. Cooperating

More information

CSC209H Lecture 6. Dan Zingaro. February 11, 2015

CSC209H Lecture 6. Dan Zingaro. February 11, 2015 CSC209H Lecture 6 Dan Zingaro February 11, 2015 Zombie Children (Kerrisk 26.2) As with every other process, a child process terminates with an exit status This exit status is often of interest to the parent

More information

Lesson 2. process id = 1000 text data i = 5 pid = 1200

Lesson 2. process id = 1000 text data i = 5 pid = 1200 Lesson 2 fork: create a new process. The new process (child process) is almost an exact copy of the calling process (parent process). In this method we create an hierarchy structure for the processes,

More information

Are branches/calls the only way we can get the processor to go somewhere in a program? What is a program? A processor? A process?

Are branches/calls the only way we can get the processor to go somewhere in a program? What is a program? A processor? A process? Processes and control flow Are branches/calls the only way we can get the processor to go somewhere in a program? What is a program? A processor? A process? 1 Control Flow Processors do only one thing:

More information

pojedinačnom elementu niza se pristupa imeniza[indeks] indeks od 0 do n-1

pojedinačnom elementu niza se pristupa imeniza[indeks] indeks od 0 do n-1 NIZOVI Niz deklarišemo navođenjemtipa elemenata za kojim sledi par srednjih zagrada[] i naziv niza. Ako je niz višedimenzionalni između zagrada[] se navode zarezi, čiji je broj za jedan manji od dimenzija

More information

Uvod u programiranje - vežbe. Kontrola toka izvršavanja programa

Uvod u programiranje - vežbe. Kontrola toka izvršavanja programa Uvod u programiranje - vežbe Kontrola toka izvršavanja programa Naredbe za kontrolu toka if, if-else, switch uslovni operator (?:) for, while, do-while break, continue, return if if (uslov) naredba; if

More information

Programs. Program: Set of commands stored in a file Stored on disk Starting a program creates a process static Process: Program loaded in RAM dynamic

Programs. Program: Set of commands stored in a file Stored on disk Starting a program creates a process static Process: Program loaded in RAM dynamic Programs Program: Set of commands stored in a file Stored on disk Starting a program creates a process static Process: Program loaded in RAM dynamic Types of Processes 1. User process: Process started

More information

Processes & Signals. System Runs Many Processes Concurrently. State consists of memory image + register values + program counter

Processes & Signals. System Runs Many Processes Concurrently. State consists of memory image + register values + program counter Processes & Signals Topics Process Hierarchy Shells Signals The World of Multitasking System Runs Many Processes Concurrently Process: executing program State consists of memory image + register values

More information

Processes. slide 1 kv, gm. Silberschatz chapter 3

Processes. slide 1 kv, gm. Silberschatz chapter 3 Processes slide 1 Silberschatz chapter 3 Process concepts slide 2 definition of a process (sometimes called a Task) aprogram in execution an executable file + some kind of dynamic data managed by the OS

More information

Processes. Operating System CS 217. Supports virtual machines. Provides services: User Process. User Process. OS Kernel. Hardware

Processes. Operating System CS 217. Supports virtual machines. Provides services: User Process. User Process. OS Kernel. Hardware es CS 217 Operating System Supports virtual machines Promises each process the illusion of having whole machine to itself Provides services: Protection Scheduling Memory management File systems Synchronization

More information

University of Washington What is a process?

University of Washington What is a process? What is a process? What is a program? A processor? A process? 1 What is a process? Why are we learning about processes? Processes are another abstrac'on in our computer system the process abstrac9on provides

More information

Process concepts. Processes. Process in Memory. Process Creation. definition of a process (sometimes called a Task) aprogram in execution

Process concepts. Processes. Process in Memory. Process Creation. definition of a process (sometimes called a Task) aprogram in execution Processes slide 1 Process concepts slide 2 Silberschatz chapter 3 definition of a process (sometimes called a Task) aprogram in execution an executable file + some kind of dynamic data managed by the OS

More information

Processes. Overview. Processes. Process Creation. Process Creation fork() Processes. CPU scheduling. Pål Halvorsen 21/9-2005

Processes. Overview. Processes. Process Creation. Process Creation fork() Processes. CPU scheduling. Pål Halvorsen 21/9-2005 INF060: Introduction to Operating Systems and Data Communication Operating Systems: Processes & CPU Pål Halvorsen /9-005 Overview Processes primitives for creation and termination states context switches

More information

CSC209 Fall Karen Reid 1

CSC209 Fall Karen Reid 1 ' & ) ) #$ "! How user programs interact with the Operating System. Somehow we need to convert a program into machine code (object code). A compiler passes over a whole program before translating it into

More information

Today. Introduction to Computer Systems /18 243, Fall th Lecture. Control Flow. Altering the Control Flow.

Today. Introduction to Computer Systems /18 243, Fall th Lecture. Control Flow. Altering the Control Flow. Today Introduction to Computer Systems 15 213/18 243, Fall 2009 11 th Lecture Exceptional Control Flow Processes Instructors: Greg Ganger and Roger Dannenberg Control Flow Processors do only one thing:

More information

Processes & Threads. Today. Next Time. ! Process concept! Process model! Implementing processes! Multiprocessing once again. ! More of the same J

Processes & Threads. Today. Next Time. ! Process concept! Process model! Implementing processes! Multiprocessing once again. ! More of the same J Processes & Threads Today! Process concept! Process model! Implementing processes! Multiprocessing once again Next Time! More of the same J The process model! Most computers can do more than one thing

More information

Carnegie Mellon. Processes. Lecture 12, May 19 th Alexandre David. Credits to Randy Bryant & Dave O Hallaron from Carnegie Mellon

Carnegie Mellon. Processes. Lecture 12, May 19 th Alexandre David. Credits to Randy Bryant & Dave O Hallaron from Carnegie Mellon Processes Lecture 12, May 19 th 2011. Alexandre David Credits to Randy Bryant & Dave O Hallaron from Carnegie Mellon 1 Processes Defini=on: A process is an instance of a running program. One of the most

More information

Process Management 1

Process Management 1 Process Management 1 Goals of this Lecture Help you learn about: Creating new processes Programmatically redirecting stdin, stdout, and stderr (Appendix) communication between processes via pipes Why?

More information

Introduction to OS Processes in Unix, Linux, and Windows MOS 2.1 Mahmoud El-Gayyar

Introduction to OS Processes in Unix, Linux, and Windows MOS 2.1 Mahmoud El-Gayyar Introduction to OS Processes in Unix, Linux, and Windows MOS 2.1 Mahmoud El-Gayyar elgayyar@ci.suez.edu.eg Mahmoud El-Gayyar / Introduction to OS 1 Processes in Unix, Linux, and Windows Unix pre-empted

More information

Osnove programskog jezika C# Čas 5. Delegati, događaji i interfejsi

Osnove programskog jezika C# Čas 5. Delegati, događaji i interfejsi Osnove programskog jezika C# Čas 5. Delegati, događaji i interfejsi DELEGATI Bezbedni pokazivači na funkcije Jer garantuju vrednost deklarisanog tipa. Prevodilac prijavljuje grešku ako pokušate da povežete

More information

Exceptional Control Flow Part II Nov. 2, 2009"

Exceptional Control Flow Part II Nov. 2, 2009 Exceptional Control Flow Part II Nov. 2, 2009" Unix Startup: Step 2" [0] /etc/inittab Daemons" e.g. ftpd, httpd" init [1] getty init forks and execs daemons per /etc/ inittab, and forks and execs a getty

More information

VHDLPrimeri Poglavlje5.doc

VHDLPrimeri Poglavlje5.doc 5. VHDL opis kola koja obavljaju osnovne aritmetičke funkcije Sabirači Jednobitni potpuni sabirač definisan je tablicom istinitosti iz Tabele 5.1. Tabela 5.1. cin a b sum cout 0 0 0 0 0 0 0 1 1 0 0 1 0

More information

Assignment 1. Teaching Assistant: Michalis Pachilakis (

Assignment 1. Teaching Assistant: Michalis Pachilakis ( Assignment 1 Teaching Assistant: Michalis Pachilakis ( mipach@csd.uoc.gr) System Calls If a process is running a user program in user mode and needs a system service, such as reading data from a file,

More information

b) program deljiv3; uses wincrt; var i:integer; begin i:=3; while i<100 do begin write(i:5); i:=i+3; end; end.

b) program deljiv3; uses wincrt; var i:integer; begin i:=3; while i<100 do begin write(i:5); i:=i+3; end; end. NAREDBA CIKLUSA SA PREDUSLOVOM WHILE 1.Odrediti vrednosti s i p nakon izvrsenja sledecih naredbi za dato a=43, a=34, a=105 program p1; var a,s,p:integer; write('unesite a:');readln(a); p:=a; s:=0; while

More information

Exceptional Control Flow Part I September 22, 2008

Exceptional Control Flow Part I September 22, 2008 15-213 Exceptional Control Flow Part I September 22, 2008 Topics Exceptions Process context switches Creating and destroying processes class11.ppt Control Flow Computers do only one thing: From startup

More information

EXPERIMENT NO : M/C Lenovo Think center M700 Ci3,6100,6th Gen. H81, 4GB RAM,500GB HDD

EXPERIMENT NO : M/C Lenovo Think center M700 Ci3,6100,6th Gen. H81, 4GB RAM,500GB HDD GROUP - C EXPERIMENT NO : 12 1. Title: Implement UNIX system calls like ps, fork, join, exec family, and wait for process management (use shell script/ Java/ C programming) 2. Objectives : - To understand

More information

Signals. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Signals. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University Signals Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Multitasking (1) Programmer s model of multitasking fork() spawns new process Called once,

More information

IC221: Systems Programming 12-Week Written Exam [SOLUTIONS]

IC221: Systems Programming 12-Week Written Exam [SOLUTIONS] IC221: Systems Programming 12-Week Written Exam [SOLUTIONS] April 2, 2014 Answer the questions in the spaces provided on the question sheets. If you run out of room for an answer, continue on the back

More information

Process management. What s in a process? What is a process? The OS s process namespace. A process s address space (idealized)

Process management. What s in a process? What is a process? The OS s process namespace. A process s address space (idealized) Process management CSE 451: Operating Systems Spring 2012 Module 4 Processes Ed Lazowska lazowska@cs.washington.edu Allen Center 570 This module begins a series of topics on processes, threads, and synchronization

More information

CSE 451: Operating Systems Winter Module 4 Processes. Mark Zbikowski Allen Center 476

CSE 451: Operating Systems Winter Module 4 Processes. Mark Zbikowski Allen Center 476 CSE 451: Operating Systems Winter 2015 Module 4 Processes Mark Zbikowski mzbik@cs.washington.edu Allen Center 476 2013 Gribble, Lazowska, Levy, Zahorjan Process management This module begins a series of

More information

Informatika Uvod u C#,.NET Framework i Visual Studio... nastavak...

Informatika Uvod u C#,.NET Framework i Visual Studio... nastavak... Informatika Uvod u C#,.NET Framework i Visual Studio... nastavak... Prof. dr. sc. Tomislav Pribanić Izv. prof. dr. sc. Vedran Podobnik Doc. dr. sc. Marija Seder Sveučilište u Zagrebu Fakultet elektrotehnike

More information

Altering the Control Flow

Altering the Control Flow Altering the Control Flow Up to Now: two mechanisms for changing control flow: Jumps and branches Call and return using the stack discipline. Both react to changes in program state. Insufficient for a

More information

Processes. System tasks Campus-Booster ID : **XXXXX. Copyright SUPINFO. All rights reserved

Processes. System tasks Campus-Booster ID : **XXXXX.  Copyright SUPINFO. All rights reserved Processes System tasks Campus-Booster ID : **XXXXX www.supinfo.com Copyright SUPINFO. All rights reserved Processes Your trainer Presenter s Name Title: **Enter title or job role. Accomplishments: **What

More information

PREDMET. Osnove Java Programiranja. Čas JAVADOC

PREDMET. Osnove Java Programiranja. Čas JAVADOC PREDMET Osnove Java Programiranja JAVADOC Copyright 2010 UNIVERZITET METROPOLITAN, Beograd. Sva prava zadržana. Bez prethodne pismene dozvole od strane Univerziteta METROPOLITAN zabranjena je reprodukcija,

More information

CITS2002 Systems Programming. Creating a new process using fork() 1 next CITS2002 CITS2002 schedule

CITS2002 Systems Programming. Creating a new process using fork() 1 next CITS2002 CITS2002 schedule 1 next CITS2002 CITS2002 schedule Creating a new process using fork() fork() is very unusual because it returns different values in the (existing) parent process, and the (new) child process: the value

More information

CS 350 : COMPUTER SYSTEM CONCEPTS SAMPLE TEST 2 (OPERATING SYSTEMS PART) Student s Name: MAXIMUM MARK: 100 Time allowed: 70 minutes

CS 350 : COMPUTER SYSTEM CONCEPTS SAMPLE TEST 2 (OPERATING SYSTEMS PART) Student s Name: MAXIMUM MARK: 100 Time allowed: 70 minutes CS 350 : COMPUTER SYSTEM CONCEPTS SAMPLE TEST 2 (OPERATING SYSTEMS PART) Student s Name: MAXIMUM MARK: 100 Time allowed: 70 minutes Q1 (30 marks) NOTE: Unless otherwise stated, the questions are with reference

More information

SOFTWARE ARCHITECTURE 3. SHELL

SOFTWARE ARCHITECTURE 3. SHELL 1 SOFTWARE ARCHITECTURE 3. SHELL Tatsuya Hagino hagino@sfc.keio.ac.jp slides URL https://vu5.sfc.keio.ac.jp/sa/login.php 2 Software Layer Application Shell Library MIddleware Shell Operating System Hardware

More information

SVEUČILIŠTE U MOSTARU FAKULTET PRIRODOSLOVNO-MATEMATIČKIH I ODGOJNIH ZNANOSTI BAZE PODATAKA 2. Doc.dr.sc. GORAN KRALJEVIĆ BAZE PODATAKA 2 1

SVEUČILIŠTE U MOSTARU FAKULTET PRIRODOSLOVNO-MATEMATIČKIH I ODGOJNIH ZNANOSTI BAZE PODATAKA 2. Doc.dr.sc. GORAN KRALJEVIĆ BAZE PODATAKA 2 1 SVEUČILIŠTE U MOSTARU FAKULTET PRIRODOSLOVNO-MATEMATIČKIH I ODGOJNIH ZNANOSTI BAZE PODATAKA 2 Doc.dr.sc. GORAN KRALJEVIĆ BAZE PODATAKA 2 1 Baze podataka 2 Web: http://www.fpmoz.ba/gkraljevic Pitanja, primjedbe,

More information

Processes & Threads. (Chapter 3) CS 4410 Operating Systems. [R. Agarwal, L. Alvisi, A. Bracy, M. George, E. Sirer, R. Van Renesse]

Processes & Threads. (Chapter 3) CS 4410 Operating Systems. [R. Agarwal, L. Alvisi, A. Bracy, M. George, E. Sirer, R. Van Renesse] Processes & Threads (Chapter 3) CS 4410 Operating Systems [R. Agarwal, L. Alvisi, A. Bracy, M. George, E. Sirer, R. Van Renesse] Processes! 2 What is a Program? Program is a file containing: executable

More information

Exceptional Control Flow Part I

Exceptional Control Flow Part I Exceptional Control Flow Part I Today! Exceptions! Process context switches! Creating and destroying processes Next time! Signals, non-local jumps, Fabián E. Bustamante, 2007 Control flow! Computers do

More information

Processes. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Processes. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University Processes Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu OS Internals User space shell ls trap shell ps Kernel space File System Management I/O

More information

Processes, Exceptional

Processes, Exceptional CIS330, Week 9 Processes, Exceptional Control Flow CSAPPe2, Chapter 8 Control Flow Computers do Only One Thing o From startup to shutdown, a CPU simply reads and executes (interprets) a sequence of instructions,

More information

Računarske osnove Interneta (SI3ROI, IR4ROI)

Računarske osnove Interneta (SI3ROI, IR4ROI) Računarske osnove terneta (SI3ROI, IR4ROI) Vežbe MPLS Predavač: 08.11.2011. Dražen Drašković, drazen.draskovic@etf.rs Autori: Dražen Drašković Naučili ste na predavanjima MPLS (Multi-Protocol Label Switching)

More information

Processes. Today. Next Time. ! Process concept! Process model! Implementing processes! Multiprocessing once again. ! Scheduling processes

Processes. Today. Next Time. ! Process concept! Process model! Implementing processes! Multiprocessing once again. ! Scheduling processes Processes Today! Process concept! Process model! Implementing processes! Multiprocessing once again Next Time! Scheduling processes The process model! Most computers can do more than one thing at a time

More information

Most of the work is done in the context of the process rather than handled separately by the kernel

Most of the work is done in the context of the process rather than handled separately by the kernel Process Control Process Abstraction for a running program Manages program s use of memory, cpu time, and i/o resources Most of the work is done in the context of the process rather than handled separately

More information

CSE 410: Computer Systems Spring Processes. John Zahorjan Allen Center 534

CSE 410: Computer Systems Spring Processes. John Zahorjan Allen Center 534 CSE 410: Computer Systems Spring 2018 Processes John Zahorjan zahorjan@cs.washington.edu Allen Center 534 1. What is a process? Processes 2. What's the process namespace? 3. How are processes represented

More information

Operating System Structure

Operating System Structure Operating System Structure CSCI 4061 Introduction to Operating Systems Applications Instructor: Abhishek Chandra Operating System Hardware 2 Questions Operating System Structure How does the OS manage

More information

Altering the Control Flow

Altering the Control Flow Altering the Control Flow Up to Now: two mechanisms for changing control flow: Jumps and branches Call and return using the stack discipline. Both react to changes in program state. Insufficient for a

More information

Programming Assignment #1: A Simple Shell

Programming Assignment #1: A Simple Shell Programming Assignment #1: A Simple Shell Due: Check My Courses In this assignment you are required to create a C program that implements a shell interface that accepts user commands and executes each

More information

CS3733: Operating Systems

CS3733: Operating Systems Outline CS3733: Operating Systems Topics: Programs and Processes (SGG 3.1-3.2; USP 2) Programs and Processes States of a process and transitions PCB: Process Control Block Process (program image) in memory

More information

PROCESS MANAGEMENT. Operating Systems 2015 Spring by Euiseong Seo

PROCESS MANAGEMENT. Operating Systems 2015 Spring by Euiseong Seo PROCESS MANAGEMENT Operating Systems 2015 Spring by Euiseong Seo Today s Topics Process Concept Process Scheduling Operations on Processes Interprocess Communication Examples of IPC Systems Communication

More information

Exceptional Control Flow Part I

Exceptional Control Flow Part I Exceptional Control Flow Part I Today Exceptions Process context switches Creating and destroying processes Next time Signals, non-local jumps, Chris Riesbeck, Fall 2011 Original: Fabian Bustamante Control

More information

Programska podrška

Programska podrška Programska podrška Sadržaj operativni sustav (OS) pojmovi komponente os-a tipovi os-a datotečni sustav organizacija podataka Stranica 2/53 Operativni sustav Operativni sustav je svojevrsna baza na kojoj

More information

CS 550 Operating Systems Spring Process III

CS 550 Operating Systems Spring Process III CS 550 Operating Systems Spring 2018 Process III 1 Recap: Memory Layout of a typical process MAX Stack Function Call Arguments, Return Address, Return Values Gap Heap Data Dynamically allocated memory

More information

Binarne hrpe. Strukture podataka i algoritmi VJEŽBE 26. siječnja / 133

Binarne hrpe. Strukture podataka i algoritmi VJEŽBE 26. siječnja / 133 Binarne hrpe Potpuno binarno stablo binarno stablo u kojem svaki čvor koji nije list ima točno 2 nasljednika. Binarna hrpa potpuno binarno stablo u kojem svaki čvor koji nije list ima veću ključnu vrijednost

More information

INF1060: Introduction to Operating Systems and Data Communication. Pål Halvorsen. Wednesday, September 29, 2010

INF1060: Introduction to Operating Systems and Data Communication. Pål Halvorsen. Wednesday, September 29, 2010 INF1060: Introduction to Operating Systems and Data Communication Pål Halvorsen Wednesday, September 29, 2010 Overview Processes primitives for creation and termination states context switches processes

More information

Unix Processes 1 / 31

Unix Processes 1 / 31 Unix Processes 1/31 A Unix Process Instance of a program in execution. OS loads the executable in main-memory (core) and starts execution by accessing the first command. Each process has a unique identifier,

More information