İşletim Sistemi En Temel Sorusu

garfi

Asistan
Katılım
2 Nisan 2008
Mesajlar
112
Reaksiyon puanı
2
Puanları
0
Sorulan soru gayet mantıklı.hemen geyik yoluna sokulmaya çalışılıyor yada KİLİT deniyor.

biliyorsan paylaş
bilmiyorsan SOR
 
Katılım
31 Aralık 2007
Mesajlar
17,486
Reaksiyon puanı
189
Puanları
243
arkdaşı tatmin edemeyince belki bu işi bizim yerimize geyik yapar dedik de ondan geyiğe bağladık :D (nasıl isterseniz öyle anlayın :D:D)
 

hakan-yesil

Öğrenci
Katılım
27 Haziran 2009
Mesajlar
19
Reaksiyon puanı
0
Puanları
0
Ciddiye alıp cevap veren arkadaşlara teşekkur ederim.Bazı arkadaşların dedigi gibi sorumun cevabını bulmam icin; bootable device 'ların transistorlerine adresleme yapabilmeyi gerektiriyor.1960 lı yıllarda yapılan pc lerdeki gibi mekanik olarak yapılan kodlama sistemlerinin elektronik olarak ve daha once yazılım olmadan nasıl yapılabilcegini bilen olacagini dusunmustum. Konuyu uzatmanın anlamı kalmadı yeterince geyik malzemesi oldu.
Not::Geyik tarafından sürekli tatmin edilenler geyige devam edebilirler onlara geyikle mutluluklar ben artık burada bu konuyla ilgilenmiyorum.
 

engerex

Dekan
Katılım
16 Ağustos 2008
Mesajlar
7,675
Reaksiyon puanı
26
Puanları
228
Bence mümkün ve bunun birkaç yolu olduğunu düşünüyorum. Bir Sabit diski ele alırsak
Birincisi
Harddisk kendi kendine çalışabilecek bir sisteme sahiptir. Markası ve modeli ne olursa olsun belli bir veri alışveriş protokolüne göre üretildiği için komutlar veri alışveriş komutları standarttır. Biz HDD'ye ilgili adresi verir okumasını veya yazmasını isteriz. Oda göreyi gerçekleştirir. Eğer biz bunu bir bilgisayar olmadan yapmak istiyorsak harddiskin kullandığı protokole uygun olarak yazmak istediğimiz veriyi gönderecek devreyi hazırlamamız gereklidir.
İkincisi
Biraz daha derinlere inersek kapılarla daha karmaşık bir devre hazırlamamız gerekecek. Nedeni manyetik kafasının konumunu ve okuma/yazma görevlerini, diskin dönüşünü hangi sektörde hangi silindirde olduğu gibi bilgileri kontrol etmemiz ve yönetmemiz gerekir ki oluşturacağınız devre çok karmaşık olacaktır ve işin içinden çıkılması güçtür.
Üçüncüsü
En ilkel yöntem ise;
Verileri yazmamız için diskimizin yazmak istediğimiz plakası ve manyetik kafası gerekli. Diğer kısımlara ihtiyacımız yok. Birde basit bir elektronik devre hazırlamamız gerekiyor. Bu devrede anahtarımızın üç konumu var. Kapalı, Açık(+,-), Açık(-,+). ("+,-" manyetik kafaya uygulanan akımın yönünü gösteriyor). Son olarak öyle bir mekanik düzenek hazırlamalıyız ki plakamızı döndürerek bir banttan diğer bantta geçiş yapalım. (iki banttaki veri bit oluşturur.) ilgili bantlar geldiğinde anahtarımızı +- veya -+ konumuna alıp verilerimizi yazabiliriz. Bu mekanik düzeneği step motor ile çalıştırmamız daha verimli olacaktır. Sektör bilgileri ledli bir düzenek yardımıyala takip edilebilir.
 

PlainLogic

Profesör
Katılım
15 Ocak 2009
Mesajlar
2,029
Reaksiyon puanı
12
Puanları
218
Ciddiye alıp cevap veren arkadaşlara teşekkur ederim.Bazı arkadaşların dedigi gibi sorumun cevabını bulmam icin; bootable device 'ların transistorlerine adresleme yapabilmeyi gerektiriyor.1960 lı yıllarda yapılan pc lerdeki gibi mekanik olarak yapılan kodlama sistemlerinin elektronik olarak ve daha once yazılım olmadan nasıl yapılabilcegini bilen olacagini dusunmustum. Konuyu uzatmanın anlamı kalmadı yeterince geyik malzemesi oldu.
Not::Geyik tarafından sürekli tatmin edilenler geyige devam edebilirler onlara geyikle mutluluklar ben artık burada bu konuyla ilgilenmiyorum.

Allah'ım şaka gibi yhaa arada gelsin sizin gibiler :D:4:
 

funmaker

Öğrenci
Katılım
30 Mart 2008
Mesajlar
98
Reaksiyon puanı
0
Puanları
0
akşam gerekli cevabı vercektimde dedim sabaha kadar belki tatmin olur öğlen baktım hala burda şimdi kaçtı :4:
 

qKTe

Profesör
Katılım
18 Şubat 2009
Mesajlar
2,243
Reaksiyon puanı
32
Puanları
0
aslında arkadaşın sorduğu soru çok mantıklı ve herhangi bir saçma yönüde yok. kaldı sorunun saçması değil, cevabın saçması olur. neticede kimse tam cevabı veremedi ve dalga konusu etmeninde alemi yoktu...
 

funmaker

Öğrenci
Katılım
30 Mart 2008
Mesajlar
98
Reaksiyon puanı
0
Puanları
0
aslında arkadaşın sorduğu soru çok mantıklı ve herhangi bir saçma yönüde yok. kaldı sorunun saçması değil, cevabın saçması olur. neticede kimse tam cevabı veremedi ve dalga konusu etmeninde alemi yoktu...
ukelalığı ve cevap verirken sıradaki gibi tarzı uslubü böyle alay konusu yapılmasına neden oldu
 

Harzemsah

Öğrenci
Katılım
28 Haziran 2009
Mesajlar
65
Reaksiyon puanı
2
Puanları
0
Uzun zamandır sdn 'yi takip ediyorum, dikkatimi cektigi icin konuyu gordum ve yanıt yazmak için üye oldum. Engerex arkadaşın verdigi en bilimsel ve yakın cevap bence ama asıl yazmak istedigim ise şu:

akşam gerekli cevabı vercektimde dedim sabaha kadar belki tatmin olur öğlen baktım hala burda şimdi kaçtı :4:


Ne cevap verecektin söylede bilelim. Belli ki zeka yaşın kreş düzeyinde ve soruya verebilecek teknik duzeyde cevabın da olmadıgı goruluyor. Muhtemelen verecegin cevap insanlara çamur atmak, küfür etmek ve aklın sıra alay etmekten ibaret olacak. Alay ettiğini sanıyorsun ama alay konusu olan sensin. Soru gayet mantıklı ve herhangi bir ukalalık olmamasına ragmen verilen cevaplara bakıldıgında (fabrikada, git nasa da çalış, kendini einstein sanıyo gibi) ukalagın yanıtlarda oldugu çok bariz. İnsanların cahilliği kabul edilebilir, bilgili olup ukala olması da kabul edilebilir, ancak hem cahil hem ukala olması kabul edilemez.
"Ey! insanoglu öyle bi söz söyleki sözünden ibret alsınlar, söz söylemeyi bilmiyorsan sükut et ki İnsan sansınlar!"
sözü sen ve senin gibiler için söylenmiş olsa gerek. Sdn kaliteli bir forum oldugunu düşünüyorum ve bunun devamı için senin gibi çapulcuları forumda fazla barındırmaması gerekir. Son bi şey daha takıldıgın şey arkadaşın avatarı olmuş bir de. Sözlerimi Einstein 'ın sözleriyle tamamlayım.
"Senin gibilere bir omurilik yetecegi halde şans eseri bir beyne sahip olmuşsunuz"...
 

funmaker

Öğrenci
Katılım
30 Mart 2008
Mesajlar
98
Reaksiyon puanı
0
Puanları
0
Uzun zamandır sdn 'yi takip ediyorum, dikkatimi cektigi icin konuyu gordum ve yanıt yazmak için üye oldum. Engerex arkadaşın verdigi en bilimsel ve yakın cevap bence ama asıl yazmak istedigim ise şu:




Ne cevap verecektin söylede bilelim. Belli ki zeka yaşın kreş düzeyinde ve soruya verebilecek teknik duzeyde cevabın da olmadıgı goruluyor. Muhtemelen verecegin cevap insanlara çamur atmak, küfür etmek ve aklın sıra alay etmekten ibaret olacak. Alay ettiğini sanıyorsun ama alay konusu olan sensin. Soru gayet mantıklı ve herhangi bir ukalalık olmamasına ragmen verilen cevaplara bakıldıgında (fabrikada, git nasa da çalış, kendini einstein sanıyo gibi) ukalagın yanıtlarda oldugu çok bariz. İnsanların cahilliği kabul edilebilir, bilgili olup ukala olması da kabul edilebilir, ancak hem cahil hem ukala olması kabul edilemez.
"Ey! insanoglu öyle bi söz söyleki sözünden ibret alsınlar, söz söylemeyi bilmiyorsan sükut et ki İnsan sansınlar!"
sözü sen ve senin gibiler için söylenmiş olsa gerek. Sdn kaliteli bir forum oldugunu düşünüyorum ve bunun devamı için senin gibi çapulcuları forumda fazla barındırmaması gerekir. Son bi şey daha takıldıgın şey arkadaşın avatarı olmuş bir de. Sözlerimi Einstein 'ın sözleriyle tamamlayım.
"Senin gibilere bir omurilik yetecegi halde şans eseri bir beyne sahip olmuşsunuz"...

Arkadaşım yine mi sensin yeni üye olup durma da anlamayalım sen olduğunu yada arkadaşı ol farketmez.Kimin ne olduğunu bilmeden insanların ne olduğu hakkında yorum yapamazsın özellikle senin gibi bir akıl yapısına sahip olup da milletin beyni hakkında hiç yorum yapamazsın.SENİN GİBİ TİPLER BU FORUMDA BARINAMAZ KAÇARLAR.(SONRA DA YENİ ÜYELİKLERE BAŞVURURLAR)
 

hta1905

Profesör
Katılım
22 Mart 2008
Mesajlar
2,439
Reaksiyon puanı
1
Puanları
218
Ciddiye alıp cevap veren arkadaşlara teşekkur ederim.Bazı arkadaşların dedigi gibi sorumun cevabını bulmam icin; bootable device 'ların transistorlerine adresleme yapabilmeyi gerektiriyor.1960 lı yıllarda yapılan pc lerdeki gibi mekanik olarak yapılan kodlama sistemlerinin elektronik olarak ve daha once yazılım olmadan nasıl yapılabilcegini bilen olacagini dusunmustum. Konuyu uzatmanın anlamı kalmadı yeterince geyik malzemesi oldu.
Not::Geyik tarafından sürekli tatmin edilenler geyige devam edebilirler onlara geyikle mutluluklar ben artık burada bu konuyla ilgilenmiyorum.
Her şeyden önce 1960'larda PC yoktu.Kişisel bilgisayarlar 1985'te piyasaya çıktı.Ve transistör adreslenmez,bellek adreslenir.Eskiden bu işi delikli kartlarla yaparlarmış,ama o kodlar bile makina diliyle yazılıyordu.Yani yazılım olmadan yapılamaz.
Not::Bir yerlerden bir şeyler duyup buraya gelip yazmışsın,sonra cevapları beğenmiyorsun.Sormadan önce biraz araştırma yapsaydın,daha mantıklı sorular üretebilirdin.
 

Harzemsah

Öğrenci
Katılım
28 Haziran 2009
Mesajlar
65
Reaksiyon puanı
2
Puanları
0
Her şeyden önce 1960'larda PC yoktu.Kişisel bilgisayarlar 1985'te piyasaya çıktı.Ve transistör adreslenmez,bellek adreslenir.Eskiden bu işi delikli kartlarla yaparlarmış,ama o kodlar bile makina diliyle yazılıyordu.Yani yazılım olmadan yapılamaz.
Not::Bir yerlerden bir şeyler duyup buraya gelip yazmışsın,sonra cevapları beğenmiyorsun.Sormadan önce biraz araştırma yapsaydın,daha mantıklı sorular üretebilirdin.

Herşeyden önce 1960 larda PC vardı. Ticari amaçlarla kullanılabilen,portatif ve seri halde üretimi yapılan ilk bilgisayar UNIVAC I 'dir. Bahsettigin pc eğer IBM PC ise; onun da satışa çıkış tarihi 12 ağustos 1981 'dir.1985 i nerden uydurdun bilmiyorum ama bir yerlerden bişey duyup, sormadan, araştırmadan yazan, mantıklı cevap veremeyen acaba kim? Hakan adlı üyeyi tanımıyorum, mantıklı bir soru sormuş ve yanıtı Engerex adlı üye tarafından verilmiştir ve yazılım olmadan bu işin yapılması MÜMKÜNDÜR.
 

mehmet.kara

Öğrenci
Katılım
3 Mayıs 2009
Mesajlar
9
Reaksiyon puanı
0
Puanları
0
Master boot record

From Wikipedia, the free encyclopedia


Jump to: navigation, search
Structure of a Master Boot RecordAddressDescriptionSize
in
bytesHexOctDec000000000Code Area440
(max. 446)01B80670440Optional Disk signature401BC0674444Usually Nulls; 0x0000201BE0676446Table of primary partitions
(Four 16-byte entries, IBM Partition Table scheme)6401FE077651055hMBR signature;
0xAA55[1]201FF0777511AAhMBR, total size: 446 + 64 + 2 =512A master boot record (MBR), or partition sector, is the 512-byte boot sector that is the first sector ("LBA Sector 0") of a partitioned data storage device such as a hard disk. (The boot sector of a non-partitioned device is a Volume Boot Record. These are usually different, although it is possible to create a record that acts as both; it is called a multi boot record.) The MBR may be used for one or more of the following:
  • Holding a disk's primary partition table.[2]
  • Bootstrapping operating systems, after the computer's BIOS passes execution to machine code instructions contained within the MBR.
  • Uniquely identifying individual disk media, with a 32-bit disk signature; even though it may never be used by the machine the disk is running on.[3][4][5][6]
Due to the broad popularity of IBM PC-compatible computers, this type of MBR is widely used, to the extent of being supported by and incorporated into other computer types including newer cross-platform standards for bootstrapping and partitioning.[citation needed]
Contents

[hide]
[edit] MBRs and disk partitioning

Layout of one 16-byte partition recordOffsetField
length
(bytes)Description0x001status[7] (0x80 = bootable (active), 0x00 = non-bootable,
other = invalid[8])0x013CHS address of first block in partition.[9]
The format is described in the next 3 bytes.0x011head[10]0x021sector is in bits 5–0[11]; bits 9–8 of cylinder are in bits 7–60x031bits 7–0 of cylinder[12]0x041partition type[13]0x053CHS address of last block in partition.[14]
The format is described in the next 3 bytes.0x051head0x061sector is in bits 5–0; bits 9–8 of cylinder are in bits 7–60x071bits 7–0 of cylinder0x084LBA of first sector in the partition0x0C4number of blocks in partition, in little-endian formatThe MBR is not located in a partition, it is located at a Main Boot Record area in front of the first partition.
When a data storage device has been partitioned with the MBR Partition Table scheme (i.e., the conventional IBM PC partitioning scheme), the master boot record contains the primary partition entries in its partition table. The partition table may also contain entries for other, secondary partitions which are stored in extended boot records (EBRs), BSD disklabels, and Logical Disk Manager metadata partitions that are described by those primary entries.[15]
By convention, there are exactly four primary partition table entries in the MBR Partition Table scheme, although some DOS operating systems did extend this to five (PTS-DOS)[16] or even eight (AST or NEC DOS)[17][18] entries. Both the partition length and partition start address are stored as 32-bit quantities. Because the block size is 512 bytes, this implies that neither the maximum size of a partition nor the maximum start address (both in bytes) can exceed 232 × 512 bytes, or 2 TiB. Alleviating this capacity limitation is one of the prime motivations for the development of the GUID Partition Table (GPT).
Where a data storage device has been partitioned with the GPT scheme, the Master Boot Record will still contain a partition table, but its only purpose is to indicate the existence of the GUID Table and to prevent utility programs that understand only the MBR Partition Table scheme from creating any partitions in what they would see as free space on the disk, thereby accidentally erasing the GUID table.

[edit] MBRs and system bootstrapping

On IA-32 IBM PC compatible machines using the MBR Partition Table scheme, the bootstrapping firmware contained within the ROM BIOS loads and executes the master boot record. Because the i386 family of processors boot up in real mode, the code in the MBR is real mode machine language instructions. This code normally passes control by chain loading the volume boot record (VBR) of the active (primary) partition, although some boot managers replace that conventional code with their own.
The conventional MBR code expects the MBR Partition Table scheme to have been used, and scans the list of (primary) partition entries in its embedded partition table to **** the only one that is marked with the active flag. It then loads and runs the Volume Boot Record for that partition. (Thus the master boot record, like other boot sectors, is a target for boot-sector infecting computer viruses. See boot sector.)
The MBR replacement code in some boot managers can perform a variety of tasks, and what those tasks are varies from boot manager to boot manager. In some, for example, it loads the remainder of the boot manager code from the first track of the disk, which it assumes to be "free" space that is not allocated to any disk partition, and executes it. In others, it uses a table of embedded disk locations to locate the remainder of the boot manager code to load and to execute. (Both approaches have problems. The first relies on behavior that is not universal across all disk partitioning utilities. The second requires that the embedded list of disk locations be updated when changes are made that would relocate the remainder of the code.)
On machines that do not use IA-32 processors, and on machines that use Extensible Firmware Interface (EFI) firmware, this design is unsuitable, and the MBR is not used as part of the system bootstrap. On the latter, the firmware is instead capable of directly understanding the GPT partitioning scheme and the FAT filesystem format, and loads and runs programs held as files in the EFI System partition. The MBR will be involved only insofar as it might contain the partition table if the MBR Partition Table scheme has been used.
There is some MBR replacement code that emulates EFI firmware's bootstrap, which makes non-EFI machines capable of booting from disks using the GPT partitioning scheme. (A typical example is a Multi Boot Record, which can be used as MBR and as a Volume Boot Record in the bootstrap process and hence the name. It detects a GPT and loads the EFI compatible code from disk to complete this task.)

[edit] MBRs and disk identity


Information contained in the Partition Table of an external hard drive as it appears in the utility program, QtParted, running under Linux.


In addition to the bootstrap code and a partition table, master boot records may contain a Windows NT disk signature. This is a 32-bit value that is intended to uniquely identify the disk medium (as opposed to the disk unit — the two not necessarily being the same for removable hard disks).
The disk signature was introduced by Windows NT version 3.5, but is now used by several operating systems, including the Linux kernel version 2.6 and later. Linux uses the NT disk signature at boot time to determine the location of the boot volume.[19]
Windows NT (and later Microsoft operating systems) uses the disk signature as an index to all the partitions on any disk ever connected to the computer under that OS; these signatures are kept in Registry keys, primarily for storing the persistent mappings between disk partitions and drive letters. It may also be used in boot.ini files (though most do not), to describe the location of bootable Windows NT (or later) partitions.[20] One key (among many) where NT disk signatures appear in a Windows 2000/XP Registry is:
HKEY_LOCAL_MACHINE\SYSTEM\MountedDevicesIf a disk's signature stored in the MBR was A8 E1 B9 D2 (in that order) and its first partition corresponded with logical drive C: under Windows, then the REG_BINARY data under the key value, \DosDevices\C:, would be:
A8 E1 B9 D2 00 7E 00 00 00 00 00 00The first four bytes are said disk signature. (Note: In other keys, these bytes may appear in reverse order from that found in the MBR sector.) These are followed by eight more bytes, forming a 64-bit Integer, in little endian notation, which are used to locate the byte offset of this partition. In this case, 00 7E corresponds to the hexadecimal value 0x7E00 (32,256dec). Dividing this byte offset by 512 (the size of a hard disk's physical sector in bytes) results in 63, which is the physical sector number (or LBA) containing the first block of the partition ([21]).
If this disk had another partition with the values 00 F8 93 71 02 following the disk signature (under, e.g., the key value \DosDevices\D:), it would begin at byte offset 0x27193f800 (10,495,457,280dec), which is also the first byte of physical sector 20,498,940.

[edit] Programming Considerations

Assume that the system being programmed uses the BIOS MBR scheme, as stated above, and the system BIOS locates a valid MBR on a partitioned drive in its boot sequence. As stated above, conventional MBR code loads and runs the operating-system-dependent Volume Boot Record (or bootloader) code that is located at the beginning of the disk's "active" partition. The MBR can simply assume that the one active partition on the current drive is supposed to boot, or alternately, it can be programmed as a Dual boot MBR. A dual boot MBR must interact with the user to determine which partition on which drive should boot, and may transfer control to the MBR of a different drive.
The BIOS will load the first valid MBR that it finds into hexadecimal physical address 0x7c00, and jump to that address. Part of the end of the 512 byte sector is pre-allocated for the partition table and other information (see above), so the MBR program must be tiny enough to fit within 440 bytes of memory. The MBR program may communicate with the user, examine the partition table, or perform some housekeeping tasks such as enabling the A20 line, or changing to Unreal mode from Real mode. Eventually, the MBR will need to perform its main task, and load the program that will perform the next stage of the boot process, usually by making use of the INT 13 BIOS call.
Typical boot sector code also expects to be loaded at physical address 0x7c00, even though all the memory from physical address 0x501 (address 0x500 is the last one used by the BIOS)[citation needed] to somewhere short of 0x9ffff is typically available in Real mode (a total of up to 640 KB minus the first 1281 bytes of memory)[22] Since 0x7c00 is the location where the MBR is already running, one of the first tasks of an MBR is usually to relocate itself somewhere else in memory -- most often at 0x600 (for Microsoft code). A conventional Volume Boot Record is only one sector long; but it does no harm and is trivial to allow the MBR to load significantly more than just one sector. Some bootloaders are longer than one sector, so loading more than one sector can speed up the boot process.

[edit] Editing/replacing MBR contents

Though it is possible to directly manipulate the bytes in the MBR sector using various Disk Editors, there are tools to write fixed sets of functioning code to the MBR . Since MS-DOS 5.0, the DOS-mode program FDISK has included the (undocumented, but widely used) switch /mbr, which will rewrite the MBR code. Under Windows 2000 or later, the Recovery Console can be used to write new MBR code to a hard disk using its fixmbr command. Under Windows Vista and Windows 7, the Recovery Environment can be used to write new MBR code to a hard disk by clicking on Command Prompt and typing bootrec /FixMbr.
Some third-party utilities may also be used for directly editing the contents of partition tables (without requiring any knowledge of hexadecimal or disk/sector editors).[23]
In Linux, the GRUB and LILO projects have tools for writing code to the MBR sector, namely grub-install and lilo -mbr. The grub interactive console also has commands to write to the MBR. dd is also a commonly used Linux command to copy or overwrite any sector, MBR included.
 
Üst