Monday, July 18, 2011

INTRODUCTION TO CONTROL INPUT / OUTPUT

Definitions and Requirements for Control I / O A control system I / O aims to provide assistance to users to enable them to access files, regardless of the details of the characteristics and storage time. Control I / O related to file management and management tools that are part of the operating system. The task of the Control System I / O is: 1) Maintaining a directory of files and location information 2) Determine the path for the flow of data between main memory and secondary storage devices 3) Coordinate komunimasi between the CPU and secondary storage devices 4) Prepare a file using the input or output has been completed
Channel On most computer systems, the CPU is not burdened handle tasks associated with the I / O. But the responsibility for control of equipment delivered to the processor I / O, known as the channel I / O (I / O channels). Channel I / O processor itself is programmed. The programs in this so-called channel-execute the program. This program determines the operating channel, which is required for equipment access and control the data path (data pathway).
Types of Channel 1. Channel selector; Can regulate the flow of data between main memory with a piece of equipment at that time. Since the channel is a fast processors then the channel selector normally only use I / O device with high speed, like a disk. Use of equipment with low speeds, eg card reader. 2. Multiplexor Channel; Can regulate the flow of data between main memory with some equipment. Multiplexor channel is more effective when using equipment with low speeds, as compared with channel selector. With the multiplexor channel, some equipment can be activated simultaneously, but the channels must complete the channel program for the equipment before starting the other program channels. 3. Block Multiplexor Channel; Regulate the flow of data to various devices. Block Multiplexor Channel can execute one instruction of the program channels to one device, can then transfer instructions from the channel program to other equipment.
Miscellaneous Device 1. Dedicated Device; Used for access by one person at any time. Example: Terminal. 2. Shared Device; Used for access by multiple users simultaneously. Example: Disk.
Activity I / O to shared devices is very complex compared to the activity I / O on a dedicated device. Two very important function of the shared device is the allocation of places and the provision of timely access. Channel Activity The purpose of the channel I / O is as an intermediary between the CPU, main memory with a storage controller unit. CPU communicates with the channel through a few simple commands. Some channels will give the command: Test I / O, to determine whether the pathway (pathway) that led to the equipment is busy. Start I / O, on certain equipment. Halt I / O, on certain equipment. Channel typically communicates with the CPU through an interrupt. Interruptions will occur, if the error condition is detected, such as CPU instructions are incorrect or if the activity I / O has been terminated. If an interrupt occurs, control will be forked through regularly interrupt handler (interrupt-handler routine), where the control will determine the cause of the interruption, doing the right activities, then return control to the caller (caller).
Buffer Management Divided into four types of management are: 1. Single Buffering; 2. Anticipatory Buffering; 3. Double Buffering; 4. Three Buffers; 1. Single Buffering;


The picture above shows the structure of the data from the buffer in the form of a simple, consisting of one record per block and one buffer per file, where it serves to fill the request buffer of a program. This buffer structure contains a pointer to the start address & channel program to the file. The basic structure of the channel program to fill the buffer is: Wait for instructions from the program READ Inform instruction start I / O to the control unit Wait until the buffer is emptied Inform interruptions in the program so it can start reading from the buffer The problem that arises here is the user program at the time idle waiting for the buffer filled.
2. Anticipatory Buffering; Another approach that can eliminate some things that might be to wait for the CPU is using Anticipatory Buffering. With the anticipatory buffering, the control system I / O will try to put the needs of the program data. Endeavored that the buffer is always full. Channel always test this flag. If the buffer is near empty, because the user program has to read its contents then the flag will be reset and channel programs will menginitates replenishment buffer. The structure of the channel program to fill a buffer with anticipatory buffer is shown in the figure below:

3. Double Buffering; To reduce the possibility of waiting for the program, then the double buffer can be used. Two of the buffers that exist, only one set for the file. The basic idea of ​​double buffering is if the consumer emptied one buffer, then the producer can fill into the buffer to another, when the first buffer is empty, then the second buffer must be fully charged. Then the consumer can mengkosongkan a second buffer, when the first producer to fill buffers, and so on.

4. Three Buffers;
pfill: which indicates the next buffer will be filled or being filled pempty: which indicates the next buffer will be emptied or being emptied

Murottal Al.Quran Ash-Shaykh Ali ibn Abd al-Hudaify

Click the Name Letter, please:

     Al-Fatihah
     Al-Baqarah
     Ali Imran
     An-Nisaa '
     Al-Maidah
     Al-An'am
     Al-A'raaf
     Al-Anfal
     At-Tauba
     Jonah
     Hud
     Joseph
     Ar-Raad
     Ibrahim
     Al-Hijr
     An-Nahl
     Al-Israa '
     Al-Kahf
     Maryam
     Taha
     Al-Anbiyaa '
     Al-Hajj
     Almu'minun
     An-Nuur
     Al-Furqan
     Ash-Syu'araa
     An-Naml
     Al-Qasas
     Al-Ankabuut
     Ar-Rum
     Luqman
     As-Sajda
     Al-Ahzab
     Saba
     Fatir
     yaa Seen
     Ash-Shaaffaat
     Sad
     Az-Zumar
     Al-Mu'min
     Al-Fushshilat
     Ash-Syuura
     Az-Zukhruf
     Ad-Dukhan
     Al-Jaatsiyah
     Al-Ahqaaf
     Muhammad
     Al-Fath
     Al-Hujurat
     Qaf
     Adh-Dzaariiyaat
     Ath-Thuur
     An-Najm
     Al-Qamar
     Ar-Rahman
     Al-Waqi'ah
     Al-Hadiid
     Al-Mujaadilah
     A l-Hashr
     Al-Mumtahanah
     Ash-Shaf
     Al-jumu'a
     Al-Munaafiqun
     At-Taghaabun
     Ath-Thalaaq
     At-Tahrim
     Al-Mulk
     Al-Qalam
     Al-Haaqah
     Al-Ma'aarij
     Noah
     Al-Jin
     Al-Muzzammil
     Al-Muddatstsir
     Al-Qiyama
     Al-Insan
     Al-Mursalaat
     An-Naba '
     An-Naazi'aat
     Abasa
     At-Takwiir
     Al-Infithaar
     Al-Muthaffifiin
     Al-Insyiqaaq
     Al-Buruuj
     Ath-Thaariq
     Al-A'laa
     Al-Ghaasyiyah
     Al-Fajr
     Al-Balad
     Ash-Shams
     Al-Lail
     Adh-Dhuhaa
     Nature Nasyrah
     The Fig
     Al-'Alaq
     Al-Qadr
     Al-Bayyinah
     Az-Zalzalah
     Al-'Aadiyaat
     Al-Qaari'ah
     Al-Takaatsur
     Al-'Ashr
     Al-Humazah
     A l-Fill
     Quraishi
     Al-Maa'uun
     Al-Kautsar
     Al-Kaafiruun
     An-Nasr
     Al-Lahab
     Al-Ikhlash
     Al-Falaq
     An-Naas

TI highlights STMIK charisma

Kharisma STMIK Falkirk will be holding an event titled "Gebyar IT in 2011" with two events. The first event of the seminar "Doing business through a blog" with speakers from BLOGGER Team Falkirk. The second event is "a race Post Article About Linux".
1. As for the seminar will be held on:

    
Day / Date: Saturday, June 26, 2011
    
Hours: 08.00 till finish
    
Venue: 2nd Floor Campus Kharisma Jl. Struggle base Km.1 By Pass Falkirk
    
Contact: Dendi Prana Yudha (0857 8001 0405) / Rahmat Saifudin (0856 9709 3674)
    
Email: seminarkharisma@yahoo.com
Terms enrollment seminars:

    
Fill out the registration form Click Here
    
via email: seminarkharisma@yahoo.com or come to campus STMIK Kharisma Falkirk.
    
Pay the registration fee for participants:
        
Government and Private Rp 50.000, -
        
Teachers, Lecturers and General 50,000
        
Students and Student Rp 30.000, -
    
Payment by Bank Transfer to Account No. Branch BJB Falkirk with No. 0009977481100 a / n BEM STMIK Kharisma Falkirk
    
Most Slow Registration Date June 23, 2011
Seminar participants get a certificate, Seminar Kit, Snack and Doorprise interesting.
2. Meanwhile for the race event Post Article About linux start after registration.
Terms of race registration:

    
Fill out the registration form Click Here
    
via email: artikelkharisma@yahoo.com or come to campus STMIK Kharisma Falkirk.
    
Pay the registration fee for participants:
        
Only for students and students with the cost pendafaran
        
Rp 50.000, - and 1 free entrance ticket to the seminar.
    
Payment by Bank Transfer to Account No. Branch BJB Falkirk with No: 0009977481100 a / n BEM STMIK Kharisma Falkirk
    
Most Slow Registration Date June 23, 2011
Rule Of Game:

    
Implemented prior to posting articles of date June 23, 2011

    
Registering your blog address to the committee participants

    
If posting the article "copy - paste" (Disqualification)

    
If the posting is done after date June 23 (WILL NOT BE CONSIDERED)

    
Lists the Linux Logo Such charisma On Post

    
Link Download Iso Linux lists Kharisma At Post: http://belajar.internetsehat.org/iso/stmikkharisma/laksana-desktop-i386.iso

11.04 ubuntu update error

maybe my friends have experienced anything like I experienced at the time the update ubuntu with the command sudo apt-get update at the time of completion there is an error writing updates the repository can not be opened or parsed.

Yesterday I also had experienced anything like it, here I want to share how to restore ubuntu 11:04 update to be successful without having to reinstall.

into the terminal: Applications> Accessories> Terminal

then typing the following command:

sudo rm / var / lib / apt / lists / *-vf (hit enter)

still in the terminal, after typing the above command typing this command:

sudo apt-get upgrade (press enter)

sudo apt-get update (hit enter)

yesterday thank God I managed to restore the system updates and error does not happen again.

note:

* when typing the command you are using a display unity can not then change the first to classic view.

create a database in pascal

mmm ...
This one cooperative program that uses the pascal program and enter data into a text input with extension. dat
program is also quite a bit complicated, but for what's wrong with learning materials in the share?
check this sources:
program sales;
uses crt;

 
type

 
data = record

 
no, number: integer;

 
nama_barang: string;

 
price, harga_barang: real;

 
end;

 
var

 
rdata: array [1 .. 100] of the data;

 
filedata: file of data;

 
f: data;

 
number: integer;

 
datacari: string;
procedure title;
begin
writeln ('COOP STUDENTS' KHARISMA KARAWANG "');
writeln ('jl. Pangkal Struggle KM.1 By Pass');
writeln ('KARAWANG');
writeln ('*********************************************** *******************');
writeln;
end;
procedure added;
var
i: integer;
again: char;
begin
clrscr;
title;
writeln ('Enter the additional data');
assign (filedata, 'jual.dat');

 
reset (filedata);

 
seek (filedata, filesize (filedata));

  
write ('Item:');

  
readln (f.nama_barang);

  
write ('price:');

  
readln (f.harga);

  
write ('amount:');

  
readln (f.jumlah);

  
f.harga_barang: = f.harga * f.jumlah;

  
write (filedata, f);

  
close (filedata);
end;
delete procedure;
var
i, j: integer;
nm: string;
begin
assign (filedata, 'jual.dat');

 
reset (filedata);

 
j: = 0;

 
while not eof (filedata) do

  
begin

     
inc (j);

     
read (filedata, rdata [j]);

  
end;

 
writeln ('Enter the name of the item be deleted:');

 
readln (nm);

 
i: = 1;
while (i <= j) and (rdata [i]. nama_barang <> nm) do
inc (i);

  
if nm = rdata [i]. nama_barang then

   
begin

   
dec (j);

    
for i: = i to j do

     
rdata [i]: = rdata [i +1];

     
rewrite (filedata);

     
for i: = 1 to j do

     
write (filedata, rdata [i]);

     
writeln ('Press enter to start the delete');

     
readln;

     
writeln ('S N K S E S');

   
end

   
else

   
writeln ('SORRY data not found');

   
readln;

   
close (filedata);

  
end;
edit_data procedure;
var
i, p: integer;
again: char;
dataedit: string;
begin
assign (filedata, 'jual.dat');
reset (filedata);
writeln ('input the name of the data to be edited [written in small letters]:');
readln (dataedit);
i: = 1;
while not eof (filedata) do
begin
read (filedata, rdata [i]);
begin
if dataedit = rdata [i]. nama_barang then

 
begin

  
p: = filepos (filedata); writeln (p);

  
p: = p-1;

  
seek (filedata, p);

  
writeln ('input surrogate data:');

   
writeln ('no', i: 2);

   
write ('item name:'); read (rdata [p]. nama_barang);

   
write ('price:'); read (rdata [p]. price);

   
write ('number'); read (rdata [p]. number);

   
rdata [p]. harga_barang: = rdata [p]. price * rdata [p]. number;

   
write (filedata, rdata [p]);

 
end;
end;
i: = i +1;
end;
close (filedata);
end;
in_data_barang procedure;
var i: integer;

    
again: char;
begin
i: = 1;
assign (filedata, 'jual.dat');

 
rewrite (filedata);

 
reset (filedata);

 
begin
repeat

 
begin

   
clrscr;

   
title;

   
writeln ('input to lowercase');

   
writeln ('no', i);

   
write ('item name:'); readln (rdata [i]. nama_barang);

   
write ('price:'); readln (rdata [i]. price);

   
write ('number'); readln (rdata [i]. number);

   
rdata [i]. harga_barang: = rdata [i]. price * rdata [i]. number;

   
write (filedata, rdata [i]);

   
writeln;

   
writeln ('want to input the data again [y / t]:');

   
readln (again);

   
i: = i +1;

 
end;

 
until ((again = 't') or (again = 'T'));

 
close (filedata);

 
end;

 
end;
tampil_daftar_barang procedure;
var i: integer;
begin
assign (filedata, 'jual.dat');
reset (filedata);

      
writeln ('LIST OF GOODS IN THE $ 1,000,000');

  
writeln ('=============================================== ==============');

  
writeln ('NO NAME OF STOCK PRICE / S TOTAL');

  
writeln ('=============================================== ==============');
i: = 1;
while not eof (filedata) do
begin

 
read (filedata, rdata [i]);

 
if (rdata [i]. price)> = 1000000 then

    
begin

  
write (i);

  
write ('', rdata [i]. nama_barang: 10);

  
write ('', rdata [i]. price: 10:0);

  
write ('', rdata [i]. number: 2);

  
writeln;

 
i: = i +1;

 
end;

 
end; writeln;

 
end;
cetak_daftar_barang procedure;
var i, select: integer;

    
total: real;
begin
repeat
clrscr;
assign (filedata, 'jual.dat');
reset (filedata);

 
total: = 0;

 
begin
title;
writeln ('LIST SALES');
writeln ('=============================================== ===========================');
writeln ('NO NAME OF STOCK PRICE / S TOTAL PRICE OF GOODS');
writeln ('=============================================== ===========================');
i: = 1;
while not eof (filedata) do

 
begin

 
read (filedata, rdata [i]);

  
write (i);

  
write ('', rdata [i]. nama_barang: 10);

  
write ('', rdata [i]. price: 10:0);

  
write ('', rdata [i]. number: 2);

  
write ('', rdata [i]. harga_barang: 8:0);

  
writeln;

  
total: = total + rdata [i]. harga_barang;

  
i: = i +1;

 
end;
writeln ('----------------------------------------------- ----------------------');
writeln ('TOTAL SALES;', Total: 3:0);
writeln;
writeln;
tampil_daftar_barang;
end;
writeln ('- Choice --');
writeln ('**************************');
writeln ('1. Add sales data ');
writeln ('2. Remove the sales data ');
writeln ('3. Edit the sales data ');
writeln ('4. Go to the Main MENU ');
writeln ('**************************');
readln (choice);
case select of

 
1: add;

 
2: delete;

 
3: edit_data;

 
end;

 
until (select = 4);
end;
search procedure;
var
i, number: integer;
match, name: string;
price, harga_barang: real;
begin

 
assign (filedata, 'jual.dat');

 
reset (filedata);

  
match: = datacari;

   
begin

   
i: = 1;

   
while not eof (filedata) do

    
begin

    
read (filedata, rdata [i]);

    
if matches = rdata [i]. nama_barang then

     
begin

     
name: = rdata [i]. nama_barang;

     
Price: = rdata [i]. price;

     
number: = rdata [i]. number;

     
harga_barang: = rdata [i]. harga_barang;

    
end;

     
end;

     
i: = i +1;

     
end;
if (name ='') then

 
begin

  
writeln ('SORRY NO DATA AVAILABLE ")

  
end

  
else

  
begin

  
title;

  
writeln ('LIST SEARCH');
writeln ('=============================================== =======================');
writeln ('NAME OF GOODS PRICE / S TOTAL PRICE OF GOODS');
writeln ('=============================================== =======================');

  
writeln;

  
Write (name: 10);

  
write (price: 35:0);

  
write (number: 8);

  
write (harga_barang: 12:0);

  
writeln;

  
writeln ('----------------------------------------------- --------------------------');

  
writeln;

  
end;
:=''; name
Price: = 0;
number: = 0;
harga_barang: = 0;
end;
cek_data_barang procedure;
var
again: char;
begin

 
repeat

 
clrscr;
title;
writeln ('Enter the name of the data in search [written in small letters]:');
readln (datacari);
clrscr;
search;
writeln ('Do want to find the data again? [y / t]');
readln (again);
writeln;
until (again = 'T') or (again = 't');
end;
begin
repeat
clrscr;
title;

  
writeln ('- MENU --');

  
writeln ('************************');

  
writeln ('1. IN GOODS DATA ');

  
writeln ('2. CHECK DATA ITEM ');

  
writeln ('3. PRINT LIST OF GOODS ');

  
writeln ('4. E X I T ');

  
writeln ('************************');

  
writeln;
writeln ('Select Transaction Type =');
readln (number);

  
clrscr;
case number of

  
1: in_data_barang;

  
2: cek_data_barang;

  
3: cetak_daftar_barang;
end;
until number = 4;
end.
for my friends who want to program in the form of extensions. textnya fit and in shape. dat
can be downloaded here:
Click Here
Do not Just Copy Paste Continue to Smile, But Let's Learn And try to show creativity.
Information